__('Feedback'), 'complaint' => __('Complaint')]; } public function getRelationTypeList() { return ['platform' => __('Platform'), 'agency' => __('Agency'), 'store' => __('Store'), 'massager' => __('Massager'), 'user' => __('User'), 'other' => __('Other')]; } public function getStatusList() { return ['default' => __('Default'), 'dispose' => __('Dispose'), 'refuse' => __('Refuse')]; } public function getTypeTextAttr($value, $data) { $value = $value ? $value : (isset($data['type']) ? $data['type'] : ''); $list = $this->getTypeList(); return isset($list[$value]) ? $list[$value] : ''; } public function getRelationTypeTextAttr($value, $data) { $value = $value ? $value : (isset($data['relation_type']) ? $data['relation_type'] : ''); $list = $this->getRelationTypeList(); return isset($list[$value]) ? $list[$value] : ''; } public function getStatusTextAttr($value, $data) { $value = $value ? $value : (isset($data['status']) ? $data['status'] : ''); $list = $this->getStatusList(); return isset($list[$value]) ? $list[$value] : ''; } public function user() { return $this->belongsTo('app\admin\model\User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0); } public function massager() { return $this->belongsTo('app\admin\model\Massager', 'massager_id', 'id', [], 'LEFT')->setEagerlyType(0); } public function admin() { return $this->belongsTo('app\admin\model\Admin', 'agency_id', 'id', [], 'LEFT')->setEagerlyType(0); } }