You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
1.9 KiB
SQL

create table appointment_templates
(
id bigint unsigned auto_increment
primary key,
name varchar(50) not null,
weeks varchar(50) not null,
weekday tinyint not null,
holidays tinyint not null,
start_time time not null,
end_time time not null,
stop_time time not null,
max_count bigint not null,
created_at timestamp null,
updated_at timestamp null,
hospital bigint default 0 not null
)
collate = utf8mb4_unicode_ci;
create index appointment_templates_hospital_index
on appointment_templates (hospital);
INSERT INTO lkpe.appointment_templates (id, name, weeks, weekday, holidays, start_time, end_time, stop_time, max_count, created_at, updated_at, hospital) VALUES (1, '计划模板', '["1","2","3","4","5"]', 1, 2, '08:00:00', '13:00:00', '07:00:00', 30, '2023-04-08 02:06:07', '2023-04-10 10:52:06', 0);
INSERT INTO lkpe.appointment_templates (id, name, weeks, weekday, holidays, start_time, end_time, stop_time, max_count, created_at, updated_at, hospital) VALUES (2, '下午', '["1","2","3","4","5"]', 1, 2, '14:00:00', '17:00:00', '13:00:00', 20, '2023-04-09 00:59:02', '2023-04-09 00:59:02', 0);
INSERT INTO lkpe.appointment_templates (id, name, weeks, weekday, holidays, start_time, end_time, stop_time, max_count, created_at, updated_at, hospital) VALUES (3, '晚上', '["1","4","2","5","3"]', 1, 2, '18:00:00', '20:00:00', '19:00:00', 30, '2023-04-10 10:51:57', '2023-04-10 10:51:57', 0);
INSERT INTO lkpe.appointment_templates (id, name, weeks, weekday, holidays, start_time, end_time, stop_time, max_count, created_at, updated_at, hospital) VALUES (4, '测试医院机构模板', '["1","2","3","5","4","6","7"]', 1, 2, '05:00:00', '18:00:00', '17:00:00', 30, '2023-06-10 11:03:52', '2023-06-10 11:03:52', 1);