/* Navicat Premium Data Transfer Source Server : 生产 Source Server Type : MariaDB Source Server Version : 100328 Source Host : localhost:3306 Source Schema : qcp Target Server Type : MariaDB Target Server Version : 100328 File Encoding : 65001 Date: 02/08/2021 10:53:59 */ SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for t_constant -- ---------------------------- DROP TABLE IF EXISTS `t_constant`; CREATE TABLE `t_constant` ( `id` bigint(20) NOT NULL, `business_id` bigint(20) NULL DEFAULT 0 COMMENT '业务id', `business_type` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '业务id的类型 0任务 1插件 2其他', `t_key` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '', `t_value` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '', `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '描述', `operator` bigint(20) NULL DEFAULT 0 COMMENT '操作人id', `created_at` timestamp NOT NULL DEFAULT current_timestamp, `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '常量表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_label -- ---------------------------- DROP TABLE IF EXISTS `t_label`; CREATE TABLE `t_label` ( `id` bigint(20) NOT NULL, `label_type_id` bigint(20) NULL DEFAULT 0 COMMENT '标签类型id', `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '描述', `level` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '等级', `created_at` timestamp NOT NULL DEFAULT current_timestamp COMMENT '创建时间', `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态 0正常 1禁用 2删除', PRIMARY KEY (`id`) USING BTREE, INDEX `label_type_id`(`label_type_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '标签表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_label_business -- ---------------------------- DROP TABLE IF EXISTS `t_label_business`; CREATE TABLE `t_label_business` ( `id` bigint(20) NOT NULL, `label_id` bigint(20) NULL DEFAULT 0 COMMENT '标签id', `user_id` bigint(20) NULL DEFAULT 0 COMMENT '用户id', `business_type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '业务类型(0-任务,1-插件,2-任务)', `business_id` bigint(20) NULL DEFAULT 0 COMMENT '业务id(任务id、插件id、角色id等)', `created_at` timestamp NOT NULL DEFAULT current_timestamp COMMENT '创建时间', `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态 0正常 1禁用 2删除', PRIMARY KEY (`id`) USING BTREE, INDEX `label_id`(`label_id`) USING BTREE, INDEX `user_id`(`user_id`) USING BTREE, INDEX `business_id`(`business_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '标签与业务关联表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_label_type -- ---------------------------- DROP TABLE IF EXISTS `t_label_type`; CREATE TABLE `t_label_type` ( `id` bigint(20) NOT NULL, `label_type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '标签类型(0-显示颗粒度,1-任务,2重要性,3-输入输出类型,4业务类型,5-角色)', `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '描述', `default_level` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '默认等级', `created_at` timestamp NOT NULL DEFAULT current_timestamp COMMENT '创建时间', `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态 0正常 1禁用 2删除', PRIMARY KEY (`id`) USING BTREE, INDEX `label_type_index`(`label_type`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '标签类型表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_pro_member -- ---------------------------- DROP TABLE IF EXISTS `t_pro_member`; CREATE TABLE `t_pro_member` ( `id` bigint(20) NOT NULL, `user_id` bigint(20) NULL DEFAULT 0 COMMENT '用户id', `project_id` bigint(20) NULL DEFAULT 0 COMMENT '项目id', `phone` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '手机号', `name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '成员名', `avatar_url` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '头像', `operator` bigint(20) NULL DEFAULT 0 COMMENT '操作人id', `created_at` timestamp NOT NULL DEFAULT current_timestamp, `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0, PRIMARY KEY (`id`) USING BTREE, INDEX `member_user_index`(`user_id`) USING BTREE, INDEX `member_project_index`(`project_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '成员表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_pro_member_stakeholder -- ---------------------------- DROP TABLE IF EXISTS `t_pro_member_stakeholder`; CREATE TABLE `t_pro_member_stakeholder` ( `id` bigint(20) NOT NULL, `memeber_id` bigint(20) NULL DEFAULT 0 COMMENT '成员id', `stakeholder_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '奖惩干系人名称', `stakeholder_phone` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '奖惩干系人手机号', `user_id` bigint(20) NULL DEFAULT 0 COMMENT 'userId', `operator` bigint(20) NULL DEFAULT 0 COMMENT '操作人id', `created_at` timestamp NOT NULL DEFAULT current_timestamp, `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0, PRIMARY KEY (`id`) USING BTREE, INDEX `stakeholder_member_index`(`memeber_id`) USING BTREE, INDEX `stakeholder_user_index`(`user_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '奖惩干系人表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_pro_parent_task -- ---------------------------- DROP TABLE IF EXISTS `t_pro_parent_task`; CREATE TABLE `t_pro_parent_task` ( `id` bigint(20) NOT NULL, `task_detail_id` bigint(20) NULL DEFAULT 0 COMMENT '任务详情id', `parent_task_detail_id` bigint(20) NULL DEFAULT 0 COMMENT '父级任务id', `created_at` timestamp NOT NULL DEFAULT current_timestamp, `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0, PRIMARY KEY (`id`) USING BTREE, INDEX `task_index`(`task_detail_id`) USING BTREE, INDEX `parent_task_index`(`parent_task_detail_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务关系表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_pro_role -- ---------------------------- DROP TABLE IF EXISTS `t_pro_role`; CREATE TABLE `t_pro_role` ( `id` bigint(20) NOT NULL, `name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '角色名', `label_id` bigint(20) NULL DEFAULT 0 COMMENT '一级角色标签id', `project_id` bigint(20) NULL DEFAULT 0 COMMENT '项目id', `operator` bigint(20) NULL DEFAULT 0 COMMENT '操作人id', `created_at` timestamp NOT NULL DEFAULT current_timestamp, `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0, PRIMARY KEY (`id`) USING BTREE, INDEX `role_label_index`(`label_id`) USING BTREE, INDEX `role_project_index`(`project_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_pro_role_member -- ---------------------------- DROP TABLE IF EXISTS `t_pro_role_member`; CREATE TABLE `t_pro_role_member` ( `id` bigint(20) NOT NULL, `role_id` bigint(20) NULL DEFAULT 0 COMMENT '角色id', `member_id` bigint(20) NULL DEFAULT 0 COMMENT '成员id', `operator` bigint(20) NULL DEFAULT 0 COMMENT '操作人id', `created_at` timestamp NOT NULL DEFAULT current_timestamp, `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0, PRIMARY KEY (`id`) USING BTREE, INDEX `role_member_role_index`(`role_id`) USING BTREE, INDEX `role_member_member_index`(`member_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色成员关联表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_pro_role_repulsion -- ---------------------------- DROP TABLE IF EXISTS `t_pro_role_repulsion`; CREATE TABLE `t_pro_role_repulsion` ( `id` bigint(20) NOT NULL, `role_id` bigint(20) NULL DEFAULT 0 COMMENT '角色id', `repulsion_role_id` bigint(20) NULL DEFAULT 0 COMMENT '被排斥的角色id', `operator` bigint(20) NULL DEFAULT 0 COMMENT '操作人id', `created_at` timestamp NOT NULL DEFAULT current_timestamp, `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0, PRIMARY KEY (`id`) USING BTREE, INDEX `repulsion_index`(`role_id`) USING BTREE, INDEX `repulsion_role_index`(`repulsion_role_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色互斥表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_pro_role_show -- ---------------------------- DROP TABLE IF EXISTS `t_pro_role_show`; CREATE TABLE `t_pro_role_show` ( `id` bigint(20) NOT NULL, `user_id` bigint(20) NULL DEFAULT 0 COMMENT '用户id', `project_id` bigint(20) NULL DEFAULT 0 COMMENT '项目id', `role_id` bigint(20) NULL DEFAULT 0 COMMENT '角色id', `operator` bigint(20) NULL DEFAULT 0 COMMENT '操作人id', `created_at` timestamp NOT NULL DEFAULT current_timestamp, `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0, `sequence` int(11) NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE, INDEX `role_show_user_index`(`user_id`) USING BTREE, INDEX `role_show_project_index`(`project_id`) USING BTREE, INDEX `role_show_role_index`(`role_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色栏展示表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_pro_role_task -- ---------------------------- DROP TABLE IF EXISTS `t_pro_role_task`; CREATE TABLE `t_pro_role_task` ( `id` bigint(20) NOT NULL, `role_id` bigint(20) NULL DEFAULT 0 COMMENT '角色id', `task_id` bigint(20) NULL DEFAULT 0 COMMENT '任务id', `operator` bigint(20) NULL DEFAULT 0 COMMENT '操作人id', `created_at` timestamp NOT NULL DEFAULT current_timestamp, `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0, PRIMARY KEY (`id`) USING BTREE, INDEX `role_task_role_index`(`role_id`) USING BTREE, INDEX `role_task_task_index`(`task_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色任务关联表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_pro_task_detail -- ---------------------------- DROP TABLE IF EXISTS `t_pro_task_detail`; CREATE TABLE `t_pro_task_detail` ( `id` bigint(20) NOT NULL, `name` varchar(225) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '任务名称', `description` varchar(225) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '任务描述', `cycle` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '重复频率', `created_at` timestamp NOT NULL DEFAULT current_timestamp, `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务详情表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_pro_task_flow -- ---------------------------- DROP TABLE IF EXISTS `t_pro_task_flow`; CREATE TABLE `t_pro_task_flow` ( `id` bigint(20) NOT NULL, `task_detail_id` bigint(20) NULL DEFAULT 0 COMMENT '任务详情id', `flow_type` bigint(20) NULL DEFAULT -1 COMMENT '流转策略(-1-不切换,0-时间到立即奇幻,其他-最多等待多少秒)', `jump_task_detail_id` int(10) NULL DEFAULT 0 COMMENT '跳转的任务详情id', `created_at` timestamp NOT NULL DEFAULT current_timestamp, `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0, PRIMARY KEY (`id`) USING BTREE, INDEX `jump_index`(`jump_task_detail_id`) USING BTREE, INDEX `task_index`(`task_detail_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务流转表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_pro_task_notify -- ---------------------------- DROP TABLE IF EXISTS `t_pro_task_notify`; CREATE TABLE `t_pro_task_notify` ( `id` bigint(20) NOT NULL, `task_detail_id` bigint(20) NULL DEFAULT 0 COMMENT '任务详情id', `lifecycle` tinyint(1) NULL DEFAULT 0 COMMENT '生命周期', `path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '路径', `appoint_param` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '指定参数', `notify_type` tinyint(1) NULL DEFAULT 0 COMMENT '通知方式(不通知,HTTP,消息系统)', `created_at` timestamp NOT NULL DEFAULT current_timestamp, `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0, PRIMARY KEY (`id`) USING BTREE, INDEX `task_index`(`task_detail_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务通知表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_pro_task_panel_info -- ---------------------------- DROP TABLE IF EXISTS `t_pro_task_panel_info`; CREATE TABLE `t_pro_task_panel_info` ( `id` bigint(20) NOT NULL, `task_detail_id` bigint(20) NULL DEFAULT 0 COMMENT '任务详情id', `back_color` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '背景色', `round_corner` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '圆角', `border` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '边框', `shadow` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '阴影', `width` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '宽', `height` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '高', `created_at` timestamp NOT NULL DEFAULT current_timestamp, `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0, `row` int(11) NULL DEFAULT 1 COMMENT '行', `col` int(11) NULL DEFAULT 1 COMMENT '列', PRIMARY KEY (`id`) USING BTREE, INDEX `task_index`(`task_detail_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务面板信息表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_pro_task_plugin -- ---------------------------- DROP TABLE IF EXISTS `t_pro_task_plugin`; CREATE TABLE `t_pro_task_plugin` ( `id` bigint(20) NOT NULL, `param` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '参数', `plgin_row` int(10) NULL DEFAULT 0 COMMENT '插件行', `plgin_col` int(10) NULL DEFAULT 0 COMMENT '插件列', `task_detail_id` bigint(20) NULL DEFAULT 0 COMMENT '任务详情id', `plugin_id` bigint(20) NULL DEFAULT 0 COMMENT '插件id', `created_at` timestamp NOT NULL DEFAULT current_timestamp, `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0, `colspan` int(11) NULL DEFAULT 0 COMMENT '跨列', `rowspan` int(11) NULL DEFAULT 0 COMMENT '跨行', PRIMARY KEY (`id`) USING BTREE, INDEX `task_index`(`task_detail_id`) USING BTREE, INDEX `plugin_index`(`plugin_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务插件关联表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_pro_task_process -- ---------------------------- DROP TABLE IF EXISTS `t_pro_task_process`; CREATE TABLE `t_pro_task_process` ( `id` bigint(20) NOT NULL, `task_detail_id` bigint(20) NULL DEFAULT 0 COMMENT '任务详情id', `next_task_detail_id` bigint(20) NULL DEFAULT 0 COMMENT '下一个任务id', `process_type` tinyint(1) NULL DEFAULT 0 COMMENT '关联类型(0开始前,1开始时,2开始后,3结束前,4结束时,5结束后)', `time_difference` bigint(20) NULL DEFAULT 0 COMMENT '关联的绝对时间', `created_at` timestamp NOT NULL DEFAULT current_timestamp, `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0, PRIMARY KEY (`id`) USING BTREE, INDEX `task_index`(`task_detail_id`) USING BTREE, INDEX `next_task_index`(`next_task_detail_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务上下道工序表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_pro_task_share -- ---------------------------- DROP TABLE IF EXISTS `t_pro_task_share`; CREATE TABLE `t_pro_task_share` ( `id` bigint(20) NOT NULL, `original_project_id` bigint(20) NULL DEFAULT 0 COMMENT '原项目id', `share_user_id` bigint(20) NULL DEFAULT 0 COMMENT '分享人id', `share_type` tinyint(1) NULL DEFAULT 0 COMMENT '分享类型(0-分享,1-体验)', `share_project_id` bigint(20) NULL DEFAULT 0 COMMENT '分享项目id', `created_at` timestamp NOT NULL DEFAULT current_timestamp, `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0, PRIMARY KEY (`id`) USING BTREE, INDEX `original_project_index`(`original_project_id`) USING BTREE, INDEX `share_user_index`(`share_user_id`) USING BTREE, INDEX `share_project_index`(`share_project_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务分享表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_pro_task_status_record -- ---------------------------- DROP TABLE IF EXISTS `t_pro_task_status_record`; CREATE TABLE `t_pro_task_status_record` ( `id` bigint(20) NOT NULL, `task_sub_id` bigint(20) NULL DEFAULT 0 COMMENT '任务分解id', `user_id` bigint(20) NULL DEFAULT 0 COMMENT '用户id', `task_status` tinyint(1) NULL DEFAULT 0 COMMENT '任务状态(开始,暂停,继续,结束)', `update_status_time` bigint(20) NULL DEFAULT 0 COMMENT '状态改变的时间', `created_at` timestamp NOT NULL DEFAULT current_timestamp, `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0, PRIMARY KEY (`id`) USING BTREE, INDEX `task_sub_index`(`task_sub_id`) USING BTREE, INDEX `user_index`(`user_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务状态记录表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_pro_task_sub -- ---------------------------- DROP TABLE IF EXISTS `t_pro_task_sub`; CREATE TABLE `t_pro_task_sub` ( `id` bigint(20) NOT NULL, `plan_start_time` bigint(20) NULL DEFAULT 0 COMMENT '计划开始时间', `plan_duration` bigint(20) NULL DEFAULT 0 COMMENT '计划时长', `plan_end_time` bigint(20) NULL DEFAULT 0 COMMENT '计划结束时间', `real_start_time` bigint(20) NULL DEFAULT 0 COMMENT '实际开始时间', `real_duration` bigint(20) NULL DEFAULT 0 COMMENT '实际时长', `real_end_time` bigint(20) NULL DEFAULT 0 COMMENT '计划结束时间', `task_status` tinyint(1) NULL DEFAULT 0 COMMENT '任务完成状态 0未开始 1进行中 2暂停 3完成', `task_detail_id` bigint(20) NULL DEFAULT 0 COMMENT '任务详情id', `created_at` timestamp NOT NULL DEFAULT current_timestamp, `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0, PRIMARY KEY (`id`) USING BTREE, INDEX `task_detail_index`(`task_detail_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务分解表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_pro_task_version -- ---------------------------- DROP TABLE IF EXISTS `t_pro_task_version`; CREATE TABLE `t_pro_task_version` ( `id` bigint(20) NOT NULL, `task_detail_id` bigint(20) NULL DEFAULT 0 COMMENT '任务详情id', `task_version_info` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '版本信息', `project_type` tinyint(1) NULL DEFAULT 0 COMMENT '类型(0-普通,1-模板,2-常驻)', `created_at` timestamp NOT NULL DEFAULT current_timestamp, `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0, `address` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE, INDEX `task_index`(`task_detail_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务版本表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_qcp_attendance_record -- ---------------------------- DROP TABLE IF EXISTS `t_qcp_attendance_record`; CREATE TABLE `t_qcp_attendance_record` ( `id` bigint(20) NOT NULL, `first_aid_id` bigint(20) NULL DEFAULT 0 COMMENT '急救id', `step_id` bigint(20) NULL DEFAULT 0 COMMENT '环节id', `rfid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'rfid(全编码)', `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '医生名字', `user_id` bigint(20) NULL DEFAULT 0 COMMENT '录入人', `type` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '录入人类型(0平车 1人)', `time` bigint(20) NULL DEFAULT 0 COMMENT '到场时间', `operator` bigint(20) NULL DEFAULT 0 COMMENT '操作人id', `created_at` timestamp NOT NULL DEFAULT current_timestamp, `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', PRIMARY KEY (`id`) USING BTREE, INDEX `attendance_first_aid_index`(`first_aid_id`) USING BTREE, INDEX `attendance_step_index`(`step_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '到场记录表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_qcp_car_record -- ---------------------------- DROP TABLE IF EXISTS `t_qcp_car_record`; CREATE TABLE `t_qcp_car_record` ( `id` bigint(20) NOT NULL, `car_id` bigint(20) NULL DEFAULT 0 COMMENT '平车id', `type` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '类型 0开始 1体重 2rfid, 3称重一 4称重二 5称重三 6称重四 7震动 8剂量', `car_value` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '数据', `time` bigint(20) NULL DEFAULT 0 COMMENT '记录时间', `operator` bigint(20) NULL DEFAULT 0 COMMENT '操作人id', `created_at` timestamp NOT NULL DEFAULT current_timestamp, `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', PRIMARY KEY (`id`) USING BTREE, INDEX `rfid_car_index`(`car_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '平车记录表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_qcp_code_dictionaries -- ---------------------------- DROP TABLE IF EXISTS `t_qcp_code_dictionaries`; CREATE TABLE `t_qcp_code_dictionaries` ( `id` bigint(20) NOT NULL, `question` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '题目', `question_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '题目code', `parent_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '上级code', `hospital_id` bigint(20) NULL DEFAULT 0 COMMENT '医院id', `task_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '急救任务名', `step_id` bigint(20) NULL DEFAULT 0 COMMENT '环节id', `operator` bigint(20) NULL DEFAULT 0 COMMENT '操作人id', `created_at` timestamp NOT NULL DEFAULT current_timestamp, `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', PRIMARY KEY (`id`) USING BTREE, INDEX `dictionaries_step_index`(`step_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = 'code字典表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_qcp_doctor -- ---------------------------- DROP TABLE IF EXISTS `t_qcp_doctor`; CREATE TABLE `t_qcp_doctor` ( `id` bigint(20) NOT NULL, `post` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '职位(0-急诊护士,1-急诊医生,2-卒中医生,3-神内医生,4-神外医生,5-卒中中心主任)', `department` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '部门(0-xxx,1-xxx)', `hospital_id` bigint(20) NULL DEFAULT 0 COMMENT '医院id', `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '名称', `serial` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '编号', `phone` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '手机号', `gender` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '性别 0女 1男', `rfid` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'rfid(全编码)', `user_id` bigint(20) NULL DEFAULT 0 COMMENT 'userId', `operator` bigint(20) NULL DEFAULT 0 COMMENT '操作人id', `created_at` timestamp NOT NULL DEFAULT current_timestamp, `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', PRIMARY KEY (`id`) USING BTREE, INDEX `doctor_hospital_index`(`hospital_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '医生表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_qcp_first_aid -- ---------------------------- DROP TABLE IF EXISTS `t_qcp_first_aid`; CREATE TABLE `t_qcp_first_aid` ( `id` bigint(20) NOT NULL, `patient_id` bigint(20) NULL DEFAULT 0 COMMENT '患者id', `project_id` bigint(20) NULL DEFAULT 0 COMMENT '项目id', `type` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '急救类型(0:卒中)', `value_type` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '数据类型(0正式 1演示)', `save_type` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '信息来源 0手动添加 1平车自动添加', `kinsfolk_phone` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '亲属电话', `medical_record_num` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '病案号', `parient_sn` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '患者手环SN号', `time` bigint(20) NULL DEFAULT 0 COMMENT '发病时间', `hospital_stroke` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '是否院内卒中', `arrive_hospital_time` bigint(20) NULL DEFAULT 0 COMMENT '到院时间', `hospitalized_time` bigint(20) NULL DEFAULT 0 COMMENT '住院时间', `last_normal_time` bigint(20) NULL DEFAULT 0 COMMENT '最后正常时间', `pathway` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '入院途径(急诊/门诊/其他医疗机构转入/其他(填空,非必填))', `in_hospital_type` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '来院方式(1本院急救车 2当地120 3网络协作医院转入 4非网络协作医院转入 5自行来院绑定平车)', `operator` bigint(20) NULL DEFAULT 0 COMMENT '操作人id', `created_at` timestamp NOT NULL DEFAULT current_timestamp, `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', PRIMARY KEY (`id`) USING BTREE, INDEX `first_aid_parient_index`(`patient_id`) USING BTREE, INDEX `first_aid_project_index`(`project_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '患者急救信息表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_qcp_first_aid_message -- ---------------------------- DROP TABLE IF EXISTS `t_qcp_first_aid_message`; CREATE TABLE `t_qcp_first_aid_message` ( `id` bigint(20) NOT NULL, `first_aid_id` bigint(20) NULL DEFAULT 0 COMMENT '急救id', `content` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '消息内容', `to_user` bigint(20) NULL DEFAULT 0 COMMENT '接收人 0表示全部人,>0则为指定人', `operator` bigint(20) NULL DEFAULT 0 COMMENT '操作人id', `created_at` timestamp NOT NULL DEFAULT current_timestamp, `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', PRIMARY KEY (`id`) USING BTREE, INDEX `message_first_aid_index`(`first_aid_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '急救消息通知表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_qcp_first_aid_record -- ---------------------------- DROP TABLE IF EXISTS `t_qcp_first_aid_record`; CREATE TABLE `t_qcp_first_aid_record` ( `id` bigint(20) NOT NULL, `first_aid_id` bigint(20) NULL DEFAULT 0 COMMENT '急救id', `question_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '题目code', `answer` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '题目答案', `submit_user_id` bigint(20) NULL DEFAULT 0 COMMENT '答案提交人', `submit_user_type` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '提交人类型(0平车 1人)', `operator` bigint(20) NULL DEFAULT 0 COMMENT '操作人id', `created_at` timestamp NOT NULL DEFAULT current_timestamp, `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', PRIMARY KEY (`id`) USING BTREE, INDEX `record_first_aid_index`(`first_aid_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '急救记录表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_qcp_first_aid_record_log -- ---------------------------- DROP TABLE IF EXISTS `t_qcp_first_aid_record_log`; CREATE TABLE `t_qcp_first_aid_record_log` ( `id` bigint(20) NOT NULL, `first_aid_id` bigint(20) NULL DEFAULT 0 COMMENT '急救id', `question_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '题目code', `answer` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '题目答案', `submit_user_id` bigint(20) NULL DEFAULT 0 COMMENT '答案提交人', `submit_user_type` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '提交人类型(0平车 1人)', `operator` bigint(20) NULL DEFAULT 0 COMMENT '操作人id', `created_at` timestamp NOT NULL DEFAULT current_timestamp, `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', PRIMARY KEY (`id`) USING BTREE, INDEX `record_first_aid_index`(`first_aid_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '急救记录日志表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_qcp_first_aid_standard -- ---------------------------- DROP TABLE IF EXISTS `t_qcp_first_aid_standard`; CREATE TABLE `t_qcp_first_aid_standard` ( `id` bigint(20) NOT NULL, `type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '类型 0国际 1医院本身', `hospital_id` bigint(20) NULL DEFAULT 0 COMMENT '医院id', `step_id` bigint(20) NULL DEFAULT 0 COMMENT '环节id', `duration` bigint(20) NULL DEFAULT 0 COMMENT '该环节的时长', `created_at` timestamp NOT NULL DEFAULT current_timestamp, `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', PRIMARY KEY (`id`) USING BTREE, INDEX `standard_hospital_index`(`hospital_id`) USING BTREE, INDEX `standard_step_index`(`step_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '急救标准表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_qcp_hospital -- ---------------------------- DROP TABLE IF EXISTS `t_qcp_hospital`; CREATE TABLE `t_qcp_hospital` ( `id` bigint(20) NOT NULL, `serial` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '编码(对应rfid的医院编码)', `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '医院名称', `short_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '医院简称', `introduce` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '医院介绍', `operator` bigint(20) NULL DEFAULT 0 COMMENT '操作人id', `created_at` timestamp NOT NULL DEFAULT current_timestamp, `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '医院表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_qcp_patient -- ---------------------------- DROP TABLE IF EXISTS `t_qcp_patient`; CREATE TABLE `t_qcp_patient` ( `id` bigint(20) NOT NULL, `name` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '姓名', `gender` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '性别', `age` int(11) NULL DEFAULT 0 COMMENT '年龄', `nation` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '民族', `idcard` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '身份证号', `phone` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '联系电话', `hospital_id` bigint(20) NULL DEFAULT 0 COMMENT '医院id', `user_id` bigint(20) NULL DEFAULT 0 COMMENT 'userId', `operator` bigint(20) NULL DEFAULT 0 COMMENT '操作人id', `created_at` timestamp NOT NULL DEFAULT current_timestamp, `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', PRIMARY KEY (`id`) USING BTREE, INDEX `patient_hospital_index`(`hospital_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '患者信息表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_qcp_patient_wisdom_car -- ---------------------------- DROP TABLE IF EXISTS `t_qcp_patient_wisdom_car`; CREATE TABLE `t_qcp_patient_wisdom_car` ( `id` bigint(20) NOT NULL, `first_aid_id` bigint(20) NULL DEFAULT 0 COMMENT '急救id', `car_id` bigint(20) NULL DEFAULT 0 COMMENT '平车id', `start_time` bigint(20) NULL DEFAULT 0 COMMENT '开始时间', `end_time` bigint(20) NULL DEFAULT 0 COMMENT '结束时间', `operator` bigint(20) NULL DEFAULT 0 COMMENT '操作人id', `created_at` timestamp NOT NULL DEFAULT current_timestamp, `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', PRIMARY KEY (`id`) USING BTREE, INDEX `first_aid_index`(`first_aid_id`) USING BTREE, INDEX `car_index`(`car_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '患者平车绑定表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_qcp_rfid -- ---------------------------- DROP TABLE IF EXISTS `t_qcp_rfid`; CREATE TABLE `t_qcp_rfid` ( `id` bigint(20) NOT NULL, `hospital_serial` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '医院编码(对应医院编码)', `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '名字', `type1` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '分类1 01:流程 02:地点 03:人员', `type2` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '分类2 00:-- 01:急诊科 02:神经内科 03:轮转', `type3` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '分类3 00:-- 01:主任 02:组长 03:医生 04:护士长 05:护士', `serial` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'rfid编码(兼容旧数据)', `full_serial` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'rfid完整编码(真正rfid)', `step_id` bigint(20) NULL DEFAULT 0 COMMENT '环节id', `operator` bigint(20) NULL DEFAULT 0 COMMENT '操作人id', `created_at` timestamp NOT NULL DEFAULT current_timestamp, `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', PRIMARY KEY (`id`) USING BTREE, INDEX `rfid_step_index`(`step_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = 'rfid表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_qcp_step -- ---------------------------- DROP TABLE IF EXISTS `t_qcp_step`; CREATE TABLE `t_qcp_step` ( `id` bigint(20) NOT NULL, `code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '环节code', `name` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '环节名称', `type` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '环节类型。0真正的环节,1rfid的环节', `sequence` int(11) NULL DEFAULT 0 COMMENT '顺序', `start_effect_time` bigint(20) NULL DEFAULT 0 COMMENT '生效时间', `end_effect_time` bigint(20) NULL DEFAULT 0 COMMENT '失效时间', `hospital_id` bigint(20) NULL DEFAULT 0 COMMENT '医院id', `operator` bigint(20) NULL DEFAULT 0 COMMENT '操作人id', `created_at` timestamp NOT NULL DEFAULT current_timestamp, `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', PRIMARY KEY (`id`) USING BTREE, INDEX `step_hospital_index`(`hospital_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '平车记录表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_qcp_wisdom_car -- ---------------------------- DROP TABLE IF EXISTS `t_qcp_wisdom_car`; CREATE TABLE `t_qcp_wisdom_car` ( `id` bigint(20) NOT NULL, `serial` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '编号', `warehouse_time` bigint(20) NULL DEFAULT 0 COMMENT '入库时间', `hospital_id` bigint(20) NULL DEFAULT 0 COMMENT '医院id', `user_id` bigint(20) NULL DEFAULT 0 COMMENT 'userId(大屏)', `operator` bigint(20) NULL DEFAULT 0 COMMENT '操作人id', `created_at` timestamp NOT NULL DEFAULT current_timestamp, `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', PRIMARY KEY (`id`) USING BTREE, INDEX `wisdom_car_hospital_index`(`hospital_id`) USING BTREE, INDEX `wisdom_car_user_index`(`user_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '平车表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_qcp_working -- ---------------------------- DROP TABLE IF EXISTS `t_qcp_working`; CREATE TABLE `t_qcp_working` ( `id` bigint(20) NOT NULL, `doctor_id` bigint(20) NULL DEFAULT 0 COMMENT '医生id', `start_time` bigint(20) NULL DEFAULT 0 COMMENT '开始时间', `end_time` bigint(20) NULL DEFAULT 0 COMMENT '结束时间', `post` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '职位(0-急诊护士,1-急诊医生,2-专科医生,3-分诊台,4-主任)', `operator` bigint(20) NULL DEFAULT 0 COMMENT '操作人id', `created_at` timestamp NOT NULL DEFAULT current_timestamp, `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', PRIMARY KEY (`id`) USING BTREE, INDEX `wroking_doctor_index`(`doctor_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '医生值班表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_statistics_month -- ---------------------------- DROP TABLE IF EXISTS `t_statistics_month`; CREATE TABLE `t_statistics_month` ( `id` bigint(20) NOT NULL, `name` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '月份名', `created_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, `updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '统计月份表 1至12月' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_sys_log -- ---------------------------- DROP TABLE IF EXISTS `t_sys_log`; CREATE TABLE `t_sys_log` ( `id` bigint(20) NOT NULL, `url` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '接口路径', `method_desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '接口描述', `params` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '接口参数', `result` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '接口返回值(或异常)', `facility` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '设备信息', `user_id` bigint(20) NULL DEFAULT 0 COMMENT '用户id', `operator` bigint(20) NULL DEFAULT 0 COMMENT '操作人id', `created_at` timestamp NULL DEFAULT current_timestamp, `updated_at` timestamp NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, `rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '日志表' ROW_FORMAT = Dynamic; SET FOREIGN_KEY_CHECKS = 1;