This commit is contained in:
Your Name
2026-09-09 12:18:17 +08:00
parent 0cea43b027
commit 40319eea41
76 changed files with 4821 additions and 268 deletions
@@ -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);
}
/**