__('Misjudge'), 'review' => __('Review'), 'deduct' => __('Deduct'), 'other' => __('Other'), 'aftersale' => '用户售后退款' ]; } public function getStatusList() { return ['wait' => __('Wait'), 'handling' => __('Handling'), 'done' => __('Done'), 'reject' => __('Reject')]; } public function getTypeTextAttr($value, $data) { $value = $value ?: ($data['type'] ?? ''); $list = $this->getTypeList(); return $list[$value] ?? ''; } public function getStatusTextAttr($value, $data) { $value = $value ?: ($data['status'] ?? ''); $list = $this->getStatusList(); return $list[$value] ?? ''; } public function order() { return $this->belongsTo('Order', 'order_id', 'id', [], 'LEFT')->setEagerlyType(0); } public function master() { return $this->belongsTo('Master', 'master_id', 'id', [], 'LEFT')->setEagerlyType(0); } /** * 售后退款申诉的发起用户(用户端售后申请时记录 user_id) */ public function user() { return $this->belongsTo('app\admin\model\User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0); } }