更新
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace app\common\model\doctor;
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use app\common\enum\AppointmentTypeEnum;
|
||||
|
||||
/**
|
||||
* 医生预约模型
|
||||
@@ -58,12 +59,12 @@ class Appointment extends BaseModel
|
||||
*/
|
||||
public function getAppointmentTypeDescAttr($value, $data)
|
||||
{
|
||||
$typeMap = [
|
||||
'video' => '视频问诊',
|
||||
'text' => '图文问诊',
|
||||
'phone' => '电话问诊',
|
||||
];
|
||||
return $typeMap[$data['appointment_type']] ?? '未知';
|
||||
return AppointmentTypeEnum::description($data['appointment_type'] ?? null);
|
||||
}
|
||||
|
||||
public function getAppointmentTypeAttr($value)
|
||||
{
|
||||
return AppointmentTypeEnum::normalizeStored($value);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user