From 572d3225bdfde4c2a9b27b2956d440dc0ff1444d Mon Sep 17 00:00:00 2001 From: zy_Java <654600784@qq.com> Date: Wed, 20 Oct 2021 11:16:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E8=B7=B3=E7=BB=B3=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 内部项目/QCP.sql | 775 ++++++++++++++++++++++++++++++++++++++++ 内部项目/defaultwbs.sql | 51 +++ 内部项目/sports.sql | 269 ++++++++++++++ 内部项目/tall3通用.sql | 21 +- 4 files changed, 1113 insertions(+), 3 deletions(-) create mode 100644 内部项目/QCP.sql create mode 100644 内部项目/defaultwbs.sql create mode 100644 内部项目/sports.sql diff --git a/内部项目/QCP.sql b/内部项目/QCP.sql new file mode 100644 index 0000000..83622fe --- /dev/null +++ b/内部项目/QCP.sql @@ -0,0 +1,775 @@ +/* + 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; diff --git a/内部项目/defaultwbs.sql b/内部项目/defaultwbs.sql new file mode 100644 index 0000000..b7989d0 --- /dev/null +++ b/内部项目/defaultwbs.sql @@ -0,0 +1,51 @@ +CREATE TABLE `t_pro_clocking_in` ( + `id` bigint(20) NOT NULL, + `member_id` bigint(20) DEFAULT 0 COMMENT '打卡成员id', + `checker_id` bigint(20) DEFAULT 0 COMMENT '检查人成员id', + `morning` bigint(20) DEFAULT 0 COMMENT '早打卡时间', + `morning_status` tinyint(1) DEFAULT 0 COMMENT '早打卡状态(0未打卡,1已打卡,2驳回,3审核通过)', + `night` bigint(20) DEFAULT 0 COMMENT '晚打卡时间', + `night_status` tinyint(1) DEFAULT 0 COMMENT '晚打卡状态(0未打卡,1已打卡,2驳回,3审核通过)', + `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 DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE, + KEY `checker_index` (`checker_id`) USING BTREE, + KEY `member_index` (`member_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='打卡记录表'; + + +CREATE TABLE `t_pro_deliver` ( + `id` bigint(20) NOT NULL, + `task_sub_id` bigint(20) DEFAULT 0 COMMENT '任务分解id', + `member_id` bigint(20) DEFAULT 0 COMMENT '上传成员id', + `file_id` bigint(20) DEFAULT 0 COMMENT '文件id', + `file_path` varchar(255) DEFAULT '' COMMENT '文件观看路径', + `content` varchar(255) DEFAULT '' COMMENT '文本内容(可以是链接)', + `project_id` bigint(20) DEFAULT 0 COMMENT '项目id', + `time` bigint(20) 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 DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE, + KEY `member_index` (`member_id`) USING BTREE, + KEY `task_sub_id_index` (`task_sub_id`) USING BTREE, + KEY `file_index` (`file_id`) USING BTREE, + KEY `project_index` (`project_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='交付物表'; + + +CREATE TABLE `t_pro_deliver_checker` ( + `id` bigint(20) NOT NULL, + `deliver_id` bigint(20) DEFAULT 0 COMMENT '交付物id', + `member_id` bigint(20) DEFAULT 0 COMMENT '检查人成员id', + `score` varchar(10) DEFAULT '' COMMENT '分数', + `remark` varchar(255) DEFAULT '' COMMENT '备注', + `status` tinyint(1) 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 DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE, + KEY `deliver_index` (`deliver_id`) USING BTREE, + KEY `member_index` (`member_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='交付物检查表'; \ No newline at end of file diff --git a/内部项目/sports.sql b/内部项目/sports.sql new file mode 100644 index 0000000..19c9a79 --- /dev/null +++ b/内部项目/sports.sql @@ -0,0 +1,269 @@ +-- tall3-通用表 + +-- 文件表 +CREATE TABLE `t_file_commit` ( + `id` bigint(20) NOT NULL, + `name` varchar(64) DEFAULT '' COMMENT '文件名', + `path` varchar(128) DEFAULT '' COMMENT '文件路径', + `visit_path` varchar(512) DEFAULT '' COMMENT '访问路径', + `md5` varchar(32) DEFAULT '', + `sha1` varchar(40) DEFAULT '', + `time` bigint(20) DEFAULT 0 COMMENT '上传的时间', + `count` int(11) DEFAULT 0 COMMENT '被引用的次数', + `status` tinyint(1) unsigned DEFAULT 1 COMMENT '文件状态 0:未上传 1:全部上传', + + `operator` bigint(20) 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 DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='文件信息表'; + +-- 机构表 +-- 名字 +-- 上级id + +CREATE TABLE `t_organization` ( + `id` bigint(20) NOT NULL, + `organization_type` tinyint(2) DEFAULT 0 COMMENT '职位归属0:体育局 1:省跳协 2:市跳协', + `code` varchar(64) DEFAULT '' COMMENT '机构编码', + `name` varchar(64) DEFAULT '' COMMENT '机构名称', + `short_name` varchar(64) DEFAULT '' COMMENT '机构简称', + `introduce` varchar(256) DEFAULT '' COMMENT '机构介绍', + `parent_id` bigint(20) DEFAULT 0 COMMENT '上级机构id', + + `operator` bigint(20) 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 DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + KEY `organization_index` (`parent_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='机构表'; + + +-- 协会成员表 +-- 姓名 +-- 手机号 +-- 机构id +-- userId + +CREATE TABLE `t_organization_member` ( + `id` bigint(20) NOT NULL, + `user_id` bigint(20) DEFAULT 0 COMMENT 'userId', + `name` varchar(64) DEFAULT '' COMMENT '成员名称', + `phone` varchar(64) DEFAULT '' COMMENT '联系方式', + `organization_id` bigint(20) DEFAULT 0 COMMENT '机构id', + + `operator` bigint(20) 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 DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + KEY `member_user_index` (`user_id`) USING BTREE, + KEY `member_organization_index` (`organization_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='机构成员表'; + +-- 成员职位表 +DROP TABLE IF EXISTS `t_organization_member_position`; +CREATE TABLE `t_organization_member_position` ( + `id` bigint(20) NOT NULL, + `org_member_id` bigint(20) DEFAULT 0 COMMENT '机构成员id', + `org_id` bigint(20) DEFAULT 0 COMMENT '机构id', + `position` tinyint(2) unsigned DEFAULT 0 COMMENT '职位 0运动员 1裁判员 2导师 3秘书长 4主席', + + `operator` bigint(20) 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 DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + KEY `position_member_index` (`org_member_id`) USING BTREE, + KEY `position_org_index` (`org_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='成员职位表'; + +-- 导师表 +-- 机构成员id +-- 培训计划id +-- 是否接受委托 +DROP TABLE IF EXISTS `t_training_plan_teacher`; +CREATE TABLE `t_training_plan_teacher` ( + `id` bigint(20) NOT NULL, + `organization_member_id` bigint(20) DEFAULT 0 COMMENT '机构成员id', + `training_plan_id` bigint(20) NULL DEFAULT 0 COMMENT '培训计划id', + `check_status` tinyint(1) unsigned DEFAULT 0 COMMENT '是否已经接受委托 0未接受 1已接受 2已拒绝', + `reject_cause` varchar(512) DEFAULT '' COMMENT '驳回原因', + + `operator` bigint(20) 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 DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + KEY `teacher_member_index` (`organization_member_id`) USING BTREE, + KEY `teacher_plan_index` (`training_plan_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='培训导师表'; + +-- 红头文件模板表 +-- 文件名 +-- 所属机构 +-- 文件id +-- 上传人 +-- 类型 +CREATE TABLE `t_official_documents` ( + `id` bigint(20) NOT NULL, + `submit_id` bigint(20) DEFAULT 0 COMMENT 'userId', + `name` varchar(64) DEFAULT '' COMMENT '名称', + `organization_id` bigint(20) DEFAULT 0 COMMENT '机构id', + `file_id` bigint(20) NULL DEFAULT 0 COMMENT '文件id', + `type` tinyint(2) unsigned DEFAULT 0 COMMENT '类型 0培训计划 1运动员证书 2教练证书 ', + + `operator` bigint(20) 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 DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + KEY `official_documents_submit_index` (`submit_id`) USING BTREE, + KEY `official_documents_organization_index` (`organization_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='红头文件模板表'; + +-- 项目模板关联表 +-- 项目id +-- 模板id +CREATE TABLE `t_project_official_documents` ( + `id` bigint(20) NOT NULL, + `project_id` bigint(20) DEFAULT 0 COMMENT '项目id', + `documents_id` bigint(20) DEFAULT 0 COMMENT '模板id', + + `operator` bigint(20) 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 DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + KEY `project_official_project_index` (`project_id`) USING BTREE, + KEY `project_official_documents_index` (`documents_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='项目模板关联表'; + + + +-- 培训计划表 +-- 名称 +-- 详情 +-- 开始时间 +-- 结束时间 +-- 文件id +-- 文件路径 +-- 提交人 +-- 项目id +-- 是否审批 +CREATE TABLE `t_training_plan` ( + `id` bigint(20) NOT NULL, + `name` varchar(255) DEFAULT '' COMMENT '名称', + `description` varchar(1024) DEFAULT '' COMMENT '详情', + `start_time` bigint(20) NULL DEFAULT 0 COMMENT '开始时间', + `end_time` bigint(20) NULL DEFAULT 0 COMMENT '结束时间', + `file_id` bigint(20) NULL DEFAULT 0 COMMENT '文件id', + `visit_path` varchar(512) DEFAULT '' COMMENT '访问路径', + `submit_id` bigint(20) DEFAULT 0 COMMENT '提交人id', + `project_id` bigint(20) DEFAULT 0 COMMENT '项目id', + `check_status` tinyint(2) unsigned DEFAULT 0 COMMENT '审核状态 0已提交 1通过 2驳回', + `checker_id` bigint(20) DEFAULT 0 COMMENT '审核人id', + `reject_cause` varchar(512) DEFAULT '' COMMENT '驳回原因', + + `operator` bigint(20) 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 DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + KEY `plan_submit_index` (`submit_id`) USING BTREE, + KEY `plan_project_index` (`project_id`) USING BTREE, + KEY `plan_checker_index` (`checker_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='培训计划表'; + + +-- 选手表 +-- 姓名 +-- 年龄 +-- 性别 +-- 联系地址 +-- 手机号 +-- 等级id(爱好者,专业X级,教练) +DROP TABLE IF EXISTS `t_player`; +CREATE TABLE `t_player` ( + `id` bigint(20) NOT NULL, + `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '姓名', + `age` int(11) NULL DEFAULT 0 COMMENT '年龄', + `gender` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '性别 0女 1男', + `phone` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '联系方式', + `address` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '联系地址', + `id_card` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '身份证号', + `level_id` bigint(20) DEFAULT 0 COMMENT '等级id', + `user_id` bigint(20) DEFAULT 0 COMMENT 'userId', + + `operator` bigint(20) 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 DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + KEY `player_level_idndex` (`level_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='选手信息表'; + + +-- 报名表(学员报名的信息表,没有学员表) +-- 选手id +-- 培训目标(专业,教练员) +-- 是否缴费 +-- 是否结业 +-- 证书颁发状态 +-- 证书文件id +DROP TABLE IF EXISTS `t_player_apply`; +CREATE TABLE `t_player_apply` ( + `id` bigint(20) NOT NULL, + `training_plan_id` bigint(20) DEFAULT 0 COMMENT '培训计划id', + `player_id` bigint(20) DEFAULT 0 COMMENT '选手id', + `target_id` bigint(20) NULL DEFAULT 0 COMMENT '培训目标id', + `pay_status` tinyint(1) unsigned DEFAULT 0 COMMENT '缴费状态 0未交费 1已缴费', + `target_id` bigint(20) NULL DEFAULT 0 COMMENT '缴费凭证id', + `complete_status` tinyint(2) unsigned DEFAULT 0 COMMENT '结业状态 0未结业 1已申请 2已通过 3已驳回', + `certificate_status` tinyint(1) unsigned DEFAULT 0 COMMENT '证书颁发状态 0未发证 1已发证', + `file_id` bigint(20) DEFAULT 0 COMMENT '证书文件id', + + `operator` bigint(20) 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 DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + KEY `apply_player_index` (`player_id`) USING BTREE, + KEY `apply_target_index` (`target_id`) USING BTREE, + KEY `apply_training_plan_index` (`training_plan_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='选手报名信息表'; + +-- 运动员等级表 +-- 名字 +-- 描述 +CREATE TABLE `t_player_level` ( + `id` bigint(20) NOT NULL, + `name` varchar(255) DEFAULT '' COMMENT '名称', + `description` varchar(1024) DEFAULT '' COMMENT '详情', + + `operator` bigint(20) 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 DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='运动员等级表'; + +-- 运动员等级关联表 +-- 等级id +-- 可报名的等级id +CREATE TABLE `t_player_level_relevance` ( + `id` bigint(20) NOT NULL, + `level_id` bigint(20) DEFAULT 0 COMMENT '等级id', + `can_apply_level_id` bigint(20) DEFAULT 0 COMMENT '可以报名的等级id', + + `operator` bigint(20) 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 DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', + PRIMARY KEY (`id`) USING BTREE, + KEY `relevance_level_index` (`level_id`) USING BTREE, + KEY `relevance_can_apply_level_index` (`can_apply_level_id`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='运动员等级关联表'; + \ No newline at end of file diff --git a/内部项目/tall3通用.sql b/内部项目/tall3通用.sql index 8cb66e7..15a1ee8 100644 --- a/内部项目/tall3通用.sql +++ b/内部项目/tall3通用.sql @@ -565,8 +565,23 @@ CREATE TABLE `t_sys_log` ( PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '日志表' ROW_FORMAT = Compact; --- ---------------------------- --- Records of t_sys_log --- ---------------------------- SET FOREIGN_KEY_CHECKS = 1; + + + +DROP TABLE IF EXISTS `t_sys_holidays`; +CREATE TABLE `t_sys_holidays` ( + `id` bigint(20) NOT NULL, + `year` varchar(64) DEFAULT '' COMMENT '哪一年', + `holiday` varchar(64) DEFAULT '' COMMENT '假期', + `workday` varchar(64) DEFAULT '' COMMENT '调休', + + `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 = Compact; + +