<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/9/22
 * Time: 15:17
 */

namespace app\common\model;

use app\common\model\order as orderModel;

class Refund extends BaseModel
{
    protected $table = 'mr_user_refundapplies';
    //    获取订单信息
    public function getOrderAttr($value,$data){
        return orderModel::get($data['order_id']);
    }
    //获取用户信息
    public function getStatusStrAttr($value,$data){
        $status = array(
            '1'=>['color'=>'#c33eff','name'=>'申请中'],
            '2'=>['color'=>'#4acc2e','name'=>'退款成功'],
            '3'=>['color'=>'#cc2e2e','name'=>'退款失败']
        );
        return $status[$data['status']];
        //1-申请中，2-退款成功，3-退款失败
    }
}