__('Gender 1'), '0' => __('Gender 0')]; } public function getMaritalStatusList() { return ['1' => __('Marital_status 1'), '0' => __('Marital_status 0')]; } public function getAllergiesStatusList() { return ['1' => __('Allergies_status 1'), '0' => __('Allergies_status 0')]; } public function getFamilymedicalStatusList() { return ['1' => __('Familymedical_status 1'), '0' => __('Familymedical_status 0')]; } public function getChronicdiseaseStatusList() { return ['1' => __('Chronicdisease_status 1'), '0' => __('Chronicdisease_status 0')]; } public function getGenderTextAttr($value, $data) { $value = $value ? $value : (isset($data['gender']) ? $data['gender'] : ''); $list = $this->getGenderList(); return isset($list[$value]) ? $list[$value] : ''; } public function getMaritalStatusTextAttr($value, $data) { $value = $value ? $value : (isset($data['marital_status']) ? $data['marital_status'] : ''); $list = $this->getMaritalStatusList(); return isset($list[$value]) ? $list[$value] : ''; } public function getAllergiesStatusTextAttr($value, $data) { $value = $value ? $value : (isset($data['allergies_status']) ? $data['allergies_status'] : ''); $list = $this->getAllergiesStatusList(); return isset($list[$value]) ? $list[$value] : ''; } public function getFamilymedicalStatusTextAttr($value, $data) { $value = $value ? $value : (isset($data['familymedical_status']) ? $data['familymedical_status'] : ''); $list = $this->getFamilymedicalStatusList(); return isset($list[$value]) ? $list[$value] : ''; } public function getChronicdiseaseStatusTextAttr($value, $data) { $value = $value ? $value : (isset($data['chronicdisease_status']) ? $data['chronicdisease_status'] : ''); $list = $this->getChronicdiseaseStatusList(); return isset($list[$value]) ? $list[$value] : ''; } public function order() { return $this->belongsTo('wenzhenorder', 'order_id', 'id', [], 'LEFT')->setEagerlyType(0); } }