diff --git a/针灸挂号系统功能表结构.sql b/针灸挂号系统功能表结构.sql index 70055fc..f10c316 100644 --- a/针灸挂号系统功能表结构.sql +++ b/针灸挂号系统功能表结构.sql @@ -1,27 +1,21 @@ CREATE TABLE `user_index` ( - `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, + `uid` int NOT NULL AUTO_INCREMENT PRIMARY KEY, `openid` varchar(255) NOT NULL DEFAULT '' COMMENT '公众号openid' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户索引表'; CREATE TABLE `user_list` ( `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, - `hid` int(11) NOT NULL DEFAULT '0' COMMENT '医生id', - `uindex_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户索引表id', + `uid` int(11) NOT NULL DEFAULT '0' COMMENT '用户索引表id', `avator` varchar(255) NOT NULL DEFAULT '' COMMENT '头像', `nick` varchar(100) NOT NULL DEFAULT '' COMMENT '昵称', `create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='登录用户表'; -CREATE TABLE `visitor_index` ( - `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, - `idcard` char(100) NOT NULL DEFAULT '' COMMENT '身份证号' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='就诊用户索引表'; - CREATE TABLE `visitor_list` ( `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, - `vindex_id` int(11) NOT NULL DEFAULT '0' COMMENT '就诊用户索引表id', `uid` int(11) NOT NULL DEFAULT '0' COMMENT '患者用户表id', `name` varchar(255) NOT NULL DEFAULT '' COMMENT '姓名', + `idcard` char(100) NOT NULL DEFAULT '' COMMENT '身份证号' `phone` bigint(11) NOT NULL DEFAULT '0' COMMENT '手机号', `create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0=正常 1=已删除' @@ -29,14 +23,13 @@ CREATE TABLE `visitor_list` ( CREATE TABLE `visit_list` ( `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, - `dv_id` int(11) NOT NULL DEFAULT '0' COMMENT '医生所在科室出诊信息表id', `visitor_id` int(11) NOT NULL DEFAULT '0' COMMENT '就诊用户人id', `visit_time` varchar(50) NOT NULL DEFAULT '' COMMENT '就诊预约时间 07:30-08:30', `visit_date` varchar(50) NOT NULL DEFAULT '' COMMENT '就诊预约日期 2024-03-01', - `acupuncture_status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '针灸状态 0=待留针 1=已留针 2=已取针', + `dv_id` int(11) NOT NULL DEFAULT '0' COMMENT '医生所在科室出诊信息表id', `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0=待叫号 1=就诊中 2=就诊完成 3=已过号', - `start_acupuncture_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '开始针灸时间' -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='就诊挂号表'; + `start_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '计时开始时间' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='预约挂号表'; CREATE TABLE `visit_stat_info` ( `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, @@ -79,21 +72,21 @@ CREATE TABLE `doctor_visit_info` ( `depart_id` int(11) NOT NULL DEFAULT '0' COMMENT '医生科室id', `morning_worktime` char(50) NOT NULL DEFAULT '' COMMENT '上午上班时间-上午下班时间 9:00-12:00', `afternoon_worktime` char(50) NOT NULL DEFAULT '' COMMENT '下午上班时间-下午下班时间 14:00-17:30', - `holiday_work_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0=否 1=是 节假日是否停诊', - `acupuncture_num` int(4) NOT NULL DEFAULT '0' COMMENT '一次挂号针灸次数', - `acupuncture_time` int(4) NOT NULL DEFAULT '0' COMMENT '每次针灸时长', - `bed_num` int(4) NOT NULL DEFAULT '0' COMMENT '时间段可预约床位数', - `acupuncture_num_exipre` int(4) NOT NULL DEFAULT '0' COMMENT '针灸次数有效期,单位天', - `visit_days` int(4) NOT NULL DEFAULT '0' COMMENT '距离当前可挂号最晚时间,单位小时,设置为2小时,用户可挂近两小时的号', + `is_holiday_work` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0=否 1=是 节假日是否停诊', + `treat_num` int(4) NOT NULL DEFAULT '0' COMMENT '一次挂号针灸次数', + `treat_time` int(4) NOT NULL DEFAULT '0' COMMENT '每次针灸时长', + `bed_num` int(4) NOT NULL DEFAULT '0' COMMENT '可预约床位数', + `treat_num_expire` int(4) NOT NULL DEFAULT '0' COMMENT '针灸次数有效期,单位天', + `visit_hours` int(4) NOT NULL DEFAULT '0' COMMENT '距离当前可挂号最晚时间,单位小时,设置为2小时,用户可挂近两小时的号', `notice` text COMMENT '就诊提醒', `create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0=就诊中 1=已停诊' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='医生所在科室出诊信息表'; - + CREATE TABLE `doctor_helper_list` ( `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, `doctor_id` int(11) NOT NULL DEFAULT '0' COMMENT '医生id', - `depart_id` int(11) NOT NULL DEFAULT '0' COMMENT '医生科室id', + `hid` int(11) NOT NULL DEFAULT '0' COMMENT '医院id', `name` varchar(255) NOT NULL DEFAULT '' COMMENT '姓名', `idcard` varchar(100) NOT NULL DEFAULT '' COMMENT '身份证号', `phone` bigint(11) NOT NULL DEFAULT '0' COMMENT '手机号', @@ -105,37 +98,40 @@ CREATE TABLE `doctor_helper_auth` ( `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, `doctor_id` int(11) NOT NULL DEFAULT '0' COMMENT '医生id', `type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0=志愿者 1=助手', - `rule` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0=代患者预约 1=帮患者取证 2=挂号条录入' + `rule` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0=代患者预约 1=帮患者取证 2=挂号条录入 9 全部权限' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='医生助手权限表'; CREATE TABLE `week_worktimes` ( `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, `dv_id` int(11) NOT NULL DEFAULT '0' COMMENT '医生所在科室出诊信息表id', `week_day` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1~7 代表周一到周天', - `type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0 休息 1 上午上班 2 下午上班 3 全天出诊' + `plan` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0 休息 1 上午上班 2 下午上班 3 全天出诊' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='每周出诊安排表'; -CREATE TABLE `doctor_visit_tmp` ( +CREATE TABLE `doctor_visit_change` ( `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, `dv_id` int(11) NOT NULL DEFAULT '0' COMMENT '医生所在科室出诊信息表id', - `morning_worktime` char(50) NOT NULL DEFAULT '' COMMENT '上午上班时间-上午下班时间 9:00-12:00,0代表休息,1代表默认时间段', - `afternoon_worktime` char(50) NOT NULL DEFAULT '' COMMENT '下午上班时间-下午下班时间 14:00-17:30,0代表休息,1代表默认时间段', + `morning_plan` tinyint(1) NOT NULL DEFAULT '0' COMMENT '上午计划 0=代表休息 1=自定义时间上班 2=自定义时间休息 3=默认时间', + `morning_time` char(50) NOT NULL DEFAULT '' COMMENT '上午时间 9:00-12:00', + `afternoon_plan` tinyint(1) NOT NULL DEFAULT '0' COMMENT '下午计划 0=代表休息 1=自定义时间上班 2=自定义时间休息 3=默认时间', + `afternoon_time` char(50) NOT NULL DEFAULT '' COMMENT '下午时间 14:00-17:30', `date` date NOT NULL DEFAULT '0000-00-00' COMMENT '调诊日期' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='医生出诊临时调整表'; CREATE TABLE `everyday_visit_nums` ( `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, `dv_id` int(11) NOT NULL DEFAULT '0' COMMENT '医生所在科室出诊信息表id', - `times` char(50) NOT NULL DEFAULT '' COMMENT '挂号时间段 07:30-08:30', `date` date NOT NULL DEFAULT '0000-00-00' COMMENT '挂号日期', + `times` char(50) NOT NULL DEFAULT '' COMMENT '挂号时间段 07:30-08:30', `num` int(5) NOT NULL DEFAULT '0' COMMENT '挂号数量', - `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '放号时间' + `create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '放号时间' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='每天挂号放号数量,放号表'; -CREATE TABLE `register_opt_list` ( +CREATE TABLE `opt_list` ( `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, `dv_id` int(11) NOT NULL DEFAULT '0' COMMENT '医生所在科室出诊信息表id', `visitor_id` int(11) NOT NULL DEFAULT '0' COMMENT '就诊用户人id', - `acupuncture_nums` int(11) NOT NULL DEFAULT '0' COMMENT '针灸次数 挂号为正数 退号为负数' - `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '操作时间' + `treat_nums` int(11) NOT NULL DEFAULT '0' COMMENT '针灸次数 挂号为正数 退号为负数', + `type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0 ', + `create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '操作时间' ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='挂号操作表'; \ No newline at end of file