__('Ruletype 1'), '2' => __('Ruletype 2')]; } public function getGenderList() { return ['1' => __('Gender 1'), '0' => __('Gender 0')]; } public function getIdcardStatusList() { return ['-1' => __('Idcard_status -1'), '0' => __('Idcard_status 0'), '1' => __('Idcard_status 1'), '2' => __('Idcard_status 2')]; } public function getDoctorStatusList() { return ['-1' => __('Doctor_status -1'), '0' => __('Doctor_status 0'), '1' => __('Doctor_status 1'), '2' => __('Doctor_status 2')]; } public function getEnglishStatusList() { return ['1' => __('English_status 1'), '0' => __('English_status 0')]; } public function getStatusList() { return ['1' => __('Status 1'), '0' => __('Status 0'), '-1' => __('Status -1')]; } public function getRuletypeTextAttr($value, $data) { $value = $value ? $value : (isset($data['ruletype']) ? $data['ruletype'] : ''); $list = $this->getRuletypeList(); 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 getIdcardStatusTextAttr($value, $data) { $value = $value ? $value : (isset($data['idcard_status']) ? $data['idcard_status'] : ''); $list = $this->getIdcardStatusList(); return isset($list[$value]) ? $list[$value] : ''; } public function getDoctorStatusTextAttr($value, $data) { $value = $value ? $value : (isset($data['doctor_status']) ? $data['doctor_status'] : ''); $list = $this->getDoctorStatusList(); return isset($list[$value]) ? $list[$value] : ''; } public function getEnglishStatusTextAttr($value, $data) { $value = $value ? $value : (isset($data['english_status']) ? $data['english_status'] : ''); $list = $this->getEnglishStatusList(); 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 keshi() { return $this->belongsTo('Keshi', 'keshi_id', 'id', [], 'LEFT')->setEagerlyType(0); } public function doctorlevel() { return $this->belongsTo('doctorlevel', 'level_id', 'id', [], 'LEFT')->setEagerlyType(0); } public function wallet() { return $this->belongsTo('Doctorwallet', 'id', 'doctor_id', [], 'LEFT')->setEagerlyType(0); } }