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);
}
/**
@@ -14,6 +14,9 @@ class PrescriptionOrder extends BaseModel
{
use SoftDelete;
/** 已取消 / 已退款的历史订单不再占用处方;部分退款仍沿用原履约状态。 */
public const RELEASED_PRESCRIPTION_STATUSES = [4, 10];
protected $name = 'tcm_prescription_order';
protected $deleteTime = 'delete_time';