__('Type csr'), 'user' => __('Type user'), 'tourist' => __('Type tourist')]; } public function getGenderList() { return ['secrecy' => __('Gender secrecy'), 'male' => __('Gender male'), 'female' => __('Gender female')]; } public function getStatusList() { return ['0' => __('Status 0'), '1' => __('Status 1'), '2' => __('Status 2'), '3' => __('Status 3')]; } public function getTypeTextAttr($value, $data) { $value = $value ? $value : (isset($data['type']) ? $data['type'] : ''); $list = $this->getTypeList(); return isset($list[$value]) ? $list[$value] : ''; } public function getGenderTextAttr($value, $data) { $value = $value ? $value : (isset($data['gender']) ? $data['gender'] : ''); $list = $this->getGenderList(); 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 fauser() { return $this->belongsTo('app\admin\model\User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0); } public function admin() { return $this->belongsTo('app\admin\model\Admin', 'admin_id', 'id', [], 'LEFT')->setEagerlyType(0); } public function csrgroup() { return $this->belongsTo('app\admin\model\fastim\CsrGroup', 'group_id', 'id', [], 'LEFT')->setEagerlyType(0); } }