__('Type user'), 'group' => __('Type group'), 'feedback' => __('Type feedback')]; } public function getStatusList() { return ['0' => __('Status 0'), '1' => __('Status 1')]; } public function getTypeTextAttr($value, $data) { $value = $value ? $value : (isset($data['type']) ? $data['type'] : ''); $list = $this->getTypeList(); 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] : ''; } /** * 被举报人 * @return [type] [description] */ public function user() { return $this->belongsTo('app\admin\model\fastim\User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0); } /** * 举报人 * @return [type] [description] */ public function reportuser() { return $this->belongsTo('app\admin\model\fastim\User', 'report_id', 'id', [], 'LEFT')->setEagerlyType(0); } /** * 被举报群聊 * @return [type] [description] */ public function chatgroup() { return $this->belongsTo('app\admin\model\fastim\Groupchat', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0); } }