新增功能

This commit is contained in:
Your Name
2026-03-04 15:32:30 +08:00
parent a07e844c47
commit ab77f5488d
2266 changed files with 177942 additions and 3444 deletions
+20
View File
@@ -0,0 +1,20 @@
-- 医生预约表
CREATE TABLE IF NOT EXISTS `zyt_doctor_appointment` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`patient_id` int(11) NOT NULL COMMENT '患者ID',
`doctor_id` int(11) NOT NULL COMMENT '医生ID',
`roster_id` int(11) NOT NULL COMMENT '排班ID',
`appointment_date` date NOT NULL COMMENT '预约日期',
`period` enum('morning','afternoon') NOT NULL COMMENT '时段:morning=上午,afternoon=下午',
`appointment_time` time NOT NULL COMMENT '预约时间',
`appointment_type` varchar(20) DEFAULT 'video' COMMENT '预约类型:video=视频问诊,text=图文问诊,phone=电话问诊',
`status` tinyint(1) DEFAULT '1' COMMENT '状态:1=已预约,2=已取消,3=已完成',
`remark` varchar(500) DEFAULT NULL COMMENT '备注',
`create_time` int(10) unsigned DEFAULT NULL COMMENT '创建时间',
`update_time` int(10) unsigned DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`),
UNIQUE KEY `unique_appointment` (`doctor_id`,`appointment_date`,`appointment_time`,`status`) USING BTREE,
KEY `idx_patient` (`patient_id`) USING BTREE,
KEY `idx_doctor_date` (`doctor_id`,`appointment_date`) USING BTREE,
KEY `idx_roster` (`roster_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='医生预约表';