Browse Source

20210513新建

master
zy_Java 4 years ago
commit
b9de47c5cf
  1. 164
      common.sql
  2. 96
      ct.sql
  3. 187
      form.sql
  4. 206
      game.sql
  5. 427
      health.sql
  6. 729
      ht.sql
  7. 141
      logisticspark.sql
  8. 914
      mt.sql
  9. 212
      pims.sql
  10. 654
      question.sql
  11. 1353
      tall.sql
  12. 338
      tcm.sql
  13. 217
      wisdomcar.sql
  14. 480
      yanyuan.sql

164
common.sql

@ -0,0 +1,164 @@
/*
Navicat Premium Data Transfer
Source Server :
Source Server Type : MariaDB
Source Server Version : 100318
Source Host : test.tall.wiki:3306
Source Schema : common
Target Server Type : MariaDB
Target Server Version : 100318
File Encoding : 65001
Date: 13/05/2021 15:09:17
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for t_feedback
-- ----------------------------
DROP TABLE IF EXISTS `t_feedback`;
CREATE TABLE `t_feedback` (
`id` bigint(20) NOT NULL,
`name` 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 '电话',
`mailbox` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '邮箱',
`content` varchar(512) 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 COMMENT '修改时间',
`rec_status` tinyint(1) NULL DEFAULT 0,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '反馈意见表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_file_chunk_log
-- ----------------------------
DROP TABLE IF EXISTS `t_file_chunk_log`;
CREATE TABLE `t_file_chunk_log` (
`id` bigint(20) NOT NULL,
`chunk_result_id` bigint(20) NOT NULL COMMENT '上传记录ID',
`num` int(11) NOT NULL COMMENT '当前为第几分片',
`size` bigint(20) NOT NULL COMMENT '每个分块的大小',
`path` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '分块文件路径',
`md5` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '',
`sha1` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '',
`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 `chunk_log_result_index`(`chunk_result_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文件分片上传记录表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_file_chunk_result
-- ----------------------------
DROP TABLE IF EXISTS `t_file_chunk_result`;
CREATE TABLE `t_file_chunk_result` (
`id` bigint(20) NOT NULL,
`user_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '用户ID',
`task_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '上传任务ID',
`link_id` bigint(20) NOT NULL COMMENT '文件ID',
`total` int(11) NOT NULL 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 `chunk_result_link_index`(`link_id`) USING BTREE,
INDEX `chunk_result_task_index`(`user_id`, `task_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文件分片上传结果' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_file_commit
-- ----------------------------
DROP TABLE IF EXISTS `t_file_commit`;
CREATE TABLE `t_file_commit` (
`id` bigint(20) NOT NULL,
`name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '文件名',
`path` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '文件路径',
`visit_path` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '访问路径',
`md5` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '',
`sha1` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '',
`time` bigint(20) NULL DEFAULT 0 COMMENT '上传的时间',
`count` int(11) NULL DEFAULT 0 COMMENT '被引用的次数',
`status` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '文件状态 0:未上传 1:全部上传',
`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 = Compact;
-- ----------------------------
-- Table structure for t_file_link
-- ----------------------------
DROP TABLE IF EXISTS `t_file_link`;
CREATE TABLE `t_file_link` (
`id` bigint(20) NOT NULL,
`user_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '用户ID',
`name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '文件名',
`commit_id` bigint(20) NOT NULL 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 `file_link_commit_index`(`commit_id`, `user_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文件引用表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_general_constant
-- ----------------------------
DROP TABLE IF EXISTS `t_general_constant`;
CREATE TABLE `t_general_constant` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`application` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '项目名称',
`data_key` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '',
`data_value` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '',
`description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '描述',
`data_type` tinyint(2) NOT NULL DEFAULT 0 COMMENT '数据类型0:string 1:list 2:set 3 sort set 4:hash',
`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 `constant_project_index`(`application`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '常量表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_general_db_config
-- ----------------------------
DROP TABLE IF EXISTS `t_general_db_config`;
CREATE TABLE `t_general_db_config` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`application` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '项目名称',
`url` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '配置路径',
`db` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '数据库名',
`hostname` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '地址',
`username` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户名',
`pwd` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '密码',
`db_port` int(11) NULL DEFAULT 0 COMMENT '端口号',
`db_type` tinyint(2) NOT NULL DEFAULT 0 COMMENT '数据库类型0:redis',
`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 `db_config_application_index`(`application`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据库配置表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_league
-- ----------------------------
DROP TABLE IF EXISTS `t_league`;
CREATE TABLE `t_league` (
`id` bigint(20) NOT NULL,
`company_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '公司名',
`linkman` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '联系人',
`linkman_phone` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '联系电话',
`linkman_post` varchar(64) 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 COMMENT '修改时间',
`rec_status` tinyint(1) NULL DEFAULT 0,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '联盟表' ROW_FORMAT = Compact;
SET FOREIGN_KEY_CHECKS = 1;

96
ct.sql

@ -0,0 +1,96 @@
/*
Navicat Premium Data Transfer
Source Server :
Source Server Type : MariaDB
Source Server Version : 100318
Source Host : test.tall.wiki:3306
Source Schema : ct
Target Server Type : MariaDB
Target Server Version : 100318
File Encoding : 65001
Date: 13/05/2021 15:10:11
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for t_business
-- ----------------------------
DROP TABLE IF EXISTS `t_business`;
CREATE TABLE `t_business` (
`id` bigint(20) NOT NULL,
`name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '商户名',
`address` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '地址',
`applicant_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '申请人姓名',
`applicant_id_card` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '申请人身份证号',
`applicant_phone` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '申请人手机号',
`business_license` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '营业执照',
`qr_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '公众号二维码',
`user_id` bigint(20) NULL DEFAULT 0 COMMENT '申请人的userid',
`passed` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '是否通过审核 0未通过 1通过',
`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 `user_index`(`user_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商户表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_site
-- ----------------------------
DROP TABLE IF EXISTS `t_site`;
CREATE TABLE `t_site` (
`id` bigint(20) NOT NULL,
`business_id` bigint(20) NULL DEFAULT 0 COMMENT '商户id',
`site_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '场馆名',
`site_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '场馆code',
`longitude` decimal(5, 2) NULL DEFAULT 0.00 COMMENT '经度',
`latitude` decimal(5, 2) NULL DEFAULT 0.00 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 `business_index`(`business_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '场所表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_site_clock_in
-- ----------------------------
DROP TABLE IF EXISTS `t_site_clock_in`;
CREATE TABLE `t_site_clock_in` (
`id` bigint(20) NOT NULL,
`qrcode_id` bigint(20) NULL DEFAULT 0 COMMENT '二维码id',
`time` bigint(20) NULL DEFAULT 0 COMMENT '打卡时间',
`longitude` decimal(5, 2) NULL DEFAULT 0.00 COMMENT '经度',
`latitude` decimal(5, 2) NULL DEFAULT 0.00 COMMENT '纬度',
`user_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 `qrcode_index`(`qrcode_id`) USING BTREE,
INDEX `user_index`(`user_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '打卡记录' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_site_qrcode
-- ----------------------------
DROP TABLE IF EXISTS `t_site_qrcode`;
CREATE TABLE `t_site_qrcode` (
`id` bigint(20) NOT NULL,
`site_id` bigint(20) NULL DEFAULT 0 COMMENT '场馆id',
`out_or_in` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '进or出 0进 1出',
`qrcode_path` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '二维码路径',
`big_qrcode_path` varchar(255) CHARACTER SET utf8 COLLATE utf8_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,
INDEX `site_index`(`site_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '场所二维码表' ROW_FORMAT = Compact;
SET FOREIGN_KEY_CHECKS = 1;

187
form.sql

@ -0,0 +1,187 @@
/*
Navicat Premium Data Transfer
Source Server :
Source Server Type : MariaDB
Source Server Version : 100318
Source Host : test.tall.wiki:3306
Source Schema : form
Target Server Type : MariaDB
Target Server Version : 100318
File Encoding : 65001
Date: 13/05/2021 15:10:40
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for t_common_file
-- ----------------------------
DROP TABLE IF EXISTS `t_common_file`;
CREATE TABLE `t_common_file` (
`id` bigint(20) UNSIGNED NOT NULL,
`user_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '上传用户ID',
`file_name` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '文件名',
`location` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '存储位置',
`visit_location` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' 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
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文件表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_form_basic
-- ----------------------------
DROP TABLE IF EXISTS `t_form_basic`;
CREATE TABLE `t_form_basic` (
`id` bigint(20) NOT NULL,
`title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '标题',
`description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '描述',
`cover_image` bigint(20) NULL DEFAULT 0 COMMENT '封面图片文件的id',
`access_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '访问路径',
`qrcode_path` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '二维码路径',
`submit_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '提交状态:0否 1是。新建表单默认0',
`user_id` bigint(20) NULL DEFAULT 0 COMMENT 'tall内的用户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
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '表单基本信息表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_form_module
-- ----------------------------
DROP TABLE IF EXISTS `t_form_module`;
CREATE TABLE `t_form_module` (
`id` bigint(20) NOT NULL,
`form_id` bigint(20) NULL DEFAULT 0 COMMENT '表单id',
`module_id` bigint(20) NULL DEFAULT 0 COMMENT '组件id',
`sequence` int(11) 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 `form_index`(`form_id`) USING BTREE,
INDEX `module_index`(`module_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '表单组件关联表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_form_module_config
-- ----------------------------
DROP TABLE IF EXISTS `t_form_module_config`;
CREATE TABLE `t_form_module_config` (
`id` bigint(20) NOT NULL,
`form_module_id` bigint(20) NULL DEFAULT 0 COMMENT '表单内容id',
`type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '类型 0显示 1校验 2统计',
`config_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '配置类型(title:标题;defaultValue:默认值;placeholder:占位符;...参考金数据)',
`config_value` 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 COMMENT '状态,0正常 1禁用 2删除',
PRIMARY KEY (`id`) USING BTREE,
INDEX `form_module_index`(`form_module_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '表单内组件配置表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_form_module_option
-- ----------------------------
DROP TABLE IF EXISTS `t_form_module_option`;
CREATE TABLE `t_form_module_option` (
`id` bigint(20) NOT NULL,
`form_module_id` bigint(20) NULL DEFAULT 0 COMMENT '表单内组件id',
`parent_id` bigint(20) NULL DEFAULT 0 COMMENT '上级Id',
`option_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'key',
`option_value` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'value',
`sequence` int(11) 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 `form_module_index`(`form_module_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '选项表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_form_user
-- ----------------------------
DROP TABLE IF EXISTS `t_form_user`;
CREATE TABLE `t_form_user` (
`id` bigint(20) NOT NULL,
`form_id` bigint(20) NULL DEFAULT 0 COMMENT '表单id',
`user_id` bigint(20) NULL DEFAULT 0 COMMENT 'tall内的用户id',
`user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户名',
`avatar_url` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '头像',
`submit_status` tinyint(1) 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 `form_index`(`form_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户填写表单信息' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_form_write
-- ----------------------------
DROP TABLE IF EXISTS `t_form_write`;
CREATE TABLE `t_form_write` (
`id` bigint(20) NOT NULL,
`form_user_id` bigint(20) NULL DEFAULT 0 COMMENT '用户与表单关联信息',
`form_module_id` bigint(20) NULL DEFAULT 0 COMMENT '表单内组件id',
`option_id` bigint(20) NULL DEFAULT 0 COMMENT '选项id',
`answer` varchar(5000) 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,
INDEX `form_user_index`(`form_user_id`) USING BTREE,
INDEX `form_module_index`(`form_module_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户填写内容表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_module
-- ----------------------------
DROP TABLE IF EXISTS `t_module`;
CREATE TABLE `t_module` (
`id` bigint(20) NOT NULL,
`type` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '组件类型 (单选:radio)(多选:checkBox)(下拉菜单:pullDown)(文本:text)(多行文本:textarea)(富文本:richText)(日期:date)',
`logo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '左边栏展示的组件的图标',
`name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '组件名称',
`option` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '是否有选项 0否 1是 默认0',
`hierarchy` tinyint(1) UNSIGNED NULL DEFAULT 1 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 = Compact;
-- ----------------------------
-- Table structure for t_module_config
-- ----------------------------
DROP TABLE IF EXISTS `t_module_config`;
CREATE TABLE `t_module_config` (
`id` bigint(20) NOT NULL,
`module_id` bigint(20) NULL DEFAULT 0 COMMENT '组件的id',
`type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '类型 0显示 1校验 2统计',
`config_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '配置类型(title:标题;defaultValue:默认值;placeholder:占位符;...参考金数据)',
`config_value` 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 COMMENT '状态,0正常 1禁用 2删除',
PRIMARY KEY (`id`) USING BTREE,
INDEX `config_module_index`(`module_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '组件类型配置表(默认)' ROW_FORMAT = Compact;
SET FOREIGN_KEY_CHECKS = 1;

206
game.sql

@ -0,0 +1,206 @@
/*
Navicat Premium Data Transfer
Source Server :
Source Server Type : MariaDB
Source Server Version : 100318
Source Host : test.tall.wiki:3306
Source Schema : game
Target Server Type : MariaDB
Target Server Version : 100318
File Encoding : 65001
Date: 13/05/2021 15:10:59
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for t_game_activity_prize
-- ----------------------------
DROP TABLE IF EXISTS `t_game_activity_prize`;
CREATE TABLE `t_game_activity_prize` (
`id` bigint(20) NOT NULL,
`game_id` bigint(20) NULL DEFAULT 0 COMMENT '游戏类型id',
`sequence` int(11) NULL DEFAULT 0 COMMENT '顺序',
`description` varchar(225) 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,
INDEX `game_index`(`game_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '活动奖品表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_game_activity_rule
-- ----------------------------
DROP TABLE IF EXISTS `t_game_activity_rule`;
CREATE TABLE `t_game_activity_rule` (
`id` bigint(20) NOT NULL,
`game_id` bigint(20) NULL DEFAULT 0 COMMENT '游戏类型id',
`sequence` int(11) NULL DEFAULT 0 COMMENT '规则顺序',
`description` varchar(225) 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,
INDEX `game_index`(`game_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '活动规则表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_game_group
-- ----------------------------
DROP TABLE IF EXISTS `t_game_group`;
CREATE TABLE `t_game_group` (
`id` bigint(20) NOT NULL,
`record_id` bigint(20) NULL DEFAULT 0 COMMENT '购买记录id',
`code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '队伍code',
`name` varchar(64) 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,
`head_portrait_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '头像',
PRIMARY KEY (`id`) USING BTREE,
INDEX `record_index`(`record_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '游戏分组信息表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_game_prize_instructions
-- ----------------------------
DROP TABLE IF EXISTS `t_game_prize_instructions`;
CREATE TABLE `t_game_prize_instructions` (
`id` bigint(20) NOT NULL,
`game_id` bigint(20) NULL DEFAULT 0 COMMENT '游戏类型id',
`sequence` int(11) NULL DEFAULT 0 COMMENT '顺序',
`description` varchar(225) 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,
INDEX `game_index`(`game_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '奖券使用说明表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_game_record
-- ----------------------------
DROP TABLE IF EXISTS `t_game_record`;
CREATE TABLE `t_game_record` (
`id` bigint(20) NOT NULL,
`user_pay_id` bigint(20) NULL DEFAULT 0 COMMENT '创建的游戏id',
`task_id` bigint(20) NULL DEFAULT 0 COMMENT '关联的任务id',
`url` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '大屏路径',
`QR_code_url` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '二维码路径',
`time_difference` int(11) NULL DEFAULT 0 COMMENT '大屏与服务器的时间差',
`start_time` bigint(20) NULL DEFAULT 0 COMMENT '游戏实际开始时间',
`end_time` bigint(20) NULL DEFAULT 0 COMMENT '游戏实际结束时间',
`game_status` tinyint(2) UNSIGNED NULL 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 NULL DEFAULT 0,
`game_group` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '游戏分组状态 0不分组 1分组',
`duration` int(11) UNSIGNED NULL DEFAULT 1 COMMENT '游戏时长 单位:分钟',
`member_limit` int(11) UNSIGNED NULL DEFAULT 500 COMMENT '人数限制,团队游戏里每个团队的限制',
`rank_rule` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '排名规则 0总分 1平均分',
PRIMARY KEY (`id`) USING BTREE,
INDEX `type_member_index`(`user_pay_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '创建的游戏记录表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_game_score_log
-- ----------------------------
DROP TABLE IF EXISTS `t_game_score_log`;
CREATE TABLE `t_game_score_log` (
`id` bigint(20) NOT NULL,
`user_id` bigint(20) NULL DEFAULT 0 COMMENT '参与者的id',
`record_id` bigint(20) NULL DEFAULT 0 COMMENT '游戏记录id',
`operation_type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '操作类型 0数钱 ',
`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_index`(`user_id`) USING BTREE,
INDEX `record_index`(`record_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户参与游戏信息表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_game_type
-- ----------------------------
DROP TABLE IF EXISTS `t_game_type`;
CREATE TABLE `t_game_type` (
`id` bigint(20) NOT NULL,
`code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '编号',
`name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '游戏名',
`description` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '详情',
`pay_type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '付费类型 0免费 1付费 暂时默认免费',
`screen_url` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '大屏前端路径',
`client_url` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '客户端前端路径',
`is_group` tinyint(1) NULL DEFAULT 0 COMMENT '是否是分组游戏 0不分组 1分组',
`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 = Compact;
-- ----------------------------
-- Table structure for t_game_user_join
-- ----------------------------
DROP TABLE IF EXISTS `t_game_user_join`;
CREATE TABLE `t_game_user_join` (
`id` bigint(20) NOT NULL,
`user_id` bigint(20) NULL DEFAULT 0 COMMENT '参与者的id',
`nickname` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '用户昵称',
`avatar_url` varchar(225) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '头像',
`phone` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '手机号',
`record_id` bigint(20) NULL DEFAULT 0 COMMENT '游戏记录id',
`times` int(11) NULL DEFAULT 0 COMMENT '滑动次数',
`score` int(11) NULL DEFAULT 0 COMMENT '分数',
`time_difference` int(11) NULL DEFAULT 0 COMMENT '客户端与服务器的时间差',
`local_start_time` bigint(20) NULL DEFAULT 0 COMMENT '客户端本地开始时间',
`local_end_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 `user_index`(`user_id`) USING BTREE,
INDEX `record_index`(`record_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户参与游戏信息表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_game_user_join_group
-- ----------------------------
DROP TABLE IF EXISTS `t_game_user_join_group`;
CREATE TABLE `t_game_user_join_group` (
`id` bigint(20) NOT NULL,
`user_join_id` bigint(20) NULL DEFAULT 0 COMMENT '参加游戏的用户的id',
`game_group_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 `user_join_index`(`user_join_id`) USING BTREE,
INDEX `game_group_index`(`game_group_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户分组表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_game_user_pay
-- ----------------------------
DROP TABLE IF EXISTS `t_game_user_pay`;
CREATE TABLE `t_game_user_pay` (
`id` bigint(20) NOT NULL,
`user_id` bigint(20) NULL DEFAULT 0 COMMENT '创建者的id',
`game_type_id` bigint(20) NULL DEFAULT 0 COMMENT '游戏类型id',
`total_count` int(11) NULL DEFAULT 0 COMMENT '游戏可用次数',
`used_count` int(11) NULL DEFAULT 0 COMMENT '已经使用的次数',
`created_time` bigint(20) NULL DEFAULT 0 COMMENT '创建时间',
`due_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 `member_index`(`user_id`) USING BTREE,
INDEX `game_type_index`(`game_type_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '创建的游戏记录表' ROW_FORMAT = Compact;
SET FOREIGN_KEY_CHECKS = 1;

427
health.sql

@ -0,0 +1,427 @@
/*
Navicat Premium Data Transfer
Source Server :
Source Server Type : MariaDB
Source Server Version : 100318
Source Host : test.tall.wiki:3306
Source Schema : health
Target Server Type : MariaDB
Target Server Version : 100318
File Encoding : 65001
Date: 13/05/2021 15:11:25
*/
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,
`t_key` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '',
`t_value` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '',
`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 = utf8 COLLATE = utf8_general_ci COMMENT = '常量表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_department
-- ----------------------------
DROP TABLE IF EXISTS `t_department`;
CREATE TABLE `t_department` (
`id` bigint(20) NOT NULL,
`name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '部门名称(企业微信不返回)',
`name_en` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '英文名',
`parentid` bigint(20) NULL DEFAULT 1 COMMENT '部门父id,根部门为1',
`order` int(11) 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
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '部门表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_department_employee
-- ----------------------------
DROP TABLE IF EXISTS `t_department_employee`;
CREATE TABLE `t_department_employee` (
`id` bigint(20) NOT NULL,
`department_id` bigint(20) NULL DEFAULT 0 COMMENT '部门id',
`employee_id` bigint(20) NULL DEFAULT 0 COMMENT '成员id',
`order` int(20) NULL DEFAULT 0 COMMENT '员工在部门的顺序',
`sort` int(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 `department_index`(`department_id`) USING BTREE,
INDEX `employee_index`(`employee_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '部门成员表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_dinding_user
-- ----------------------------
DROP TABLE IF EXISTS `t_dinding_user`;
CREATE TABLE `t_dinding_user` (
`id` bigint(20) NOT NULL,
`user_id` bigint(20) NULL DEFAULT 0 COMMENT 'tall user_id',
`corp_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '企业ID',
`userid` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '用户id',
`unionid` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '员工在当前开发者企业账号范围内的唯一标识,系统生成,固定值,不会改变',
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '员工名字',
`active` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '是否激活',
`order_in_depts` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '在对应的部门中的排序,Map结构的json字符串,key是部门的Id,value是人员在这个部门的排序值',
`is_admin` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '是否为企业的管理员1:是 0:否',
`is_boss` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '是否为企业的老板1:是 0:否',
`is_leader_in_depts` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '在对应的部门中是否为主管:Map结构的json字符串,key是部门的Id,value是人员在这个部门中是否为主管,true表示是,false表示不是',
`is_hide` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '是否号码隐藏1:是 0:否',
`department` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '成员所属部门id列表',
`position` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '职位信息',
`avatar` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '头像url',
`hired_date` bigint(20) NULL DEFAULT 0 COMMENT '入职时间',
`jobnumber` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '员工工号',
`isSenior` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '是否是高管',
`roles` varchar(512) CHARACTER SET utf8 COLLATE utf8_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,
INDEX `ding_user_index`(`user_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '钉钉用户信息' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_employee
-- ----------------------------
DROP TABLE IF EXISTS `t_employee`;
CREATE TABLE `t_employee` (
`id` bigint(20) NOT NULL,
`corpid` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '授权方企业微信id',
`userid` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '对应管理端的账号',
`name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '姓名',
`gender` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '性别 0男 1女',
`status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态 0激活 1禁用 2未激活',
`address` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '地址',
`hide_mobile` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '是否隐藏手机号',
`avatar` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '头像',
`thumb_avatar` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '头像缩略图url',
`english_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '英文名',
`tall_user_id` bigint(20) NULL DEFAULT 0 COMMENT 'tall里的userId',
`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 `tall_user_index`(`tall_user_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '成员表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_health_abnormal
-- ----------------------------
DROP TABLE IF EXISTS `t_health_abnormal`;
CREATE TABLE `t_health_abnormal` (
`id` bigint(20) NOT NULL,
`wkno` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '学号/工号',
`name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '姓名',
`department` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '所在机构',
`animal_heat` decimal(3, 1) NULL DEFAULT 0.0 COMMENT '体温',
`reason` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '原因',
`health_status` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '状态id',
`start_time` bigint(20) NULL DEFAULT 0 COMMENT '开始时间',
`end_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 `health_abn_wkno_index`(`wkno`) USING BTREE,
INDEX `health_abn_status_index`(`health_status`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '健康异常表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_health_auth
-- ----------------------------
DROP TABLE IF EXISTS `t_health_auth`;
CREATE TABLE `t_health_auth` (
`id` bigint(20) NOT NULL DEFAULT 0,
`access_token` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 授权方(企业)access_token,最长为512字节 ',
`expires_in` int(20) NULL DEFAULT 0 COMMENT ' 授权方(企业)access_token超时时间 ',
`permanent_code` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 企业微信永久授权码,最长为512字节 ',
`corpid` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 授权方企业微信id ',
`corp_name` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 授权方企业名称,即企业简称 ',
`corp_type` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 授权方企业类型,认证号:verified, 注册号:unverified ',
`corp_square_logo_url` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 授权方企业方形头像 ',
`corp_user_max` int(11) NULL DEFAULT 0 COMMENT ' 授权方企业用户规模 ',
`corp_agent_max` bigint(20) NULL DEFAULT 0 COMMENT ' 授权方企业应用数上限 ',
`corp_full_name` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 授权方企业的主体名称(仅认证或验证过的企业有),即企业全称。 ',
`subject_type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 企业类型,1. 企业; 2. 政府以及事业单位; 3. 其他组织, 4.团队号 ',
`verified_end_time` bigint(20) NULL DEFAULT 0 COMMENT ' 认证到期时间 ',
`corp_wxqrcode` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 授权企业在微工作台(原企业号)的二维码,可用于关注微工作台 ',
`corp_scale` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 企业规模。当企业未设置该属性时,值为空 ',
`corp_industry` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 企业所属行业。当企业未设置该属性时,值为空 ',
`corp_sub_industry` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 企业所属子行业。当企业未设置该属性时,值为空 ',
`location` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 企业所在地信息, 为空时表示未知 ',
`auth_userid` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 授权管理员的userid,可能为空(内部管理员一定有,不可更改) ',
`auth_name` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 授权管理员的name,可能为空(内部管理员一定有,不可更改) ',
`auth_avatar` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 授权管理员的头像url ',
`dealer_corp_info_corpid` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 代理服务商企业微信id ',
`dealer_corp_info_corp_name` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 代理服务商企业微信名称 ',
`register_code` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 注册码 ',
`template_id` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 推广包ID ',
`state` varchar(128) CHARACTER SET utf8 COLLATE utf8_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,
INDEX `health_auth_index`(`corpid`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_health_auth_agent
-- ----------------------------
DROP TABLE IF EXISTS `t_health_auth_agent`;
CREATE TABLE `t_health_auth_agent` (
`id` bigint(20) NOT NULL DEFAULT 0 COMMENT ' ',
`auth_id` bigint(20) NULL DEFAULT 0 COMMENT ' ',
`agentid` bigint(20) NULL DEFAULT 0 COMMENT ' 授权方应用id ',
`name` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 授权方应用名字 ',
`square_logo_url` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 授权方应用方形头像 ',
`round_logo_url` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 授权方应用圆形头像 ',
`privilege` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 应用对应的权限 ',
`allow_party` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 应用可见范围(部门) ',
`allow_tag` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 应用可见范围(标签) ',
`allow_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 应用可见范围(成员) ',
`extra_party` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 额外通讯录(部门) ',
`extra_user` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 额外通讯录(成员) ',
`extra_tag` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 额外通讯录(标签) ',
`level` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 权限等级。1:通讯录基本信息只读2:通讯录全部信息只读3:通讯录全部信息读写4:单个基本信息只读5:通讯录全部信息只写 ',
`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 `health_auth_agent_index`(`auth_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_health_qrcode
-- ----------------------------
DROP TABLE IF EXISTS `t_health_qrcode`;
CREATE TABLE `t_health_qrcode` (
`id` bigint(20) NOT NULL,
`health_records_id` bigint(20) NULL DEFAULT 0 COMMENT '健康记录id',
`health_type_id` bigint(20) NULL DEFAULT 0 COMMENT '当前健康状态',
`qrcode_path` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '健康码路径',
`time` bigint(32) 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 `health_type_index`(`health_type_id`) USING BTREE,
INDEX `health_records_index`(`health_records_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '健康码' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_health_records
-- ----------------------------
DROP TABLE IF EXISTS `t_health_records`;
CREATE TABLE `t_health_records` (
`id` bigint(20) NOT NULL,
`user_id` bigint(20) NULL DEFAULT 0 COMMENT '成员id',
`time` bigint(20) NULL DEFAULT 0 COMMENT '日期',
`district` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '当前所在区',
`address` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '当前详细地址',
`health_type_id` bigint(20) NULL DEFAULT 0 COMMENT '当前健康状态',
`animal_heat` decimal(3, 1) NULL DEFAULT 0.0 COMMENT '体温',
`hospital` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '就诊医院',
`touch_hubei` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '有无湖北武汉接触史 0没有 1有',
`touch_sick` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '有无接触患者 0无 1有',
`touch_overseas` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '有无境外人员接触史 0没有 1有',
`school_location` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '是否在学校所在地 0否 1是',
`emergency_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '紧急联系人姓名',
`emergency_phone` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '紧急联系人电话',
`remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '备注信息',
`health_agreement` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '是否同意疫情防控协议 0否 1是',
`self_fill` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '是否本人填写 0否 1是',
`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 `health_type_index`(`health_type_id`) USING BTREE,
INDEX `user_index`(`user_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '每日健康表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_health_remark_file
-- ----------------------------
DROP TABLE IF EXISTS `t_health_remark_file`;
CREATE TABLE `t_health_remark_file` (
`id` bigint(20) NOT NULL,
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '文件名',
`path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '文件路径',
`health_records_id` bigint(20) NULL DEFAULT 0 COMMENT '健康记录id',
`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 `health_records_index`(`health_records_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '健康上报的文件信息' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_health_type
-- ----------------------------
DROP TABLE IF EXISTS `t_health_type`;
CREATE TABLE `t_health_type` (
`id` bigint(20) NOT NULL,
`code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '健康类型code',
`name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '名字',
`independent` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '是否单独统计 0否 1是',
`quarantine` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '是否需要隔离 0否 1是',
`scene` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '使用的场景,0小程序 1后台',
`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 = utf8 COLLATE = utf8_general_ci COMMENT = '健康状态表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_journey
-- ----------------------------
DROP TABLE IF EXISTS `t_journey`;
CREATE TABLE `t_journey` (
`id` bigint(20) NOT NULL,
`user_id` bigint(20) NULL DEFAULT 0 COMMENT '成员id',
`trip_mode` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '出行方式 0铁路 1飞机 2客运车辆 3自驾 4船 5其他',
`car_no` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '车次号',
`start_time` bigint(20) NULL DEFAULT 0 COMMENT '出发时间',
`end_time` bigint(20) NULL DEFAULT 0 COMMENT '到达时间',
`journey_type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '行程类型 0未填写 1返校行程 2日常外出',
`together` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '同行人员',
`health_agreement` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '是否同意疫情防控协议 0否 1是',
`self_fill` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '是否本人填写 0否 1是',
`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 `employee_index`(`user_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '学生行程表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_journey_abnormal
-- ----------------------------
DROP TABLE IF EXISTS `t_journey_abnormal`;
CREATE TABLE `t_journey_abnormal` (
`id` bigint(20) NOT NULL,
`trip_mode` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '出行方式 0铁路 1飞机 2客运车辆 3自驾 4船 5其他',
`car_no` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '车次号',
`start_time` bigint(20) NULL DEFAULT 0 COMMENT '出发时间',
`end_time` bigint(20) NULL DEFAULT 0 COMMENT '到达时间',
`description` varchar(255) CHARACTER SET utf8 COLLATE utf8_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 = utf8 COLLATE = utf8_general_ci COMMENT = '异常行程表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_member
-- ----------------------------
DROP TABLE IF EXISTS `t_member`;
CREATE TABLE `t_member` (
`id` bigint(20) NOT NULL,
`wkno` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '学号/工号',
`name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '姓名',
`department` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '所在机构',
`province` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '',
`city` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '',
`county` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '县区',
`site` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '所在地点',
`type` tinyint(1) UNSIGNED NOT 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,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `stu_wkno_index`(`wkno`) USING BTREE,
INDEX `stu_name_index`(`name`) USING BTREE,
INDEX `stu_department_index`(`department`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '学生表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_real_name_auth
-- ----------------------------
DROP TABLE IF EXISTS `t_real_name_auth`;
CREATE TABLE `t_real_name_auth` (
`id` bigint(20) NOT NULL,
`user_id` bigint(20) NULL DEFAULT 0 COMMENT 'tall的userid',
`id_card` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '身份证',
`name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '姓名',
`post` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '身份 0学生 1老师 2工作人员',
`no` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '学号',
`phone` varchar(32) CHARACTER SET utf8 COLLATE utf8_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,
INDEX `user_index`(`user_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '实名认证表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_site
-- ----------------------------
DROP TABLE IF EXISTS `t_site`;
CREATE TABLE `t_site` (
`id` bigint(20) NOT NULL,
`site_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '场馆名',
`site_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '场馆code',
`longitude` decimal(20, 15) NULL DEFAULT 0.000000000000000 COMMENT '经度',
`latitude` decimal(20, 15) NULL DEFAULT 0.000000000000000 COMMENT '纬度',
`parent_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '父级code',
`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 = utf8 COLLATE = utf8_general_ci COMMENT = '场所表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_site_clock_in
-- ----------------------------
DROP TABLE IF EXISTS `t_site_clock_in`;
CREATE TABLE `t_site_clock_in` (
`id` bigint(20) NOT NULL,
`site_id` bigint(20) NULL DEFAULT NULL COMMENT '场所ID',
`time` bigint(20) NULL DEFAULT 0 COMMENT '进入打卡时间',
`location_longitude` decimal(20, 15) NULL DEFAULT 0.000000000000000 COMMENT '进入打卡定位-经度',
`location_latitude` decimal(20, 15) NULL DEFAULT 0.000000000000000 COMMENT '进入打卡定位-纬度',
`out_time` bigint(20) NULL DEFAULT 0 COMMENT '出去打卡时间',
`out_location_longitude` decimal(20, 15) NULL DEFAULT NULL COMMENT '出去打卡定位-经度',
`out_location_latitude` decimal(20, 15) NULL DEFAULT NULL COMMENT '出去打卡定位-纬度',
`user_id` bigint(20) NULL DEFAULT 0 COMMENT 'user_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 `employee_index`(`user_id`) USING BTREE,
INDEX `clock_site_index`(`site_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '打卡记录' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_site_qrcode
-- ----------------------------
DROP TABLE IF EXISTS `t_site_qrcode`;
CREATE TABLE `t_site_qrcode` (
`id` bigint(20) NOT NULL,
`site_id` bigint(20) NULL DEFAULT 0 COMMENT '场馆id',
`out_or_in` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '进or出 0进 1出',
`qrcode_path` varchar(255) CHARACTER SET utf8 COLLATE utf8_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,
INDEX `site_index`(`site_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '场所二维码表' ROW_FORMAT = Compact;
SET FOREIGN_KEY_CHECKS = 1;

729
ht.sql

@ -0,0 +1,729 @@
/*
Navicat Premium Data Transfer
Source Server :
Source Server Type : MariaDB
Source Server Version : 100323
Source Host : sd.tall.wiki:3306
Source Schema : ht
Target Server Type : MariaDB
Target Server Version : 100323
File Encoding : 65001
Date: 13/05/2021 15:20:31
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for t_ht_doctor
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_doctor`;
CREATE TABLE `t_ht_doctor` (
`id` bigint(20) NOT NULL,
`user_id` bigint(20) NULL DEFAULT 0 COMMENT ' 登录用户id 普通索引 ',
`position_id` bigint(20) NULL DEFAULT 0 COMMENT ' 职务ID 普通索引 ',
`title_id` bigint(20) NULL DEFAULT 0 COMMENT ' 职称ID ',
`name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 姓名 ',
`sex` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 性别(0:男 1:女) ',
`age` int(11) NULL DEFAULT 0 COMMENT ' 年龄 ',
`auditor_id` bigint(20) NULL DEFAULT 0 COMMENT ' 审核医生ID(即上级职务对应的医生ID) 普通索引 ',
`audit_state` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 审核状态(0:未审核 1:审核通过 2:审核失败) ',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NOT NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
`share_patient_edit` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '分享病人编辑页面路径',
PRIMARY KEY (`id`) USING BTREE,
INDEX `doctor_user_index`(`user_id`) USING BTREE,
INDEX `doctor_position_index`(`position_id`) USING BTREE,
INDEX `doctor_title_index`(`title_id`) USING BTREE,
INDEX `doctor_auditor_index`(`auditor_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '医生表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_doctor_audit
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_doctor_audit`;
CREATE TABLE `t_ht_doctor_audit` (
`id` bigint(20) NOT NULL,
`doctor_id` bigint(20) NULL DEFAULT 0 COMMENT '待审核医生ID ',
`auditor_id` bigint(20) NULL DEFAULT 0 COMMENT '审核医生ID',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NOT NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `audit_auditor_index`(`auditor_id`, `doctor_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '医生审核表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_opretion_log
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_opretion_log`;
CREATE TABLE `t_ht_opretion_log` (
`id` bigint(20) NOT NULL,
`user_id` bigint(20) NULL DEFAULT 0 COMMENT ' 用户id 普通索引 ',
`type` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT ' 操作类型(1:注册 2:登录 3:修改密码 4:退出 5:资格认证 6:资格审核 7.生成报告单 8测评,9修改病人信息) ',
`table_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 操作的表名 普通索引 ',
`data_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 操作的数据ID ',
`content` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 操作内容 ',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NOT NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
PRIMARY KEY (`id`) USING BTREE,
INDEX `log_user_index`(`user_id`) USING BTREE,
INDEX `log_table_index`(`table_name`, `data_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '操作日志表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_patient
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_patient`;
CREATE TABLE `t_ht_patient` (
`id` bigint(20) NOT NULL,
`user_id` bigint(20) NULL DEFAULT 0 COMMENT ' 登录用户id 普通索引 ',
`name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 姓名 ',
`patient_number` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 门诊号 普通索引 ',
`hospital_number` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 住院号 普通索引 ',
`idcard` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 身份证号 普通索引 ',
`sex` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 性别(0:男 1:女) ',
`marital_status` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 婚姻状况(1:未婚2:已婚 3:离异 4:分居 5:丧偶 6:同居 7:其他 ) ',
`educational_status` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 教育程度(1:文盲 2:小学 3:初中 4:高中 5:大学 6:大学以上 7:其他) ',
`educational_status_unit` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 受教育时间(年或月) ',
`nation` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 民族 ',
`native_place` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 籍贯 ',
`career` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 职业(1:农林牧渔水利生产人员 2:教师 3:医务工作者 4:专业技术人员 5:生产、运输设备操作人员及有关人员6:商业、服务业人员7:国家机关、事业单位、企业负责人8:国家机关、事业单位、企业办事人员和有关人员9:军人 10:媒体、文体类工作人员 11:在校学生 12:未就业 13:家务 14:其他 ',
`birth_number` int(11) NULL DEFAULT NULL COMMENT ' 生育数量 ',
`menopause_age` int(11) NULL DEFAULT NULL COMMENT ' 绝经年龄(女) ',
`contact` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 联系人 ',
`mobile` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 手机 ',
`phone` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 电话 ',
`province` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 省份 ',
`city` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 城市 ',
`address` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 住址 ',
`domicile` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 住所(1:自己家中 2:养老院 3:其他) ',
`independent_living_skills` tinyint(2) UNSIGNED NULL DEFAULT NULL COMMENT ' 独立生活能力(1:能够独立生活 2:需要他人帮助完成复杂活动 3:需要他人帮助完成基本活动 4:完全依赖他人生活 5:未知 6:其他) ',
`dwelling_state` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 居住状态(1:独居 2:与配偶或对象或子女 3:与亲戚或朋友居住) ',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`recorder` bigint(20) NULL DEFAULT 0 COMMENT ' 第一次录入人 ',
`create_time` timestamp NOT NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
PRIMARY KEY (`id`) USING BTREE,
INDEX `patient_superior_index`(`user_id`) USING BTREE,
INDEX `patient_number_index`(`patient_number`) USING BTREE,
INDEX `patient_hospitalr_index`(`hospital_number`) USING BTREE,
INDEX `patient_idcard_index`(`idcard`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '病友基本信息' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_patient_acp
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_patient_acp`;
CREATE TABLE `t_ht_patient_acp` (
`id` bigint(20) NOT NULL,
`patient_id` bigint(20) NULL DEFAULT 0 COMMENT ' 病人id 普通索引 ',
`ct` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' ct ',
`mri` varchar(51) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' mri ',
`hcy` varchar(52) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 同型半胱氨酸 ',
`vb12` varchar(53) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 维生素B12 ',
`folic_acid` varchar(54) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 叶酸 ',
`tt3` varchar(55) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 血清总T3 ',
`tt4` varchar(56) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 血清总T4 ',
`tsh` varchar(57) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 促甲状腺素 ',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NOT NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
`recorder` bigint(20) NULL DEFAULT 0 COMMENT '录入人',
`ta1` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '血清Aβ1-42',
`tpt` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '血清p-tau181',
PRIMARY KEY (`id`) USING BTREE,
INDEX `acp_patient_index`(`patient_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '辅助检查' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_patient_body
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_patient_body`;
CREATE TABLE `t_ht_patient_body` (
`id` bigint(20) NOT NULL,
`patient_id` bigint(20) NULL DEFAULT 0 COMMENT ' 病人id 普通索引 ',
`height` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 身高(cm) ',
`weight` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 体重(kg) ',
`waistline` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 腰围(寸) ',
`blood_pressure_shrink` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 血压-收缩压(mmHg) ',
`blood_pressure_diastole` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 血压-舒张压(mmHg) ',
`resting_heart_rate` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 静息心率 ',
`vision` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 受试的视觉功能是否正常(1:是 0:否) ',
`auditory` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 受试的听觉功能是否正常(1:是 0:否) ',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NOT NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
`recorder` bigint(20) NULL DEFAULT 0 COMMENT '录入人',
PRIMARY KEY (`id`) USING BTREE,
INDEX `body_patient_index`(`patient_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '病人身体基本信息表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_patient_canvas
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_patient_canvas`;
CREATE TABLE `t_ht_patient_canvas` (
`id` bigint(20) NOT NULL,
`patient_report_id` bigint(20) NULL DEFAULT 0 COMMENT '病友检查报告单ID',
`question_id` bigint(20) NULL DEFAULT 0 COMMENT '测评试题ID',
`begin_time` bigint(20) NULL DEFAULT 0 COMMENT '时间ms数',
`canvas_width` int(11) NULL DEFAULT 0 COMMENT '画板宽',
`canvas_height` int(11) NULL DEFAULT 0 COMMENT '画板高',
`line_color` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '笔触颜色',
`line_width` int(11) NULL DEFAULT 0 COMMENT '笔触粗细',
`create_time` timestamp NOT NULL DEFAULT current_timestamp,
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP,
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除',
`open_canvas_time` bigint(20) NULL DEFAULT 0 COMMENT '打开画板的时间',
`beyond_proportion` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '超出占比',
PRIMARY KEY (`id`) USING BTREE,
INDEX `canvas_patient_report_index`(`patient_report_id`) USING BTREE,
INDEX `canvas_question_index`(`question_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '画板信息(每次画图生成一个画板信息)' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_ht_patient_canvas_line
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_patient_canvas_line`;
CREATE TABLE `t_ht_patient_canvas_line` (
`id` bigint(20) NOT NULL,
`patient_canvas_id` bigint(20) NULL DEFAULT 0 COMMENT '画板id',
`points` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '笔记详情(x,y,time)',
`create_time` timestamp NOT NULL DEFAULT current_timestamp,
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP,
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除',
PRIMARY KEY (`id`) USING BTREE,
INDEX `canvas_patient_canvas_index`(`patient_canvas_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '画板轨迹表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_ht_patient_family
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_patient_family`;
CREATE TABLE `t_ht_patient_family` (
`id` bigint(20) NOT NULL,
`patient_id` bigint(20) NULL DEFAULT 0 COMMENT ' 病人id 普通索引 ',
`name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 姓名 ',
`age` tinyint(3) UNSIGNED NULL DEFAULT 0 COMMENT '年龄',
`sex` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 性别(0:男 1:女) ',
`educational_status` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT ' 教育程度(1:文盲 2:小学 3:初中 4:高中 5:大学 6:大学以上 7:其他) ',
`relation` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT ' 患者家属(知情人)与患者的关系(1:配偶/伴侣 2:子女3:兄弟姐妹 4:其他亲属 5:朋友、邻居 6:受雇看护 7:其他) ',
`is_live_together` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 患者家属(知情人)是否与患者一起居住(1:是 0:否) ',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NOT NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
`recorder` bigint(20) NULL DEFAULT 0 COMMENT '录入人',
PRIMARY KEY (`id`) USING BTREE,
INDEX `family_patient_index`(`patient_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '家属表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_patient_family_illness
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_patient_family_illness`;
CREATE TABLE `t_ht_patient_family_illness` (
`id` bigint(20) NOT NULL,
`patient_id` bigint(20) NULL DEFAULT 0 COMMENT ' 病人id 普通索引 ',
`name` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 亲属名字 ',
`relation` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 与患者关系 ',
`diagnose` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 诊断 ',
`onset_age` int(11) NULL DEFAULT 0 COMMENT ' 发病年龄 ',
`now_age` int(11) NULL DEFAULT 0 COMMENT ' 现在年龄(如已去世,为去世年龄) ',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NOT NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
`recorder` bigint(20) NULL DEFAULT 0 COMMENT '录入人',
PRIMARY KEY (`id`) USING BTREE,
INDEX `family_illness_patient_index`(`patient_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '家族史' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_patient_follow_up
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_patient_follow_up`;
CREATE TABLE `t_ht_patient_follow_up` (
`id` bigint(20) NOT NULL,
`patient_id` bigint(20) NULL DEFAULT 0 COMMENT ' 病人id 普通索引 ',
`follow_up_datetime` datetime NULL DEFAULT NULL COMMENT ' 随访时间 ',
`follow_up_times` int(11) NULL DEFAULT 0 COMMENT ' 第几次随访 ',
`recorder` bigint(20) NULL DEFAULT 0 COMMENT ' 录入人 (医生ID)',
`diagnose` bigint(20) NULL DEFAULT 0 COMMENT ' 诊断人 (医生ID)',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NOT NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
PRIMARY KEY (`id`) USING BTREE,
INDEX `followup_patient_index`(`patient_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '病人随访表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_patient_illness_history
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_patient_illness_history`;
CREATE TABLE `t_ht_patient_illness_history` (
`id` bigint(20) NOT NULL,
`patient_id` bigint(20) NULL DEFAULT 0 COMMENT ' 病人id 普通索引 ',
`cardiac_arrest_history` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 心跳骤停史(1:有0:无) ',
`angina` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 心绞痛(1:有0:无) ',
`mi` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 心肌梗死(1:有0:无) ',
`atrial_fibrillation` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 心房纤颤(1:有0:无) ',
`chf` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 充血性心衰(1:有0:无) ',
`other_cardiovascular_diseases` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 其他心血管疾病(1:有0:无) ',
`wuis` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 缺血性卒中(1:有0:无) ',
`hcvd` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 出血性卒中(1:有0:无) ',
`parkinson_disease` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 帕金森病(1:有0:无) ',
`epilepsy` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 癫痫(1:有0:无) ',
`brain_trauma` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 脑外伤(1:有0:无) ',
`hypertension` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 高血压(1:有0:无) ',
`diabetes` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 糖尿病(1:有0:无) ',
`hlp` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 高脂血症(1:有0:无) ',
`hyperhomocysteinemia` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 高同型半胱氨酸血症(1:有0:无) ',
`vb12_deficiency` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 维生素B12缺乏(1:有0:无) ',
`thyroid_disease` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 甲状腺疾病(甲亢 甲减)(1:有0:无) ',
`copd` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 慢阻肺(1:有0:无) ',
`asthma` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 哮喘(1:有0:无) ',
`insomnia` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 失眠(1:有0:无) ',
`sleep_suspend` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 睡眠暂停(1:有0:无) ',
`ckd` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 慢性肾脏病(1:有0:无) ',
`rheumatoid` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 类风湿(1:有0:无) ',
`depression` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 抑郁(1:有0:无) ',
`general_anesthesia_surgery` int(11) NULL DEFAULT 0 COMMENT ' 全麻手术史次数 ',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NOT NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
`recorder` bigint(20) NULL DEFAULT 0 COMMENT '录入人',
PRIMARY KEY (`id`) USING BTREE,
INDEX `illness_history_patient_index`(`patient_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '既往史' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_patient_parent_illness
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_patient_parent_illness`;
CREATE TABLE `t_ht_patient_parent_illness` (
`id` bigint(20) NOT NULL,
`patient_id` bigint(20) NULL DEFAULT 0 COMMENT ' 病人id 普通索引 ',
`memory` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 记忆障碍(1:有 0:无) (丢三落四,忘记谈话的内容和/或日期;经常忘记熟悉的人的名字等;重复提问和/或谈论同一个问题;物品不能放回固定位置) ',
`language` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 语言障碍(1:有 0:无) (语言不流利;自主谈话减少;自发语言中实词减少,赘语、找词困难、用词不当但不予纠正;理解他人语言能力下降;书写能力下降;阅读困难等) ',
`space` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 空间技能(1:有 0:无) (不能正确指出看到的物体、辨别方向困难或迷路、使用餐具困难、穿衣穿反等) ',
`emotion` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 情感淡漠(1:有 0:无) (兴趣丧失或能力下降,社交退缩) ',
`depression` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 抑郁(1:有0:无) (情绪低落、对活动失去兴趣、悲观绝望、食欲不振易疲劳等) ',
`illusion` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 幻觉/幻听/幻嗅(1:有 0:无) ',
`delusion` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 虚构/妄想(1:有 0:无) ',
`derepression` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 脱抑制(1:有 0:无) 在家中或公共场所的语言或行为是否粗俗不当、是否无视个人卫生、是否与陌生人过分亲近) ',
`irritable` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 易激惹、激越、攻击行为(1:有 0:无) (过度兴奋、大喊大叫、对人(拳打脚踢) ',
`personality_changes` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 人格改变(1:有 0:无) ',
`exercise` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 运动障碍(1:是0:否) (共济失调、帕金森样运动障碍、不自主运动) ',
`first_illness` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 最早出现的症状(1:认知 2:行为 3:运动 4:不祥) ',
`reason` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 认知症状起病原因(1:隐匿 2:亚急性 3:急性起病) ',
`change_form` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT ' 症状发展变化的形式(1:渐进性加重 2:阶梯样加重 3:无变化 4:波动性 5:逐渐减轻) ',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NOT NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
`recorder` bigint(20) NULL DEFAULT 0 COMMENT '录入人',
PRIMARY KEY (`id`) USING BTREE,
INDEX `parent_illness_patient_index`(`patient_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '现病史' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_patient_persional
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_patient_persional`;
CREATE TABLE `t_ht_patient_persional` (
`id` bigint(20) NOT NULL,
`patient_id` bigint(20) NULL DEFAULT 0 COMMENT ' 病人id 普通索引 ',
`smoking_history` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 有无吸烟史(1:有0:无) ',
`smoking_year` int(11) NULL DEFAULT NULL COMMENT ' 吸烟时长(年) ',
`smoking_amount` int(11) NULL DEFAULT NULL COMMENT ' 吸烟平均每日几支 ',
`smoking_quit` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 是否戒烟(1:是0:否) ',
`smoking_quit_year` int(11) NULL DEFAULT NULL COMMENT ' 戒烟时长(年) ',
`drink_history` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 有无饮酒史(1:有0:无) ',
`drink_year` int(11) NULL DEFAULT NULL COMMENT ' 饮酒时长(年) ',
`drink_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 饮酒类型(1:白酒 2:普通酒 3:啤酒),不同类型用,分割 ',
`drink_amount` int(11) NULL DEFAULT 0 COMMENT ' 平均每日饮酒量(两/ml) ',
`tea_coffee_history` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 有无喝茶咖啡史(1:有0:无) ',
`tea_coffee_year` int(11) NULL DEFAULT NULL COMMENT ' 喝茶咖啡时长(年) ',
`tea_coffee_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 喝茶咖啡类型(1:绿茶 2:红茶 3:乌龙茶 4.咖啡 5其他) ',
`tea_coffee_frequency` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 喝茶咖啡频率(1:偶尔 2:每周1~2次 3:每周3~4次 4:每周5次及以上) ',
`tea_coffee_quit` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 现在是否停止喝茶/咖啡(1:是 0:否) ',
`tea_coffee_quit_year` int(11) NULL DEFAULT NULL COMMENT ' 挺喝茶咖啡时长(年) ',
`dietary_habit` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 饮食习惯(1:素食为主 2:荤食为主 3:荤素搭配 4:喜欢甜食 5:高盐 6:高脂 7:喜爱油炸物 ',
`workout_time` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 锻炼时间(1:不太活动(看电视,读报等)2:轻度活动(种花或家务) 3:中度活动(游泳、打拳、慢跑、跳舞)4:重度活动(举杠铃等) ',
`sleep_time` int(11) NULL DEFAULT NULL COMMENT ' 平均每天睡眠时间(小时) ',
`snore` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 是否打鼾(1:有 0:无) ',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NOT NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
`recorder` bigint(20) NULL DEFAULT 0 COMMENT '录入人',
`drink_quit` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 现在是否停止饮酒(1:是 0:否) ',
`drink_quit_year` int(11) NULL DEFAULT NULL COMMENT ' 停止饮酒时长(年) ',
PRIMARY KEY (`id`) USING BTREE,
INDEX `persional_patient_index`(`patient_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '个人史' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_patient_question_record
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_patient_question_record`;
CREATE TABLE `t_ht_patient_question_record` (
`id` bigint(20) NOT NULL,
`patient_report_id` bigint(20) NULL DEFAULT 0 COMMENT ' 病友检查报告单ID 联合索引 ',
`question_id` bigint(20) NULL DEFAULT 0 COMMENT ' 测评试题ID ',
`record_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '额外记录类型(answer:答案,errorMsg:错误信息,otherMsg:其他内容,paint:画图,voice:语音,startTime:起笔时长)',
`record_value` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 病友回答情况 ',
`record_time` bigint(20) NULL DEFAULT 0 COMMENT ' 记录时间 ',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NOT NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
PRIMARY KEY (`id`) USING BTREE,
INDEX `record_patient_index`(`patient_report_id`, `question_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '病友答题记录表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_patient_report
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_patient_report`;
CREATE TABLE `t_ht_patient_report` (
`id` bigint(20) NOT NULL,
`name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 报告单名称 ',
`patient_id` bigint(20) NULL DEFAULT 0 COMMENT ' 病人ID 普通索引 ',
`patient_idcard` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 病人身份证 ',
`patient_age` tinyint(3) NULL DEFAULT 0 COMMENT '病人测评时的年龄',
`doctor_id` bigint(20) NULL DEFAULT 0 COMMENT ' 测评医生ID ',
`serial_number` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 编号 ',
`initial_impression` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 初步印象 ',
`clinical_diagnosis` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 临床诊断(轻度认知障碍... 痴呆…无) ',
`pasi` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 严重程度(0:未评测 1:轻度 2:中度 3:重度) ',
`department` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 科别 ',
`bed_number` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 床号 ',
`report_time` bigint(20) NULL DEFAULT 0 COMMENT ' 报告时间 ',
`check_time` bigint(20) NULL DEFAULT 0 COMMENT ' 检查时间 ',
`evaluation_code` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 测评分类code(报告单表的版本) ',
`url` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 报告单路径 ',
`qr_code_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '二维码路径',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NOT NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
`show_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '显示状态 0:不显示 1:在历史报告单中显示',
`hospital` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '医院',
`complete_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '完成状态 0:未完成 1:完成 2:忽略',
PRIMARY KEY (`id`) USING BTREE,
INDEX `patient_report_patient_index`(`patient_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '病友检查报告单表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_patient_report_record
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_patient_report_record`;
CREATE TABLE `t_ht_patient_report_record` (
`id` bigint(20) NOT NULL,
`report_id` bigint(20) NULL DEFAULT 0 COMMENT '病人报告单ID',
`doctor_id` bigint(20) NULL DEFAULT 0 COMMENT '医生ID',
`content` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '报告内容',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NOT NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
PRIMARY KEY (`id`) USING BTREE,
INDEX `report_record_report_index`(`report_id`) USING BTREE,
INDEX `report_record_doctor_index`(`doctor_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '病友检查报告单变更记录表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_patient_report_record_desc
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_patient_report_record_desc`;
CREATE TABLE `t_ht_patient_report_record_desc` (
`id` bigint(20) NOT NULL,
`patient_report_id` bigint(20) NULL DEFAULT 0 COMMENT ' 病友检查报告单ID 普通索引 ',
`record_id` bigint(20) NULL DEFAULT 0 COMMENT ' 测评试题ID ',
`answer` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 用户答案 ',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
PRIMARY KEY (`id`) USING BTREE,
INDEX `record_desc_report_index`(`patient_report_id`) USING BTREE,
INDEX `record_desc_record_index`(`record_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '病友其他信息记录表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_patient_score
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_patient_score`;
CREATE TABLE `t_ht_patient_score` (
`id` bigint(20) NOT NULL,
`patient_report_id` bigint(20) NULL DEFAULT 0 COMMENT ' 病友检查报告单ID 普通索引 ',
`patient_id` bigint(20) NULL DEFAULT 0 COMMENT ' 病友ID ',
`question_parent_code` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 测评试题上级code 联合索引 ',
`question_id` bigint(20) NULL DEFAULT 0 COMMENT ' 测评试题ID ',
`option_id` bigint(20) NULL DEFAULT 0 COMMENT '选项ID',
`option_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 选项name ',
`score` decimal(11, 1) NULL DEFAULT 0.0 COMMENT ' 得分 ',
`type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 类型(0:答案和得分 1:答案 2:得分) ',
`answer` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 用户答案(存储图片或语音路径) ',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NOT NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
PRIMARY KEY (`id`) USING BTREE,
INDEX `score_report_index`(`patient_report_id`) USING BTREE,
INDEX `score_question_index`(`question_parent_code`, `question_id`) USING BTREE,
INDEX `score_patient_index`(`patient_id`) USING BTREE,
INDEX `score_option_index`(`option_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '病友得分表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_position
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_position`;
CREATE TABLE `t_ht_position` (
`id` bigint(20) NOT NULL,
`type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 类型(1:医院 2:科室 3:职务) ',
`name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 名称 ',
`superior_department_id` bigint(20) NULL DEFAULT 0 COMMENT ' 所属部门ID 普通索引 ',
`superior_id` bigint(20) NULL DEFAULT 0 COMMENT ' 上级职务ID 普通索引 ',
`relevancy` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 关联单位 ',
`has_manage` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否有管理权限(1:是 0:否) ',
`has_audit` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否有审核权限(1:是 0:否)',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NOT NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `position_name_index`(`name`, `superior_department_id`) USING BTREE,
INDEX `position_superior_department_index`(`superior_department_id`) USING BTREE,
INDEX `position_superior_index`(`superior_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '职务表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_question
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_question`;
CREATE TABLE `t_ht_question` (
`id` bigint(20) NOT NULL,
`evaluation_code` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 测评分类code(报告单表的编码) 联合索引 ',
`parent_code` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 上级code(报告单表的编码) 普通索引 ',
`sort` int(11) NULL DEFAULT 0 COMMENT ' 排序 联合索引 ',
`question` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 题目',
`type` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '1文本,2图片,3语音,4选项,5连线且文字倒转,6文本倒转,7:图片且题目和选项位置互换,8:图片且图片颠倒',
`record_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 额外记录类型(errorMsg:错误信息,otherMsg:其他内容) ',
`record_content` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 额外记录内容 ',
`relation_code` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 关联题目code,多个code之间使用,分割 ',
`relation_id` bigint(20) NULL DEFAULT 0 COMMENT '关联题目ID',
`operate_type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 用户操作类型(0无,1语音,2画图,4敲击) ',
`recode_starttime` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否需要记录动笔时长(1是0否) ',
`time_wabei` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否需要定时截图保存(1是0否) ',
`allow_clear` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否允许重画(0否1是2回退) ',
`clear_times` int(11) NULL DEFAULT 0 COMMENT ' 最多重画次数 ',
`timing_length` int(11) NULL DEFAULT 0 COMMENT ' 定时器时长 ',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NOT NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `question_evaluation_index`(`evaluation_code`, `sort`) USING BTREE,
INDEX `question_parent_index`(`parent_code`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '测试题表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_question_introducer
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_question_introducer`;
CREATE TABLE `t_ht_question_introducer` (
`id` bigint(20) NOT NULL,
`question_id` bigint(20) NULL DEFAULT 0 COMMENT ' 测评试题ID 索引 ',
`content` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 引导语内容 ',
`sort` int(11) NULL DEFAULT 0 COMMENT ' 排序 ',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NOT NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `introducer_question_index`(`question_id`, `sort`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '引导语表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_question_option
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_question_option`;
CREATE TABLE `t_ht_question_option` (
`id` bigint(20) NOT NULL,
`question_id` bigint(20) NULL DEFAULT 0 COMMENT ' 测评试题ID',
`sort` int(11) NULL DEFAULT 1 COMMENT ' 排序 ',
`type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '选项类型(redio:单选,checkbox:多选,number-socre:用户输入分数,) ',
`name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 选项变量名 ',
`score` decimal(11, 1) NULL DEFAULT 0.0 COMMENT ' 选项分数 ',
`display` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 选项内容 ',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注,使用:{sum:1,isAutoformula:1,formulaSymbol:\"*\",formulaName:\"frequency,degree\"} sum:求和,isAutoformula:是否自动进行计算,formulaSymbol:计算符号,formulaName:计算属性 ',
`create_time` timestamp NOT NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `option_question_index`(`question_id`, `sort`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '选项表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_question_option_desc
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_question_option_desc`;
CREATE TABLE `t_ht_question_option_desc` (
`id` bigint(20) NOT NULL,
`option_id` bigint(20) NULL DEFAULT 0 COMMENT ' 选项ID',
`sort` int(11) NULL DEFAULT 1 COMMENT ' 排序 ',
`type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '类型 1 最大值',
`content` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 对应值 ',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
PRIMARY KEY (`id`) USING BTREE,
INDEX `option_desc_option_index`(`option_id`, `sort`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '选项说明表 选项有其他补充,完善该表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_question_record
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_question_record`;
CREATE TABLE `t_ht_question_record` (
`id` bigint(20) NOT NULL,
`record_type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '0:code 1:试题',
`question_id` bigint(20) NULL DEFAULT 0 COMMENT '题目ID或code_id',
`sort` int(11) NULL DEFAULT 0 COMMENT ' 排序 联合索引 ',
`calc_type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '0:点击过程 1:自动计算 2:手动计算',
`show_title` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '显示内容',
`show_form` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '显示形式',
`default_value` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '默认值',
`type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '自动计算规则:0:答案个数 1:插入数 同一物品两次以上插入算为一个插入 2:重复数 每次重复均算为一次重复',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
PRIMARY KEY (`id`) USING BTREE,
INDEX `question_record_question_index`(`question_id`, `sort`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '测试题其他记录表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_question_record_option
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_question_record_option`;
CREATE TABLE `t_ht_question_record_option` (
`id` bigint(20) NOT NULL,
`question_record_id` bigint(20) NULL DEFAULT 0 COMMENT '题目其他记录ID',
`sort` int(11) NULL DEFAULT 0 COMMENT ' 排序 联合索引 ',
`data_key` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '提交值',
`data_value` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '显示值',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
PRIMARY KEY (`id`) USING BTREE,
INDEX `record_option_question_index`(`question_record_id`, `sort`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '测试题其他记录表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_question_relevance
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_question_relevance`;
CREATE TABLE `t_ht_question_relevance` (
`id` bigint(20) NOT NULL,
`question_id` bigint(20) NULL DEFAULT 0 COMMENT '问题id',
`relevance_id` bigint(20) NULL DEFAULT 0 COMMENT '被关联的问题的id',
`create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '试题关联表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_question_scoring_rule
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_question_scoring_rule`;
CREATE TABLE `t_ht_question_scoring_rule` (
`id` bigint(20) NOT NULL,
`question_id` bigint(20) NULL DEFAULT 0 COMMENT ' 测评试题ID 索引 ',
`type` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT ' 计分规则类型,0:个数判断-从小到大 ',
`detail` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 计分规则详细内容:例子:[{\"small\":0,\"key\":0},{\"small\":1,\"key\":1},{\"small\":3,\"key\":2},{\"small\":5,\"key\":3}]',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NOT NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `scoring_rule_question_index`(`question_id`, `type`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '测试计分规则表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_relation
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_relation`;
CREATE TABLE `t_ht_relation` (
`id` bigint(20) NOT NULL,
`user_id` bigint(20) NULL DEFAULT 0 COMMENT ' 普通索引 ',
`relation_url` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 关联路径 ',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NOT NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
PRIMARY KEY (`id`) USING BTREE,
INDEX `relation_user_index`(`user_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '关联其他域' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_report
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_report`;
CREATE TABLE `t_ht_report` (
`id` bigint(20) NOT NULL,
`code` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 编码 索引 ',
`name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 名称 ',
`parent_code` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 上级编码 索引 ',
`description` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 划界描述 ',
`total_score` int(11) NULL DEFAULT 0 COMMENT ' 总分(<0:不需要显示总分,=0:不计分, >0:总分) ',
`type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 类型(1:报告单 2:测评 3:测评子类 4:二级子类) ',
`is_show` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否在报告单上显示(1:是 0:否) ',
`sort` int(11) NULL DEFAULT 0 COMMENT ' 报告单展示顺序 ',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NOT NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
PRIMARY KEY (`id`) USING BTREE,
INDEX `report_code_index`(`code`) USING BTREE,
INDEX `report_parent_code_index`(`parent_code`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '报告单表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_title
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_title`;
CREATE TABLE `t_ht_title` (
`id` bigint(20) NOT NULL,
`type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 类型(1:医生 2:护士) ',
`title` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 职称 ',
`superidor_id` bigint(20) NULL DEFAULT 0 COMMENT ' 上级ID ',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NOT NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '职称表' ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;

141
logisticspark.sql

@ -0,0 +1,141 @@
/*
Navicat Premium Data Transfer
Source Server :
Source Server Type : MariaDB
Source Server Version : 100318
Source Host : test.tall.wiki:3306
Source Schema : logisticspark
Target Server Type : MariaDB
Target Server Version : 100318
File Encoding : 65001
Date: 13/05/2021 15:12:01
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for t_logistics_car_record
-- ----------------------------
DROP TABLE IF EXISTS `t_logistics_car_record`;
CREATE TABLE `t_logistics_car_record` (
`id` bigint(20) NOT NULL COMMENT '车辆记录id',
`car_type` tinyint(1) NULL DEFAULT 0 COMMENT '车辆类型(0-小型车,1-中型车,2-大型车)',
`license_plate` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '车牌号',
`plate_type` tinyint(1) NULL DEFAULT 0 COMMENT '车牌类型(0-蓝牌,1-绿牌)',
`files_id` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '车辆照片(最多三张)',
`car_weight` bigint(20) NULL DEFAULT 0 COMMENT '车辆重量',
`in_out` tinyint(1) NULL DEFAULT 0 COMMENT '进出类型(0-进,1-出)',
`car_brand` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '车辆品牌',
`warehouse_id` bigint(20) NULL DEFAULT 0 COMMENT '厂区id',
`record_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 `warehouse_index`(`warehouse_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '厂区车辆记录表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_logistics_environment_record
-- ----------------------------
DROP TABLE IF EXISTS `t_logistics_environment_record`;
CREATE TABLE `t_logistics_environment_record` (
`id` bigint(20) NOT NULL COMMENT '环境记录id',
`num_value` decimal(15, 2) NULL DEFAULT 0.00 COMMENT '测量数值',
`num_type` tinyint(1) NULL DEFAULT 0 COMMENT '测量类型(0-湿度,1-温度,2-漏水检测)',
`equipment_id` bigint(20) NULL DEFAULT 0 COMMENT '设备id',
`warehouse_id` bigint(20) NULL DEFAULT 0 COMMENT '仓库id',
`equipment_num` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '设备编号',
`record_time` bigint(20) NULL DEFAULT 0 COMMENT '记录时间',
`is_alarm` tinyint(1) NULL DEFAULT 0 COMMENT '是否报警(0-否,1-是)',
`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 `warehouse_index`(`warehouse_id`) USING BTREE,
INDEX `equipment_index`(`equipment_id`) USING BTREE,
INDEX `num_index`(`equipment_num`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '仓库环境记录表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_logistics_equipment
-- ----------------------------
DROP TABLE IF EXISTS `t_logistics_equipment`;
CREATE TABLE `t_logistics_equipment` (
`id` bigint(20) NOT NULL COMMENT '设备id',
`name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '设备名称',
`equipment_number` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '设备编号',
`equipment_type` tinyint(2) NULL DEFAULT 0 COMMENT '设备类型(0-摄像头,1-温度测试,2-湿度测试,3-漏水检测)',
`warehouse_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,
`equipment_location` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '摄像头地址',
`remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`id`) USING BTREE,
INDEX `warehouse_index`(`warehouse_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '仓库设备表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_logistics_heat_imaging_record
-- ----------------------------
DROP TABLE IF EXISTS `t_logistics_heat_imaging_record`;
CREATE TABLE `t_logistics_heat_imaging_record` (
`id` bigint(20) NOT NULL COMMENT '热成像设备记录id',
`num_value` decimal(15, 2) NULL DEFAULT 0.00 COMMENT '测量数值',
`num_type` tinyint(1) NULL DEFAULT 0 COMMENT '测量类型(0-湿度,1-温度)',
`max_t` decimal(15, 2) NULL DEFAULT 0.00 COMMENT '最高温度',
`max_tx` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '图像数据最高温度横坐标位置',
`max_ty` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '图像数据最高温度纵坐标位置',
`image_data` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '图像数据编码',
`record_time` bigint(20) NULL DEFAULT NULL COMMENT '记录时间',
`equipment_id` bigint(20) NULL DEFAULT 0 COMMENT '设备id',
`warehouse_id` bigint(20) NULL DEFAULT 0 COMMENT '仓库id',
`equipment_num` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT 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,
INDEX `equipment_index`(`equipment_id`) USING BTREE,
INDEX `warehouse_index`(`warehouse_id`) USING BTREE,
INDEX `num_index`(`equipment_num`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '热成像记录表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_logistics_park_equipment
-- ----------------------------
DROP TABLE IF EXISTS `t_logistics_park_equipment`;
CREATE TABLE `t_logistics_park_equipment` (
`id` bigint(20) NOT NULL COMMENT '设备id',
`name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '设备名称',
`equipment_number` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '设备编号',
`equipment_type` tinyint(2) NULL DEFAULT 0 COMMENT '设备类型(0-车辆识别摄像头进,1-车辆识别摄像头出,2-红外识别摄像头,3-4G摄像头)',
`park_id` bigint(20) NULL DEFAULT 0 COMMENT '园区id',
`equipment_location` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT 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,
INDEX `park_index`(`park_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '园区设备表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_logistics_warehouse
-- ----------------------------
DROP TABLE IF EXISTS `t_logistics_warehouse`;
CREATE TABLE `t_logistics_warehouse` (
`id` bigint(20) NOT NULL COMMENT '仓库id',
`name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '仓库名',
`park_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 `park_index`(`park_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '物流园仓库表' ROW_FORMAT = Compact;
SET FOREIGN_KEY_CHECKS = 1;

914
mt.sql

@ -0,0 +1,914 @@
/*
Navicat Premium Data Transfer
Source Server :
Source Server Type : MariaDB
Source Server Version : 100318
Source Host : test.tall.wiki:3306
Source Schema : mt
Target Server Type : MariaDB
Target Server Version : 100318
File Encoding : 65001
Date: 13/05/2021 15:12:11
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for t_common_file
-- ----------------------------
DROP TABLE IF EXISTS `t_common_file`;
CREATE TABLE `t_common_file` (
`id` bigint(20) UNSIGNED NOT NULL,
`user_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '上传用户ID',
`file_name` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '文件名',
`location` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '存储位置',
`visit_location` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' 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
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文件表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_compete_coach
-- ----------------------------
DROP TABLE IF EXISTS `t_compete_coach`;
CREATE TABLE `t_compete_coach` (
`id` bigint(20) NOT NULL,
`identity` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '身份 0领队 1教练',
`name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '姓名',
`gender` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '性别 0女 1男',
`phone` 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 '身份证号',
`id_photo` bigint(20) NULL DEFAULT 0 COMMENT '证件照文件的id',
`coach_certificate` bigint(20) NULL DEFAULT 0 COMMENT '教练证文件的id 只有教练有 非必填',
`company_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 COMMENT '状态,0正常 1禁用 2删除',
PRIMARY KEY (`id`) USING BTREE,
INDEX `id_photo_index`(`id_photo`) USING BTREE,
INDEX `coach_certificate_index`(`coach_certificate`) USING BTREE,
INDEX `company_index`(`company_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '领队教练表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_compete_company
-- ----------------------------
DROP TABLE IF EXISTS `t_compete_company`;
CREATE TABLE `t_compete_company` (
`id` bigint(20) NOT NULL,
`name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '单位名称',
`type` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '参加的比赛的类型,默认为跳绳比赛:0跳绳 。。。',
`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删除',
`compete_time_id` bigint(20) NULL DEFAULT 0 COMMENT '大赛id',
`contacts_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '联系人姓名',
`contacts_phone` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '联系方式(手机号)',
`user_id` bigint(20) NULL DEFAULT 0 COMMENT 'userId',
`join_num` int(11) NULL DEFAULT 0 COMMENT '参赛人数',
`leader_num` int(11) NULL DEFAULT 0 COMMENT '领队人数',
`coach_num` int(11) NULL DEFAULT 0 COMMENT '教练人数',
`authorization` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '是否同意安全责任书 0否 1是',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '参赛项目信息' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_compete_company_copy
-- ----------------------------
DROP TABLE IF EXISTS `t_compete_company_copy`;
CREATE TABLE `t_compete_company_copy` (
`id` bigint(20) NOT NULL,
`name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '单位名称',
`type` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '参加的比赛的类型,默认为跳绳比赛:0跳绳 。。。',
`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删除',
`compete_time_id` bigint(20) NULL DEFAULT 0 COMMENT '大赛id',
`contacts_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '联系人姓名',
`contacts_phone` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '联系方式(手机号)',
`user_id` bigint(20) NULL DEFAULT 0 COMMENT 'userId',
`join_num` int(11) NULL DEFAULT 0 COMMENT '参赛人数',
`leader_num` int(11) NULL DEFAULT 0 COMMENT '领队人数',
`coach_num` int(11) NULL DEFAULT 0 COMMENT '教练人数',
`authorization` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '是否同意安全责任书 0否 1是',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '参赛项目信息' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_compete_company_role
-- ----------------------------
DROP TABLE IF EXISTS `t_compete_company_role`;
CREATE TABLE `t_compete_company_role` (
`id` bigint(20) NOT NULL,
`player_id` bigint(20) NULL DEFAULT 0 COMMENT '选手id',
`compete_company_id` bigint(20) NULL DEFAULT 0 COMMENT '单位(院校)id',
`type` tinyint(2) UNSIGNED 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 COMMENT '状态,0正常 1禁用 2删除',
PRIMARY KEY (`id`) USING BTREE,
INDEX `player_index`(`player_id`) USING BTREE,
INDEX `compete_company_index`(`compete_company_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '人员在院系内的身份' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_compete_count_score
-- ----------------------------
DROP TABLE IF EXISTS `t_compete_count_score`;
CREATE TABLE `t_compete_count_score` (
`id` bigint(20) NOT NULL,
`compete_time_id` bigint(20) NULL DEFAULT 0 COMMENT '参加的大赛的id(第几届的xx比赛)',
`project_id` bigint(20) NULL DEFAULT 0 COMMENT '项目id',
`site_order_id` bigint(20) NULL DEFAULT 0 COMMENT '场次表id(出场顺序表)',
`chief_judgment_score` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '主裁判打分',
`judgment_a_score` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '裁判一打分',
`judgment_b_score2` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '裁判二打分',
`should_times` int(11) NULL DEFAULT 0 COMMENT '应得数',
`deduct_times` int(11) NULL DEFAULT 0 COMMENT '扣除次数',
`deduct_cause` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '扣除原因',
`final_score` decimal(10, 2) NULL DEFAULT -1. 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 `score_compete_time_index`(`compete_time_id`) USING BTREE,
INDEX `score_project_index`(`project_id`) USING BTREE,
INDEX `score_site_order_index`(`site_order_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '计数赛评分表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_compete_group
-- ----------------------------
DROP TABLE IF EXISTS `t_compete_group`;
CREATE TABLE `t_compete_group` (
`id` bigint(20) NOT NULL,
`group_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '分组名称',
`description` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '描述',
`start_age` int(11) NULL DEFAULT 0 COMMENT '开始年龄',
`end_age` int(11) NULL DEFAULT 0 COMMENT '结束年龄',
`sequence` int(11) NULL DEFAULT 0 COMMENT '排序',
`type` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '参加的比赛的类型,默认为跳绳比赛:0跳绳 。。。',
`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删除',
`sex` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '性别 0女 1男',
`max_age` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '最大年龄',
`min_age` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '最小年龄',
`group_remark` tinyint(2) NULL DEFAULT 0 COMMENT '组别描述 1小学,2中学,3高职院校,4本科院校,5俱乐部',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '年龄组信息' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_compete_judgment
-- ----------------------------
DROP TABLE IF EXISTS `t_compete_judgment`;
CREATE TABLE `t_compete_judgment` (
`id` bigint(20) NOT NULL,
`name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '名字',
`phone` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '手机号',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '备注',
`compete_time_id` bigint(20) NULL DEFAULT 0 COMMENT '参加的大赛的id(第几届的xx比赛)',
`site` int(11) NULL DEFAULT 0 COMMENT '场地(某个项目下的第几个场次)',
`project_id` bigint(20) NULL DEFAULT 0 COMMENT '比赛项目id',
`user_id` bigint(20) NULL DEFAULT 0 COMMENT 'tall用户id',
`member_id` bigint(20) NULL DEFAULT 0 COMMENT '该用户在tall系统内的成员id',
`role_id` bigint(20) NULL DEFAULT 0 COMMENT '该用户在tall系统内的角色id',
`chief_judgment` tinyint(3) UNSIGNED NULL DEFAULT 0 COMMENT '0:主裁判 1:裁判1 2:裁判2 3:裁判3 4:裁判4 5:裁判5 6:裁判6 7:裁判7',
`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 `judgment_compete_time_index`(`compete_time_id`) USING BTREE,
INDEX `judgment_project_index`(`project_id`) USING BTREE,
INDEX `judgment_user_index`(`user_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '裁判信息表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_compete_order_remark
-- ----------------------------
DROP TABLE IF EXISTS `t_compete_order_remark`;
CREATE TABLE `t_compete_order_remark` (
`id` bigint(20) NOT NULL,
`start_order_id` bigint(20) NULL DEFAULT 0 COMMENT '场次id',
`judgment_id` bigint(20) NULL DEFAULT 0 COMMENT '裁判id',
`description` varchar(255) CHARACTER SET utf8 COLLATE utf8_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,
INDEX `remark_start_order_index`(`start_order_id`) USING BTREE,
INDEX `remark_judgment_index`(`judgment_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '裁判场次备注表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_compete_player
-- ----------------------------
DROP TABLE IF EXISTS `t_compete_player`;
CREATE TABLE `t_compete_player` (
`id` bigint(20) NOT NULL,
`user_id` bigint(20) NULL DEFAULT 0 COMMENT 'userId',
`name` 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 '身份证',
`phone` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '手机号',
`gender` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '性别 0女 1男',
`id_card_front` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '身份证图片正面',
`id_card_back` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '身份证图片背面',
`prove_img` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '证明文件',
`compete_group_id` bigint(20) NULL DEFAULT 0 COMMENT '参赛组别',
`company_id` bigint(20) NULL DEFAULT 0 COMMENT '参赛单位id',
`authorization` tinyint(1) UNSIGNED 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删除',
`compete_time_id` bigint(20) NULL DEFAULT 0 COMMENT '大赛id',
`id_card_front_file` bigint(20) NULL DEFAULT 0 COMMENT '身份证正面照片的文件id 或户口本照片',
`id_card_back_file` bigint(20) NULL DEFAULT 0 COMMENT '身份证反面照片的文件id',
`id_photo_file` bigint(20) NULL DEFAULT 0 COMMENT '一寸证件照文件的id',
`student_record_file` bigint(20) NULL DEFAULT 0 COMMENT '学籍证明/俱乐部证明',
`health_record_file` bigint(20) NULL DEFAULT 0 COMMENT '体检证明',
`insurance_record_file` bigint(20) NULL DEFAULT 0 COMMENT '保险证明',
`group_remark` tinyint(2) NULL DEFAULT 0 COMMENT '组别描述 1小学,2中学,3高职院校,4本科院校,5俱乐部',
`responsibility_risk_file` bigint(20) NULL DEFAULT 0 COMMENT '自愿参赛责任及风险告知书',
PRIMARY KEY (`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_compete_player_copy
-- ----------------------------
DROP TABLE IF EXISTS `t_compete_player_copy`;
CREATE TABLE `t_compete_player_copy` (
`id` bigint(20) NOT NULL,
`user_id` bigint(20) NULL DEFAULT 0 COMMENT 'userId',
`name` 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 '身份证',
`phone` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '手机号',
`gender` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '性别 0女 1男',
`id_card_front` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '身份证图片正面',
`id_card_back` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '身份证图片背面',
`prove_img` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '证明文件',
`compete_group_id` bigint(20) NULL DEFAULT 0 COMMENT '参赛组别',
`company_id` bigint(20) NULL DEFAULT 0 COMMENT '参赛单位id',
`authorization` tinyint(1) UNSIGNED 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删除',
`compete_time_id` bigint(20) NULL DEFAULT 0 COMMENT '大赛id',
`id_card_front_file` bigint(20) NULL DEFAULT 0 COMMENT '身份证正面照片的文件id 或户口本照片',
`id_card_back_file` bigint(20) NULL DEFAULT 0 COMMENT '身份证反面照片的文件id',
`id_photo_file` bigint(20) NULL DEFAULT 0 COMMENT '一寸证件照文件的id',
`student_record_file` bigint(20) NULL DEFAULT 0 COMMENT '学籍证明/俱乐部证明',
`health_record_file` bigint(20) NULL DEFAULT 0 COMMENT '体检证明',
`insurance_record_file` bigint(20) NULL DEFAULT 0 COMMENT '保险证明',
`group_remark` tinyint(2) NULL DEFAULT 0 COMMENT '组别描述 1小学,2中学,3高职院校,4本科院校,5俱乐部',
PRIMARY KEY (`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_compete_player_family
-- ----------------------------
DROP TABLE IF EXISTS `t_compete_player_family`;
CREATE TABLE `t_compete_player_family` (
`id` bigint(20) NOT NULL,
`player_id` bigint(20) NULL DEFAULT 0 COMMENT '报名的选手id',
`children_id` bigint(20) NULL DEFAULT 0 COMMENT '关联的家人的playerid',
`description` varchar(255) 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 COMMENT '状态,0正常 1禁用 2删除',
PRIMARY KEY (`id`) USING BTREE,
INDEX `player_index`(`player_id`) USING BTREE,
INDEX `children_index`(`children_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '亲子信息关联表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_compete_player_look
-- ----------------------------
DROP TABLE IF EXISTS `t_compete_player_look`;
CREATE TABLE `t_compete_player_look` (
`id` bigint(20) NOT NULL,
`company_id` bigint(20) NULL DEFAULT 0 COMMENT '单位id',
`look_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '观看状态 0未观看,1已观看',
`look_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 COMMENT '状态,0正常 1禁用 2删除',
PRIMARY KEY (`id`) USING BTREE,
INDEX `video_company_index`(`company_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '单位观看开幕式视频记录(签到用)' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_compete_project
-- ----------------------------
DROP TABLE IF EXISTS `t_compete_project`;
CREATE TABLE `t_compete_project` (
`id` bigint(20) NOT NULL,
`name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '项目名称',
`parent_id` bigint(20) NULL DEFAULT 0 COMMENT '父级id',
`level` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '分组等级',
`team` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '是否为团队项目,0不是 1是',
`join_rule` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '参加限制,0同单位同组别,1同单位不限组别',
`certificate` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '是否支持通级(考证) 0否 1是',
`member_min` int(11) UNSIGNED NULL DEFAULT 0 COMMENT '最少人数',
`member_max` int(11) UNSIGNED NULL DEFAULT 0 COMMENT '最多人数',
`type` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '参加的比赛的类型,默认为跳绳比赛:0跳绳 。。。',
`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删除',
`compete_time_id` bigint(20) NULL DEFAULT 0 COMMENT '大赛id',
PRIMARY KEY (`id`) USING BTREE,
INDEX `parent_index`(`parent_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '参赛项目信息' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_compete_project_config
-- ----------------------------
DROP TABLE IF EXISTS `t_compete_project_config`;
CREATE TABLE `t_compete_project_config` (
`id` bigint(20) NOT NULL,
`project_id` bigint(20) NULL DEFAULT 0 COMMENT '项目id',
`project_duration` bigint(20) NULL DEFAULT 0 COMMENT '项目时长',
`site_num` int(11) UNSIGNED NULL DEFAULT 1 COMMENT '场地数量',
`start_time` bigint(20) NULL DEFAULT 0 COMMENT '该项目开始时间',
`end_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 COMMENT '状态,0正常 1禁用 2删除',
`video_start_time` bigint(20) NULL DEFAULT 0 COMMENT '上传视频的开始时间',
`video_end_time` bigint(20) NULL DEFAULT 0 COMMENT '上传视频的结束时间',
`video_restrict` tinyint(2) NULL DEFAULT 0 COMMENT '是否限制可以上传视频的时间 0不限制 1限制',
PRIMARY KEY (`id`) USING BTREE,
INDEX `config_project_index`(`project_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '比赛项目配置场次信息表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_compete_project_group
-- ----------------------------
DROP TABLE IF EXISTS `t_compete_project_group`;
CREATE TABLE `t_compete_project_group` (
`id` bigint(20) NOT NULL,
`project_id` bigint(20) NULL DEFAULT 0 COMMENT '比赛项目id',
`group_id` bigint(20) NULL DEFAULT 0 COMMENT '不可见的组别的id',
`description` varchar(255) 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 COMMENT '状态,0正常 1禁用 2删除',
PRIMARY KEY (`id`) USING BTREE,
INDEX `project_index`(`project_id`) USING BTREE,
INDEX `group_index`(`group_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '比赛项目对组别不可见' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_compete_project_player
-- ----------------------------
DROP TABLE IF EXISTS `t_compete_project_player`;
CREATE TABLE `t_compete_project_player` (
`id` bigint(20) NOT NULL,
`player_id` bigint(20) NULL DEFAULT 0 COMMENT '参赛选手id',
`project_id` bigint(20) NULL DEFAULT 0 COMMENT '参赛项目id',
`compete_time_id` bigint(20) NULL DEFAULT 0 COMMENT '第几届id',
`gender_group` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '性别组,0女 1男 2混合 单人项目与参赛选手相同,团队项目若有一个异性则变为混合组',
`certificate` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '是否选择通级(只有项目支持通级才可以选择) 0否 1是',
`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删除',
`compete_group_id` bigint(20) NULL DEFAULT 0 COMMENT '组别id',
`success` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '报名是否成功 0否 1是 默认成功',
PRIMARY KEY (`id`) USING BTREE,
INDEX `player_index`(`player_id`) USING BTREE,
INDEX `project_index`(`project_id`) USING BTREE,
INDEX `compete_time_index`(`compete_time_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '参赛项目信息' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_compete_speed_video
-- ----------------------------
DROP TABLE IF EXISTS `t_compete_speed_video`;
CREATE TABLE `t_compete_speed_video` (
`id` bigint(20) NOT NULL,
`company_id` bigint(20) NULL DEFAULT 0 COMMENT '单位id',
`company_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '单位名',
`player_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '选手名',
`user_id` bigint(20) NULL DEFAULT 0 COMMENT 'userId',
`video_url_one` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '视频路径1',
`video_url_two` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '视频路径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,
PRIMARY KEY (`id`) USING BTREE,
INDEX `speed_video_company_index`(`company_id`) USING BTREE,
INDEX `rspeed_video_user_index`(`user_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '通级赛视频' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_compete_start_order
-- ----------------------------
DROP TABLE IF EXISTS `t_compete_start_order`;
CREATE TABLE `t_compete_start_order` (
`id` bigint(20) NOT NULL,
`project_id` bigint(20) NULL DEFAULT 0 COMMENT '比赛项目id',
`player_id` bigint(20) NULL DEFAULT 0 COMMENT '选手参赛记录id/团队id project_player_id/team_id',
`team` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '是否是团体 0否 1是',
`compete_order` tinyint(3) UNSIGNED NULL DEFAULT 0 COMMENT '场次',
`site` tinyint(3) UNSIGNED NULL DEFAULT 0 COMMENT '场地信息(123456)',
`task_id` bigint(20) NULL DEFAULT 0 COMMENT '关联tall的任务id',
`start_time` bigint(20) NULL DEFAULT 0 COMMENT '该场次开始时间',
`end_time` bigint(20) NULL DEFAULT 0 COMMENT '该场次结束时间',
`waiver` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '是否弃权,0正常,1弃权,2取消比赛资格',
`remark` varchar(255) 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 COMMENT '状态,0正常 1禁用 2删除',
PRIMARY KEY (`id`) USING BTREE,
INDEX `start_order_project_index`(`project_id`) USING BTREE,
INDEX `start_order_player_index`(`player_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '出场顺序表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_compete_team
-- ----------------------------
DROP TABLE IF EXISTS `t_compete_team`;
CREATE TABLE `t_compete_team` (
`id` bigint(20) NOT NULL,
`creator` bigint(20) NULL DEFAULT 0 COMMENT '创建者id(playerId)',
`project_id` bigint(20) NULL DEFAULT 0 COMMENT '参赛项目id',
`compete_time_id` bigint(20) NULL DEFAULT 0 COMMENT '第几届id',
`gender_group` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '性别组,0女 1男 2混合 单人项目与参赛选手相同,团队项目若有一个异性则变为混合组',
`certificate` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '是否选择通级(只有项目支持通级才可以选择) 0否 1是',
`qr_code` varchar(255) 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 COMMENT '状态,0正常 1禁用 2删除',
`compete_group_id` bigint(20) NULL DEFAULT 0 COMMENT '组别id',
`success` tinyint(1) UNSIGNED NULL DEFAULT 1 COMMENT '报名是否成功 0否 1是 默认成功',
`company_id` bigint(20) NULL DEFAULT 0 COMMENT '单位id',
`group_remark` tinyint(2) NULL DEFAULT 0 COMMENT '组别描述 1小学,2中学,3高职院校,4本科院校,5俱乐部',
PRIMARY KEY (`id`) USING BTREE,
INDEX `creator_index`(`creator`) USING BTREE,
INDEX `project_index`(`project_id`) USING BTREE,
INDEX `compete_time_index`(`compete_time_id`) USING BTREE,
INDEX `team_company_index`(`company_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '团队表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_compete_team_member
-- ----------------------------
DROP TABLE IF EXISTS `t_compete_team_member`;
CREATE TABLE `t_compete_team_member` (
`id` bigint(20) NOT NULL,
`player_id` bigint(20) NULL DEFAULT 0 COMMENT '参赛选手id',
`compete_team_id` bigint(20) NULL DEFAULT 0 COMMENT '团队id',
`captain` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '是否为队长 0否 1是',
`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 `player_index`(`player_id`) USING BTREE,
INDEX `compete_team_insex`(`compete_team_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '团队成员表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_compete_time
-- ----------------------------
DROP TABLE IF EXISTS `t_compete_time`;
CREATE TABLE `t_compete_time` (
`id` bigint(20) NOT NULL,
`name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '名称',
`type` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '参加的比赛的类型,默认为跳绳比赛:0跳绳 。。。',
`start_time` bigint(20) NULL DEFAULT 0 COMMENT '开始时间',
`end_time` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '结束时间',
`sign_up_start_time` bigint(20) NULL DEFAULT 0 COMMENT '报名开始时间',
`sign_up_end_time` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '报名结束时间',
`compete_status` tinyint(2) UNSIGNED NULL 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 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_compete_time_copy
-- ----------------------------
DROP TABLE IF EXISTS `t_compete_time_copy`;
CREATE TABLE `t_compete_time_copy` (
`id` bigint(20) NOT NULL,
`name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '名称',
`type` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '参加的比赛的类型,默认为跳绳比赛:0跳绳 。。。',
`start_time` bigint(20) NULL DEFAULT 0 COMMENT '开始时间',
`end_time` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '结束时间',
`sign_up_start_time` bigint(20) NULL DEFAULT 0 COMMENT '报名开始时间',
`sign_up_end_time` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '报名结束时间',
`compete_status` tinyint(2) UNSIGNED NULL 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 NULL DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '参赛项目信息' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_compete_variety_score
-- ----------------------------
DROP TABLE IF EXISTS `t_compete_variety_score`;
CREATE TABLE `t_compete_variety_score` (
`id` bigint(20) NOT NULL,
`compete_time_id` bigint(20) NULL DEFAULT 0 COMMENT '参加的大赛的id(第几届的xx比赛)',
`project_id` bigint(20) NULL DEFAULT 0 COMMENT '项目id',
`site_order_id` bigint(20) NULL DEFAULT 0 COMMENT '场次表id(出场顺序表)',
`code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '计分code',
`score` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '分数',
`judgment_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 COMMENT '状态,0正常 1禁用 2删除',
PRIMARY KEY (`id`) USING BTREE,
INDEX `variety_compete_time_index`(`compete_time_id`) USING BTREE,
INDEX `variety_project_index`(`project_id`) USING BTREE,
INDEX `variety_judgment_index`(`judgment_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '花样赛计分表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_compete_video
-- ----------------------------
DROP TABLE IF EXISTS `t_compete_video`;
CREATE TABLE `t_compete_video` (
`id` bigint(20) NOT NULL,
`compete_time_id` bigint(20) NULL DEFAULT 0 COMMENT '参加的大赛的id(第几届的xx比赛)',
`project_id` bigint(20) NULL DEFAULT 0 COMMENT '项目id',
`player_id` bigint(20) NULL DEFAULT 0 COMMENT '选手项目关联记录表id或团队id',
`user_id` bigint(20) NULL DEFAULT 0 COMMENT '上传者用户id',
`video_url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '视频路径(云点播返回)',
`upload_time` bigint(20) NULL DEFAULT 0 COMMENT '上传时间',
`upload_status` tinyint(1) UNSIGNED 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 COMMENT '状态,0正常 1禁用 2删除',
`task_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '视频处理任务 ID',
`video_url_origin` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '视频路径(云点播返回)',
PRIMARY KEY (`id`) USING BTREE,
INDEX `compete_time_index`(`compete_time_id`) USING BTREE,
INDEX `video_project_index`(`project_id`) USING BTREE,
INDEX `video_player_index`(`player_id`) USING BTREE,
INDEX `video_user_index`(`user_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '选手上传视频记录表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_constant
-- ----------------------------
DROP TABLE IF EXISTS `t_constant`;
CREATE TABLE `t_constant` (
`id` bigint(20) NOT NULL,
`project_id` bigint(20) NULL DEFAULT 0,
`business_id` bigint(20) NULL DEFAULT 0 COMMENT '业务id',
`business_type` tinyint(2) NOT NULL DEFAULT 0 COMMENT '业务id的类型 0跳绳比赛 ',
`t_key` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '',
`t_value` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '',
`description` varchar(255) CHARACTER SET utf8 COLLATE utf8_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 = utf8 COLLATE = utf8_general_ci COMMENT = '常量表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_file
-- ----------------------------
DROP TABLE IF EXISTS `t_file`;
CREATE TABLE `t_file` (
`id` bigint(20) NOT NULL,
`file_id` bigint(20) NULL DEFAULT 0 COMMENT '本公司上传资料集合的id',
`files_id` bigint(20) NULL DEFAULT 0 COMMENT '上传的某文件的id',
`created_at` timestamp NOT NULL DEFAULT current_timestamp,
`updated_at` timestamp NOT NULL DEFAULT current_timestamp,
`rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0,
PRIMARY KEY (`id`) USING BTREE,
INDEX `t_file_INDEX`(`file_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '服务申请加入表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_level_rule
-- ----------------------------
DROP TABLE IF EXISTS `t_level_rule`;
CREATE TABLE `t_level_rule` (
`id` bigint(20) NOT NULL,
`compete_time_id` bigint(20) NULL DEFAULT 0 COMMENT '参加的大赛的id(第几届的xx比赛)',
`compete_code_now` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '当前比赛的code',
`compete_code_level_up` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '晋级比赛code',
`rule` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '晋级规则(0:不晋级 1:名次(不重复) 2:名次(重复) 3:分数 4:指定晋级人员 5:团体赛按名次)',
`level_condition` int(11) NULL DEFAULT 0 COMMENT '晋级条件(前几名 大于多少分)',
`auto_level` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '是否自动晋级 0否 1是',
`compete_order` tinyint(1) UNSIGNED NULL DEFAULT 2 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 COMMENT '状态,0正常 1禁用 2删除',
PRIMARY KEY (`id`) USING BTREE,
INDEX `compete_time_index`(`compete_time_id`) USING BTREE,
INDEX `code_now_index`(`compete_code_now`) USING BTREE,
INDEX `code_level_up_index`(`compete_code_level_up`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '规则表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_level_up
-- ----------------------------
DROP TABLE IF EXISTS `t_level_up`;
CREATE TABLE `t_level_up` (
`id` bigint(20) NOT NULL,
`compete_time_id` bigint(20) NULL DEFAULT 0 COMMENT '参加的大赛的id(第几届的xx比赛)',
`compete_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '当前比赛的code',
`level_user_id` bigint(20) NULL DEFAULT 0 COMMENT '参赛人员ID',
`score` int(11) NULL DEFAULT 0 COMMENT '比赛分数',
`addition_score` int(11) NULL DEFAULT 0 COMMENT '附加分数',
`ranking` int(11) NULL DEFAULT 0 COMMENT '名次',
`level_up_type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '晋级方式,0自动 1指定晋级',
`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 `compete_time_index`(`compete_time_id`) USING BTREE,
INDEX `compete_code_index`(`compete_code`) USING BTREE,
INDEX `level_user_index`(`level_user_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '晋级表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_level_user
-- ----------------------------
DROP TABLE IF EXISTS `t_level_user`;
CREATE TABLE `t_level_user` (
`id` bigint(20) NOT NULL,
`player_id` bigint(20) NULL DEFAULT 0 COMMENT '选手id',
`avatar_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '头像',
`name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '名称',
`team_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 COMMENT '状态,0正常 1禁用 2删除',
PRIMARY KEY (`id`) USING BTREE,
INDEX `player_index`(`player_id`) USING BTREE,
INDEX `team_index`(`team_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '选手表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_mt_group
-- ----------------------------
DROP TABLE IF EXISTS `t_mt_group`;
CREATE TABLE `t_mt_group` (
`id` bigint(20) NOT NULL,
`project_id` bigint(20) NULL DEFAULT 0 COMMENT '项目id',
`name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '名字',
`advance_status` tinyint(2) UNSIGNED NULL DEFAULT 1 COMMENT '进阶状态 默认是1 进阶后改为下一阶状态',
`score` int(11) NULL DEFAULT 0 COMMENT '分数/票数',
`type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '0答题组 1被投票组',
`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 `project_index`(`project_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '分组表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_mt_group_topic
-- ----------------------------
DROP TABLE IF EXISTS `t_mt_group_topic`;
CREATE TABLE `t_mt_group_topic` (
`id` bigint(20) NOT NULL,
`topic_id` bigint(20) NULL DEFAULT 0 COMMENT '题目id',
`group_id` bigint(20) NULL DEFAULT 0 COMMENT '分组id',
`answers` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '答题者的答案',
`score` int(11) 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 `topic_index`(`topic_id`) USING BTREE,
INDEX `group_index`(`group_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '答题记录表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_mt_judge
-- ----------------------------
DROP TABLE IF EXISTS `t_mt_judge`;
CREATE TABLE `t_mt_judge` (
`id` bigint(20) NOT NULL,
`project_id` bigint(20) NULL DEFAULT 0 COMMENT '项目id',
`user_id` bigint(20) NULL DEFAULT 0,
`nickname` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '昵称',
`avatar_url` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '头像',
`phone` varchar(12) 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,
INDEX `member_project_index`(`project_id`) USING BTREE,
INDEX `member_user_index`(`user_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '评委表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_mt_responder
-- ----------------------------
DROP TABLE IF EXISTS `t_mt_responder`;
CREATE TABLE `t_mt_responder` (
`id` bigint(20) NOT NULL,
`topic_id` bigint(20) NULL DEFAULT 0 COMMENT '题目id',
`group_id` bigint(20) NULL DEFAULT 0 COMMENT '分组id',
`responder_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 COMMENT '状态,0正常 1禁用 2删除',
PRIMARY KEY (`id`) USING BTREE,
INDEX `topic_index`(`topic_id`) USING BTREE,
INDEX `group_index`(`group_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '抢答信息表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_mt_score
-- ----------------------------
DROP TABLE IF EXISTS `t_mt_score`;
CREATE TABLE `t_mt_score` (
`id` bigint(32) NOT NULL,
`judge_user_id` bigint(32) NULL DEFAULT 0 COMMENT '评委的userId',
`score_log_id` bigint(32) NULL DEFAULT 0 COMMENT '评分项id',
`project_id` bigint(32) NULL DEFAULT 0 COMMENT '项目id',
`task_id` bigint(32) NULL DEFAULT 0 COMMENT '被评分的任务id',
`task_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '任务名',
`score` decimal(32, 2) NULL DEFAULT 0.00 COMMENT '分数',
`is_score` int(10) NULL DEFAULT 1 COMMENT '是否被评分 0否 1是',
`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 `judge_user_index`(`judge_user_id`) USING BTREE,
INDEX `score_log_index`(`score_log_id`) USING BTREE,
INDEX `task_index`(`task_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_mt_score_log
-- ----------------------------
DROP TABLE IF EXISTS `t_mt_score_log`;
CREATE TABLE `t_mt_score_log` (
`id` bigint(20) NOT NULL,
`name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '姓名',
`max_score` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '分数最大值',
`min_score` decimal(20, 2) NULL DEFAULT 0.00 COMMENT '分数最小值',
`project_id` bigint(20) NULL DEFAULT 0 COMMENT '项目id',
`sequence` int(11) 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 `project_index`(`project_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '评分项' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_mt_signin
-- ----------------------------
DROP TABLE IF EXISTS `t_mt_signin`;
CREATE TABLE `t_mt_signin` (
`id` bigint(20) NOT NULL,
`user_id` bigint(20) NULL DEFAULT 0 COMMENT '对应的用户id',
`task_id` bigint(20) NULL DEFAULT 0 COMMENT '任务id',
`name` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '姓名',
`phone` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '手机号',
`company` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '公司',
`signin_time` bigint(20) NULL DEFAULT 0 COMMENT '签到时间',
`sequence` int(11) 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
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '签到表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_mt_signin_basic
-- ----------------------------
DROP TABLE IF EXISTS `t_mt_signin_basic`;
CREATE TABLE `t_mt_signin_basic` (
`id` bigint(20) NOT NULL,
`user_id` bigint(20) NULL DEFAULT 0 COMMENT '对应的用户id',
`task_plugin_id` bigint(20) NULL DEFAULT 0 COMMENT '任务插件id',
`task_id` bigint(20) NULL DEFAULT 0 COMMENT '任务id',
`signin_time` bigint(20) NULL DEFAULT 0 COMMENT '签到时间',
`sequence` int(11) NULL DEFAULT 0 COMMENT '序号',
`is_sign` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '是否已签到 0未签到 1已签到',
`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 `user_index`(`user_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '签到基本信息表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_mt_signin_other
-- ----------------------------
DROP TABLE IF EXISTS `t_mt_signin_other`;
CREATE TABLE `t_mt_signin_other` (
`id` bigint(20) NOT NULL,
`signin_basic_id` bigint(20) NULL DEFAULT 0 COMMENT '签到基本信息的id',
`s_key` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '字段',
`s_value` varchar(128) 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,
INDEX `signin_basic_index`(`signin_basic_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '其他签到信息表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_mt_topic
-- ----------------------------
DROP TABLE IF EXISTS `t_mt_topic`;
CREATE TABLE `t_mt_topic` (
`id` bigint(20) NOT NULL,
`description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '题目详情',
`link_type` tinyint(2) UNSIGNED NULL DEFAULT 1 COMMENT '环节类型 1志在必得 2以快制胜 3绝地反击 4你说我猜',
`topic_type` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '题目类型 0选择题单选 1多选题 2判断题 3填空题',
`score_rule` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '计分规则 0正常加分 1答错减分',
`score` int(11) NULL DEFAULT 0 COMMENT '分数',
`sequence` int(11) NULL DEFAULT 0 COMMENT '顺序',
`answers` varchar(64) 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 COMMENT '状态,0正常 1禁用 2删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '题目表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_mt_topic_option
-- ----------------------------
DROP TABLE IF EXISTS `t_mt_topic_option`;
CREATE TABLE `t_mt_topic_option` (
`id` bigint(20) NOT NULL,
`topic_id` bigint(20) NULL DEFAULT 0 COMMENT '题目id',
`contant` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '选项内容',
`sequence` int(11) NULL DEFAULT 0 COMMENT '顺序',
`option` 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 COMMENT '状态,0正常 1禁用 2删除',
PRIMARY KEY (`id`) USING BTREE,
INDEX `topic_index`(`topic_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '题目选项表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_mt_vote
-- ----------------------------
DROP TABLE IF EXISTS `t_mt_vote`;
CREATE TABLE `t_mt_vote` (
`id` bigint(20) NOT NULL,
`user_id` bigint(20) NULL DEFAULT 0 COMMENT '用户id',
`group_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 COMMENT '状态,0正常 1禁用 2删除',
PRIMARY KEY (`id`) USING BTREE,
INDEX `user_index`(`user_id`) USING BTREE,
INDEX `group_index`(`group_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '投票表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_platform_apply
-- ----------------------------
DROP TABLE IF EXISTS `t_platform_apply`;
CREATE TABLE `t_platform_apply` (
`id` bigint(20) NOT NULL,
`company_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '公司名称',
`contact_name` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '联系人',
`contact_phone` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '联系电话',
`description` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '合作信息简述',
`type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '平台类型:0-创新平台,1产业平台,2-实体空间 ,3-虚拟空间',
`audit_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '处理状态:0-未处理,1-处理中,2-已处理',
`user_id` bigint(20) NULL DEFAULT 0 COMMENT '处理人',
`created_at` timestamp NOT NULL DEFAULT current_timestamp,
`updated_at` timestamp NOT NULL DEFAULT current_timestamp,
`rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '平台申请加入表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_service_apply
-- ----------------------------
DROP TABLE IF EXISTS `t_service_apply`;
CREATE TABLE `t_service_apply` (
`id` bigint(20) NOT NULL,
`company_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '公司名称',
`contact_name` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '联系人',
`contact_phone` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '联系电话',
`description` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '合作信息简述',
`file_id` bigint(20) NULL DEFAULT 0 COMMENT '本公司上传资料集合的id',
`type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '平台类型:0-创新平台,1产业平台,2-实体空间 ,3-虚拟空间',
`audit_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '处理状态:0-未处理,1-处理中,2-已处理',
`user_id` bigint(20) NULL DEFAULT 0 COMMENT '处理人',
`created_at` timestamp NOT NULL DEFAULT current_timestamp,
`updated_at` timestamp NOT NULL DEFAULT current_timestamp,
`rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0,
PRIMARY KEY (`id`) USING BTREE,
INDEX `t_service_apply_INDEX`(`file_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '服务申请加入表' ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;

212
pims.sql

@ -0,0 +1,212 @@
/*
Navicat Premium Data Transfer
Source Server :
Source Server Type : MariaDB
Source Server Version : 100318
Source Host : test.tall.wiki:3306
Source Schema : pims
Target Server Type : MariaDB
Target Server Version : 100318
File Encoding : 65001
Date: 13/05/2021 15:12:35
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for t_company
-- ----------------------------
DROP TABLE IF EXISTS `t_company`;
CREATE TABLE `t_company` (
`id` bigint(20) NOT NULL,
`project_id` bigint(20) NULL DEFAULT 0 COMMENT '项目id',
`name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '公司名',
`balance` 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 `project_index`(`project_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '公司信息表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_cost_log
-- ----------------------------
DROP TABLE IF EXISTS `t_cost_log`;
CREATE TABLE `t_cost_log` (
`id` bigint(20) NOT NULL,
`cost_type_id` bigint(20) NULL DEFAULT 0 COMMENT '成本类型id 如果是产品成本就是产品id',
`product_cost` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '是否是产品成本 0不是 1是',
`year_time` int(11) NULL DEFAULT 0 COMMENT '',
`month_time` int(11) NULL DEFAULT 0 COMMENT '月份',
`predict_cost` bigint(20) NULL DEFAULT 0 COMMENT '预计成本',
`real_cost` 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 `cost_type_index`(`cost_type_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '成本表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_cost_type
-- ----------------------------
DROP TABLE IF EXISTS `t_cost_type`;
CREATE TABLE `t_cost_type` (
`id` bigint(20) NOT NULL,
`company_id` bigint(20) NULL DEFAULT 0 COMMENT '公司id',
`project_id` bigint(20) NULL DEFAULT 0 COMMENT '项目id',
`name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '成本类型名',
`level` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '类型等级,0大类型 1细分类型',
`parent_id` bigint(20) NULL DEFAULT 0 COMMENT '父id 大类型为0',
`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 `company_index`(`company_id`) USING BTREE,
INDEX `project_index`(`project_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '成本类型表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_income_statements
-- ----------------------------
DROP TABLE IF EXISTS `t_income_statements`;
CREATE TABLE `t_income_statements` (
`id` bigint(20) NOT NULL,
`company_id` bigint(20) NULL DEFAULT 0 COMMENT '项目id',
`project_id` bigint(20) NULL DEFAULT 0 COMMENT '项目id',
`name` varchar(64) 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 COMMENT '状态,0正常 1禁用 2删除',
PRIMARY KEY (`id`) USING BTREE,
INDEX `company_index`(`company_id`) USING BTREE,
INDEX `project_index`(`project_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '损益类型表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_income_statements_log
-- ----------------------------
DROP TABLE IF EXISTS `t_income_statements_log`;
CREATE TABLE `t_income_statements_log` (
`id` bigint(20) NOT NULL,
`company_id` bigint(20) NULL DEFAULT 0 COMMENT '项目id',
`project_id` bigint(20) NULL DEFAULT 0 COMMENT '项目id',
`income_statements_id` bigint(20) NULL DEFAULT 0 COMMENT '变动事宜表id',
`year_income` int(11) NULL DEFAULT 0 COMMENT '',
`month_time` int(11) NULL DEFAULT 0 COMMENT '月份',
`predict_money` bigint(20) NULL DEFAULT 0 COMMENT '预计收入',
`real_money` 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 `company_index`(`company_id`) USING BTREE,
INDEX `project_index`(`project_id`) USING BTREE,
INDEX `income_statements_index`(`income_statements_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '损益表详细收入金额' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_money_flow
-- ----------------------------
DROP TABLE IF EXISTS `t_money_flow`;
CREATE TABLE `t_money_flow` (
`id` bigint(20) NOT NULL,
`company_id` bigint(20) NULL DEFAULT 0 COMMENT '项目id',
`project_id` bigint(20) NULL DEFAULT 0 COMMENT '项目id',
`name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '变动的事宜',
`money_type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '现金流变动类型 0收入 1支出',
`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 `company_index`(`company_id`) USING BTREE,
INDEX `project_index`(`project_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '现金流变动表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_money_flow_log
-- ----------------------------
DROP TABLE IF EXISTS `t_money_flow_log`;
CREATE TABLE `t_money_flow_log` (
`id` bigint(20) NOT NULL,
`company_id` bigint(20) NULL DEFAULT 0 COMMENT '项目id',
`project_id` bigint(20) NULL DEFAULT 0 COMMENT '项目id',
`money_flow_id` bigint(20) NULL DEFAULT 0 COMMENT '变动事宜表id',
`year_income` int(11) NULL DEFAULT 0 COMMENT '',
`month_time` int(11) NULL DEFAULT 0 COMMENT '月份',
`predict_money` bigint(20) NULL DEFAULT 0 COMMENT '预计变动的金额',
`real_money` 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 `company_index`(`company_id`) USING BTREE,
INDEX `project_index`(`project_id`) USING BTREE,
INDEX `money_flow_index`(`money_flow_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '现金流变动详细金额表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_product
-- ----------------------------
DROP TABLE IF EXISTS `t_product`;
CREATE TABLE `t_product` (
`id` bigint(20) NOT NULL,
`company_id` bigint(20) NULL DEFAULT 0 COMMENT '公司id',
`project_id` bigint(20) NULL DEFAULT 0 COMMENT '项目id',
`name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '产品名',
`description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注/产品详情',
`product_type_id` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '产品分类( 0战略业务 1增值业务)',
`pricing` bigint(20) NULL DEFAULT 0 COMMENT '定价',
`price_units` bigint(20) NULL DEFAULT 0 COMMENT '价格单位(元)',
`gross_margin` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '毛利(%)',
`significance_sort` tinyint(2) UNSIGNED 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 `company_index`(`company_id`) USING BTREE,
INDEX `project_index`(`project_id`) USING BTREE,
INDEX `product_type_index`(`product_type_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '产品或服务表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_product_income
-- ----------------------------
DROP TABLE IF EXISTS `t_product_income`;
CREATE TABLE `t_product_income` (
`id` bigint(20) NOT NULL,
`product_id` bigint(20) NULL DEFAULT 0 COMMENT '产品id',
`year_income` int(11) NULL DEFAULT 0 COMMENT '哪一年 例:2020',
`month_time` int(11) NULL DEFAULT 0 COMMENT '月份,一月,二月,三月。。。等',
`predict_income` bigint(20) NULL DEFAULT 0 COMMENT '预计收入',
`real_income` 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 `product_index`(`product_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '产品收入表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_product_type
-- ----------------------------
DROP TABLE IF EXISTS `t_product_type`;
CREATE TABLE `t_product_type` (
`id` bigint(20) NOT NULL,
`company_id` bigint(20) NULL DEFAULT 0 COMMENT '公司id',
`project_id` bigint(20) NULL DEFAULT 0 COMMENT '项目id',
`name` varchar(64) 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 COMMENT '状态,0正常 1禁用 2删除',
PRIMARY KEY (`id`) USING BTREE,
INDEX `company_index`(`company_id`) USING BTREE,
INDEX `project_index`(`project_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '公司信息表' ROW_FORMAT = Compact;
SET FOREIGN_KEY_CHECKS = 1;

654
question.sql

@ -0,0 +1,654 @@
/*
Navicat Premium Data Transfer
Source Server : 绿
Source Server Type : MariaDB
Source Server Version : 100324
Source Host : 49.232.6.143:3306
Source Schema : question
Target Server Type : MariaDB
Target Server Version : 100324
File Encoding : 65001
Date: 13/05/2021 15:22:21
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for t_ht_doctor
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_doctor`;
CREATE TABLE `t_ht_doctor` (
`id` bigint(20) NOT NULL,
`user_id` bigint(20) NULL DEFAULT 0 COMMENT ' 登录用户id 普通索引 ',
`position_id` bigint(20) NULL DEFAULT 0 COMMENT ' 职务ID 普通索引 ',
`title_id` bigint(20) NULL DEFAULT 0 COMMENT ' 职称ID ',
`name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 姓名 ',
`sex` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 性别(0:男 1:女) ',
`age` int(11) NULL DEFAULT 0 COMMENT ' 年龄 ',
`auditor_id` bigint(20) NULL DEFAULT 0 COMMENT ' 审核医生ID(即上级职务对应的医生ID) 普通索引 ',
`audit_state` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 审核状态(0:未审核 1:审核通过 2:审核失败) ',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`share_patient_edit` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '分享病人编辑页面路径',
`create_time` timestamp NOT NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
PRIMARY KEY (`id`) USING BTREE,
INDEX `doctor_user_index`(`user_id`) USING BTREE,
INDEX `doctor_position_index`(`position_id`) USING BTREE,
INDEX `doctor_title_index`(`title_id`) USING BTREE,
INDEX `doctor_auditor_index`(`auditor_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '医生表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_doctor_audit
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_doctor_audit`;
CREATE TABLE `t_ht_doctor_audit` (
`id` bigint(20) NOT NULL,
`doctor_id` bigint(20) NULL DEFAULT 0 COMMENT '待审核医生ID ',
`auditor_id` bigint(20) NULL DEFAULT 0 COMMENT '审核医生ID',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `audit_auditor_index`(`auditor_id`, `doctor_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '医生审核表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_opretion_log
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_opretion_log`;
CREATE TABLE `t_ht_opretion_log` (
`id` bigint(20) NOT NULL,
`user_id` bigint(20) NULL DEFAULT 0 COMMENT ' 用户id 普通索引 ',
`type` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT ' 操作类型(1:注册 2:登录 3:修改密码 4:退出 5:资格认证 6:资格审核 7.生成报告单 8测评,9修改病人信息) ',
`table_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 操作的表名 普通索引 ',
`data_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 操作的数据ID ',
`content` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 操作内容 ',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
PRIMARY KEY (`id`) USING BTREE,
INDEX `log_user_index`(`user_id`) USING BTREE,
INDEX `log_table_index`(`table_name`, `data_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '操作日志表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_patient
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_patient`;
CREATE TABLE `t_ht_patient` (
`id` bigint(20) NOT NULL,
`user_id` bigint(20) NULL DEFAULT 0 COMMENT ' 登录用户id 普通索引 ',
`name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 姓名 ',
`patient_number` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 门诊号 普通索引 ',
`hospital_number` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 住院号 普通索引 ',
`idcard` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 身份证号 普通索引 ',
`sex` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 性别(0:男 1:女) ',
`marital_status` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 婚姻状况(1:未婚2:已婚 3:离异 4:分居 5:丧偶 6:同居 7:其他 ) ',
`educational_status` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 教育程度(1:文盲 2:小学 3:初中 4:高中 5:大学 6:大学以上 7:其他) ',
`educational_status_unit` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 受教育时间(年或月) ',
`nation` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 民族 ',
`native_place` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 籍贯 ',
`career` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 职业(1:农林牧渔水利生产人员 2:教师 3:医务工作者 4:专业技术人员 5:生产、运输设备操作人员及有关人员6:商业、服务业人员7:国家机关、事业单位、企业负责人8:国家机关、事业单位、企业办事人员和有关人员9:军人 10:媒体、文体类工作人员 11:在校学生 12:未就业 13:家务 14:其他 ',
`birth_number` int(11) NULL DEFAULT NULL COMMENT ' 生育数量 ',
`menopause_age` int(11) NULL DEFAULT NULL COMMENT ' 绝经年龄(女) ',
`contact` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 联系人 ',
`mobile` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 手机 ',
`phone` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 电话 ',
`province` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 省份 ',
`city` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 城市 ',
`address` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 住址 ',
`domicile` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 住所(1:自己家中 2:养老院 3:其他) ',
`independent_living_skills` tinyint(2) UNSIGNED NULL DEFAULT NULL COMMENT ' 独立生活能力(1:能够独立生活 2:需要他人帮助完成复杂活动 3:需要他人帮助完成基本活动 4:完全依赖他人生活 5:未知 6:其他) ',
`dwelling_state` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 居住状态(1:独居 2:与配偶或对象或子女 3:与亲戚或朋友居住) ',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`recorder` bigint(20) NULL DEFAULT 0 COMMENT ' 第一次录入人 ',
`create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
PRIMARY KEY (`id`) USING BTREE,
INDEX `patient_superior_index`(`user_id`) USING BTREE,
INDEX `patient_number_index`(`patient_number`) USING BTREE,
INDEX `patient_hospitalr_index`(`hospital_number`) USING BTREE,
INDEX `patient_idcard_index`(`idcard`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '病友基本信息' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_patient_acp
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_patient_acp`;
CREATE TABLE `t_ht_patient_acp` (
`id` bigint(20) NOT NULL,
`patient_id` bigint(20) NULL DEFAULT 0 COMMENT ' 病人id 普通索引 ',
`ct` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' ct ',
`mri` varchar(51) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' mri ',
`hcy` varchar(52) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 同型半胱氨酸 ',
`vb12` varchar(53) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 维生素B12 ',
`folic_acid` varchar(54) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 叶酸 ',
`tt3` varchar(55) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 血清总T3 ',
`tt4` varchar(56) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 血清总T4 ',
`tsh` varchar(57) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 促甲状腺素 ',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
`recorder` bigint(20) NULL DEFAULT 0 COMMENT '录入人',
`ta1` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '血清Aβ1-42',
`tpt` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '血清p-tau181',
PRIMARY KEY (`id`) USING BTREE,
INDEX `acp_patient_index`(`patient_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '辅助检查' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_patient_body
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_patient_body`;
CREATE TABLE `t_ht_patient_body` (
`id` bigint(20) NOT NULL,
`patient_id` bigint(20) NULL DEFAULT 0 COMMENT ' 病人id 普通索引 ',
`height` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 身高(cm) ',
`weight` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 体重(kg) ',
`waistline` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 腰围(寸) ',
`blood_pressure_shrink` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 血压-收缩压(mmHg) ',
`blood_pressure_diastole` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 血压-舒张压(mmHg) ',
`resting_heart_rate` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 静息心率 ',
`vision` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 受试的视觉功能是否正常(1:是 0:否) ',
`auditory` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 受试的听觉功能是否正常(1:是 0:否) ',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
`recorder` bigint(20) NULL DEFAULT 0 COMMENT '录入人',
PRIMARY KEY (`id`) USING BTREE,
INDEX `body_patient_index`(`patient_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '病人身体基本信息表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_patient_canvas
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_patient_canvas`;
CREATE TABLE `t_ht_patient_canvas` (
`id` bigint(20) NOT NULL,
`patient_report_id` bigint(20) NULL DEFAULT 0 COMMENT '病友检查报告单ID',
`question_id` bigint(20) NULL DEFAULT 0 COMMENT '测评试题ID',
`begin_time` bigint(20) NULL DEFAULT 0 COMMENT '时间ms数',
`canvas_width` int(11) NULL DEFAULT 0 COMMENT '画板宽',
`canvas_height` int(11) NULL DEFAULT 0 COMMENT '画板高',
`line_color` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '笔触颜色',
`line_width` int(11) NULL DEFAULT 0 COMMENT '笔触粗细',
`create_time` timestamp NOT NULL DEFAULT current_timestamp,
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP,
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除',
`open_canvas_time` bigint(20) NULL DEFAULT 0 COMMENT '打开画板的时间',
`beyond_proportion` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '超出占比',
PRIMARY KEY (`id`) USING BTREE,
INDEX `canvas_patient_report_index`(`patient_report_id`) USING BTREE,
INDEX `canvas_question_index`(`question_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '画板信息(每次画图生成一个画板信息)' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_patient_canvas_line
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_patient_canvas_line`;
CREATE TABLE `t_ht_patient_canvas_line` (
`id` bigint(20) NOT NULL,
`patient_canvas_id` bigint(20) NULL DEFAULT 0 COMMENT '画板id',
`points` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '笔记详情(x,y,time)',
`create_time` timestamp NOT NULL DEFAULT current_timestamp,
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP,
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除',
PRIMARY KEY (`id`) USING BTREE,
INDEX `canvas_patient_canvas_index`(`patient_canvas_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '画板轨迹表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_patient_family
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_patient_family`;
CREATE TABLE `t_ht_patient_family` (
`id` bigint(20) NOT NULL,
`patient_id` bigint(20) NULL DEFAULT 0 COMMENT ' 病人id 普通索引 ',
`name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 姓名 ',
`age` tinyint(3) UNSIGNED NULL DEFAULT 0 COMMENT '年龄',
`sex` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 性别(0:男 1:女) ',
`educational_status` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT ' 教育程度(1:文盲 2:小学 3:初中 4:高中 5:大学 6:大学以上 7:其他) ',
`relation` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT ' 患者家属(知情人)与患者的关系(1:配偶/伴侣 2:子女3:兄弟姐妹 4:其他亲属 5:朋友、邻居 6:受雇看护 7:其他) ',
`is_live_together` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 患者家属(知情人)是否与患者一起居住(1:是 0:否) ',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
`recorder` bigint(20) NULL DEFAULT 0 COMMENT '录入人',
PRIMARY KEY (`id`) USING BTREE,
INDEX `family_patient_index`(`patient_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '家属表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_patient_family_illness
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_patient_family_illness`;
CREATE TABLE `t_ht_patient_family_illness` (
`id` bigint(20) NOT NULL,
`patient_id` bigint(20) NULL DEFAULT 0 COMMENT ' 病人id 普通索引 ',
`name` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 亲属名字 ',
`relation` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 与患者关系 ',
`diagnose` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 诊断 ',
`onset_age` int(11) NULL DEFAULT 0 COMMENT ' 发病年龄 ',
`now_age` int(11) NULL DEFAULT 0 COMMENT ' 现在年龄(如已去世,为去世年龄) ',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
`recorder` bigint(20) NULL DEFAULT 0 COMMENT '录入人',
PRIMARY KEY (`id`) USING BTREE,
INDEX `family_illness_patient_index`(`patient_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '家族史' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_patient_follow_up
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_patient_follow_up`;
CREATE TABLE `t_ht_patient_follow_up` (
`id` bigint(20) NOT NULL,
`patient_id` bigint(20) NULL DEFAULT 0 COMMENT ' 病人id 普通索引 ',
`follow_up_datetime` datetime NULL DEFAULT NULL COMMENT ' 随访时间 ',
`follow_up_times` int(11) NULL DEFAULT 0 COMMENT ' 第几次随访 ',
`recorder` bigint(20) NULL DEFAULT 0 COMMENT ' 录入人 (医生ID)',
`diagnose` bigint(20) NULL DEFAULT 0 COMMENT ' 诊断人 (医生ID)',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
PRIMARY KEY (`id`) USING BTREE,
INDEX `followup_patient_index`(`patient_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '病人随访表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_patient_illness_history
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_patient_illness_history`;
CREATE TABLE `t_ht_patient_illness_history` (
`id` bigint(20) NOT NULL,
`patient_id` bigint(20) NULL DEFAULT 0 COMMENT ' 病人id 普通索引 ',
`cardiac_arrest_history` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 心跳骤停史(1:有0:无) ',
`angina` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 心绞痛(1:有0:无) ',
`mi` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 心肌梗死(1:有0:无) ',
`atrial_fibrillation` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 心房纤颤(1:有0:无) ',
`chf` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 充血性心衰(1:有0:无) ',
`other_cardiovascular_diseases` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 其他心血管疾病(1:有0:无) ',
`wuis` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 缺血性卒中(1:有0:无) ',
`hcvd` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 出血性卒中(1:有0:无) ',
`parkinson_disease` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 帕金森病(1:有0:无) ',
`epilepsy` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 癫痫(1:有0:无) ',
`brain_trauma` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 脑外伤(1:有0:无) ',
`hypertension` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 高血压(1:有0:无) ',
`diabetes` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 糖尿病(1:有0:无) ',
`hlp` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 高脂血症(1:有0:无) ',
`hyperhomocysteinemia` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 高同型半胱氨酸血症(1:有0:无) ',
`vb12_deficiency` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 维生素B12缺乏(1:有0:无) ',
`thyroid_disease` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 甲状腺疾病(甲亢 甲减)(1:有0:无) ',
`copd` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 慢阻肺(1:有0:无) ',
`asthma` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 哮喘(1:有0:无) ',
`insomnia` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 失眠(1:有0:无) ',
`sleep_suspend` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 睡眠暂停(1:有0:无) ',
`ckd` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 慢性肾脏病(1:有0:无) ',
`rheumatoid` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 类风湿(1:有0:无) ',
`depression` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 抑郁(1:有0:无) ',
`general_anesthesia_surgery` int(11) NULL DEFAULT 0 COMMENT ' 全麻手术史次数 ',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
`recorder` bigint(20) NULL DEFAULT 0 COMMENT '录入人',
PRIMARY KEY (`id`) USING BTREE,
INDEX `illness_history_patient_index`(`patient_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '既往史' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_patient_parent_illness
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_patient_parent_illness`;
CREATE TABLE `t_ht_patient_parent_illness` (
`id` bigint(20) NOT NULL,
`patient_id` bigint(20) NULL DEFAULT 0 COMMENT ' 病人id 普通索引 ',
`memory` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 记忆障碍(1:有 0:无) (丢三落四,忘记谈话的内容和/或日期;经常忘记熟悉的人的名字等;重复提问和/或谈论同一个问题;物品不能放回固定位置) ',
`language` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 语言障碍(1:有 0:无) (语言不流利;自主谈话减少;自发语言中实词减少,赘语、找词困难、用词不当但不予纠正;理解他人语言能力下降;书写能力下降;阅读困难等) ',
`space` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 空间技能(1:有 0:无) (不能正确指出看到的物体、辨别方向困难或迷路、使用餐具困难、穿衣穿反等) ',
`emotion` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 情感淡漠(1:有 0:无) (兴趣丧失或能力下降,社交退缩) ',
`depression` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 抑郁(1:有0:无) (情绪低落、对活动失去兴趣、悲观绝望、食欲不振易疲劳等) ',
`illusion` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 幻觉/幻听/幻嗅(1:有 0:无) ',
`delusion` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 虚构/妄想(1:有 0:无) ',
`derepression` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 脱抑制(1:有 0:无) 在家中或公共场所的语言或行为是否粗俗不当、是否无视个人卫生、是否与陌生人过分亲近) ',
`irritable` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 易激惹、激越、攻击行为(1:有 0:无) (过度兴奋、大喊大叫、对人(拳打脚踢) ',
`personality_changes` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 人格改变(1:有 0:无) ',
`exercise` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 运动障碍(1:是0:否) (共济失调、帕金森样运动障碍、不自主运动) ',
`first_illness` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 最早出现的症状(1:认知 2:行为 3:运动 4:不祥) ',
`reason` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 认知症状起病原因(1:隐匿 2:亚急性 3:急性起病) ',
`change_form` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT ' 症状发展变化的形式(1:渐进性加重 2:阶梯样加重 3:无变化 4:波动性 5:逐渐减轻) ',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
`recorder` bigint(20) NULL DEFAULT 0 COMMENT '录入人',
PRIMARY KEY (`id`) USING BTREE,
INDEX `parent_illness_patient_index`(`patient_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '现病史' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_patient_persional
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_patient_persional`;
CREATE TABLE `t_ht_patient_persional` (
`id` bigint(20) NOT NULL,
`patient_id` bigint(20) NULL DEFAULT 0 COMMENT ' 病人id 普通索引 ',
`smoking_history` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 有无吸烟史(1:有0:无) ',
`smoking_year` int(11) NULL DEFAULT NULL COMMENT ' 吸烟时长(年) ',
`smoking_amount` int(11) NULL DEFAULT NULL COMMENT ' 吸烟平均每日几支 ',
`smoking_quit` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 是否戒烟(1:是0:否) ',
`smoking_quit_year` int(11) NULL DEFAULT NULL COMMENT ' 戒烟时长(年) ',
`drink_history` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 有无饮酒史(1:有0:无) ',
`drink_year` int(11) NULL DEFAULT NULL COMMENT ' 饮酒时长(年) ',
`drink_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 饮酒类型(1:白酒 2:普通酒 3:啤酒),不同类型用,分割 ',
`drink_amount` int(11) NULL DEFAULT 0 COMMENT ' 平均每日饮酒量(两/ml) ',
`tea_coffee_history` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 有无喝茶咖啡史(1:有0:无) ',
`tea_coffee_year` int(11) NULL DEFAULT NULL COMMENT ' 喝茶咖啡时长(年) ',
`tea_coffee_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 喝茶咖啡类型(1:绿茶 2:红茶 3:乌龙茶 4.咖啡 5其他) ',
`tea_coffee_frequency` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 喝茶咖啡频率(1:偶尔 2:每周1~2次 3:每周3~4次 4:每周5次及以上) ',
`tea_coffee_quit` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 现在是否停止喝茶/咖啡(1:是 0:否) ',
`tea_coffee_quit_year` int(11) NULL DEFAULT NULL COMMENT ' 挺喝茶咖啡时长(年) ',
`dietary_habit` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 饮食习惯(1:素食为主 2:荤食为主 3:荤素搭配 4:喜欢甜食 5:高盐 6:高脂 7:喜爱油炸物 ',
`workout_time` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 锻炼时间(1:不太活动(看电视,读报等)2:轻度活动(种花或家务) 3:中度活动(游泳、打拳、慢跑、跳舞)4:重度活动(举杠铃等) ',
`sleep_time` int(11) NULL DEFAULT NULL COMMENT ' 平均每天睡眠时间(小时) ',
`snore` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 是否打鼾(1:有 0:无) ',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
`recorder` bigint(20) NULL DEFAULT 0 COMMENT '录入人',
`drink_quit` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 现在是否停止饮酒(1:是 0:否) ',
`drink_quit_year` int(11) NULL DEFAULT NULL COMMENT ' 停止饮酒时长(年) ',
PRIMARY KEY (`id`) USING BTREE,
INDEX `persional_patient_index`(`patient_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '个人史' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_patient_question_record
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_patient_question_record`;
CREATE TABLE `t_ht_patient_question_record` (
`id` bigint(20) NOT NULL,
`patient_report_id` bigint(20) NULL DEFAULT 0 COMMENT ' 病友检查报告单ID 联合索引 ',
`question_id` bigint(20) NULL DEFAULT 0 COMMENT ' 测评试题ID ',
`record_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '额外记录类型(answer:答案,errorMsg:错误信息,otherMsg:其他内容,paint:画图,voice:语音,startTime:起笔时长)',
`record_value` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 病友回答情况 ',
`record_time` bigint(20) NULL DEFAULT 0 COMMENT ' 记录时间 ',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
PRIMARY KEY (`id`) USING BTREE,
INDEX `record_patient_index`(`patient_report_id`, `question_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '病友答题记录表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_patient_report
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_patient_report`;
CREATE TABLE `t_ht_patient_report` (
`id` bigint(20) NOT NULL,
`name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 报告单名称 ',
`patient_id` bigint(20) NULL DEFAULT 0 COMMENT ' 病人ID 普通索引 ',
`patient_idcard` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 病人身份证 ',
`patient_age` tinyint(3) NULL DEFAULT 0 COMMENT '病人测评时的年龄',
`doctor_id` bigint(20) NULL DEFAULT 0 COMMENT ' 测评医生ID ',
`serial_number` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 编号 ',
`initial_impression` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 初步印象 ',
`clinical_diagnosis` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 临床诊断(轻度认知障碍... 痴呆…无) ',
`pasi` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 严重程度(0:未评测 1:轻度 2:中度 3:重度) ',
`department` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 科别 ',
`bed_number` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 床号 ',
`report_time` bigint(20) NULL DEFAULT 0 COMMENT ' 报告时间 ',
`check_time` bigint(20) NULL DEFAULT 0 COMMENT ' 检查时间 ',
`evaluation_code` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 测评分类code(报告单表的版本) ',
`url` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 报告单路径 ',
`qr_code_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '二维码路径',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
`show_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '显示状态 0:不显示 1:在历史报告单中显示',
`hospital` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '医院',
`complete_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '完成状态 0:未完成 1:完成 2:忽略',
`user_id` bigint(20) NULL DEFAULT 0 COMMENT 'userId',
PRIMARY KEY (`id`) USING BTREE,
INDEX `patient_report_patient_index`(`patient_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '病友检查报告单表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_patient_report_record
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_patient_report_record`;
CREATE TABLE `t_ht_patient_report_record` (
`id` bigint(20) NOT NULL,
`report_id` bigint(20) NULL DEFAULT 0 COMMENT '病人报告单ID',
`doctor_id` bigint(20) NULL DEFAULT 0 COMMENT '医生ID',
`content` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '报告内容',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
PRIMARY KEY (`id`) USING BTREE,
INDEX `report_record_report_index`(`report_id`) USING BTREE,
INDEX `report_record_doctor_index`(`doctor_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '病友检查报告单变更记录表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_patient_score
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_patient_score`;
CREATE TABLE `t_ht_patient_score` (
`id` bigint(20) NOT NULL,
`patient_report_id` bigint(20) NULL DEFAULT 0 COMMENT ' 病友检查报告单ID 普通索引 ',
`patient_id` bigint(20) NULL DEFAULT 0 COMMENT ' 病友ID ',
`question_parent_code` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 测评试题上级code 联合索引 ',
`question_id` bigint(20) NULL DEFAULT 0 COMMENT ' 测评试题ID ',
`option_id` bigint(20) NULL DEFAULT 0 COMMENT '选项ID',
`option_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 选项name ',
`score` decimal(11, 1) NULL DEFAULT 0.0 COMMENT ' 得分 ',
`type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 类型(0:答案和得分 1:答案 2:得分) ',
`answer` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 用户答案(存储图片或语音路径) ',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
`answer_time` bigint(20) NULL DEFAULT 0 COMMENT '答题时间',
PRIMARY KEY (`id`) USING BTREE,
INDEX `score_report_index`(`patient_report_id`) USING BTREE,
INDEX `score_question_index`(`question_parent_code`, `question_id`) USING BTREE,
INDEX `score_patient_index`(`patient_id`) USING BTREE,
INDEX `score_option_index`(`option_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '病友得分表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_position
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_position`;
CREATE TABLE `t_ht_position` (
`id` bigint(20) NOT NULL,
`type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 类型(1:医院 2:科室 3:职务) ',
`name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 名称 ',
`superior_department_id` bigint(20) NULL DEFAULT 0 COMMENT ' 所属部门ID 普通索引 ',
`superior_id` bigint(20) NULL DEFAULT 0 COMMENT ' 上级职务ID 普通索引 ',
`relevancy` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 关联单位 ',
`has_manage` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否有管理权限(1:是 0:否) ',
`has_audit` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否有审核权限(1:是 0:否)',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `position_name_index`(`name`, `superior_department_id`) USING BTREE,
INDEX `position_superior_department_index`(`superior_department_id`) USING BTREE,
INDEX `position_superior_index`(`superior_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '职务表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_question
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_question`;
CREATE TABLE `t_ht_question` (
`id` bigint(20) NOT NULL,
`evaluation_code` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 测评分类code(报告单表的编码) 联合索引 ',
`parent_code` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 上级code(报告单表的编码) 普通索引 ',
`sort` int(11) NULL DEFAULT 0 COMMENT ' 排序 联合索引 ',
`question` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 题目',
`type` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '1文本,2图片,3语音,4选项,5连线且文字倒转,6文本倒转,7:图片且题目和选项位置互换,8:图片且图片颠倒',
`record_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 额外记录类型(errorMsg:错误信息,otherMsg:其他内容) ',
`record_content` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 额外记录内容 ',
`relation_code` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 关联题目code,多个code之间使用,分割 ',
`operate_type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 用户操作类型(0无,0无,1语音,2画图,3.画图显示中线和图形,4敲击,5画图不显示图形,6画图只显示中线) ',
`recode_starttime` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否需要记录动笔时长(1是0否) ',
`time_wabei` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否需要定时截图保存(1是0否) ',
`allow_clear` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否允许重画(0否1是2回退) ',
`clear_times` int(11) NULL DEFAULT 0 COMMENT ' 最多重画次数 ',
`timing_length` int(11) NULL DEFAULT 0 COMMENT ' 定时器时长 ',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `question_evaluation_index`(`evaluation_code`, `sort`) USING BTREE,
INDEX `question_parent_index`(`parent_code`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '测试题表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_question_introducer
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_question_introducer`;
CREATE TABLE `t_ht_question_introducer` (
`id` bigint(20) NOT NULL,
`question_id` bigint(20) NULL DEFAULT 0 COMMENT ' 测评试题ID 索引 ',
`content` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 引导语内容 ',
`sort` int(11) NULL DEFAULT 0 COMMENT ' 排序 ',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `introducer_question_index`(`question_id`, `sort`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '引导语表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_question_option
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_question_option`;
CREATE TABLE `t_ht_question_option` (
`id` bigint(20) NOT NULL,
`question_id` bigint(20) NULL DEFAULT 0 COMMENT ' 测评试题ID',
`sort` int(11) NULL DEFAULT 1 COMMENT ' 排序 ',
`type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '选项类型(redio:单选,checkbox:多选,number-socre:用户输入分数,) ',
`name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 选项变量名 ',
`score` decimal(11, 1) NULL DEFAULT 0.0 COMMENT ' 选项分数 ',
`display` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 选项内容 ',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注,使用:{sum:1,isAutoformula:1,formulaSymbol:\"*\",formulaName:\"frequency,degree\"} sum:求和,isAutoformula:是否自动进行计算,formulaSymbol:计算符号,formulaName:计算属性 ',
`create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `option_question_index`(`question_id`, `sort`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '选项表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_question_relevance
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_question_relevance`;
CREATE TABLE `t_ht_question_relevance` (
`id` bigint(20) NOT NULL,
`question_id` bigint(20) NULL DEFAULT 0 COMMENT '问题id',
`relevance_id` bigint(20) NULL DEFAULT 0 COMMENT '被关联的问题的id',
`create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '试题关联表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_question_scoring_rule
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_question_scoring_rule`;
CREATE TABLE `t_ht_question_scoring_rule` (
`id` bigint(20) NOT NULL,
`question_id` bigint(20) NULL DEFAULT 0 COMMENT ' 测评试题ID 索引 ',
`type` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT ' 计分规则类型,0:个数判断-从小到大 ',
`detail` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 计分规则详细内容:例子:[{\"small\":0,\"key\":0},{\"small\":1,\"key\":1},{\"small\":3,\"key\":2},{\"small\":5,\"key\":3}]',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `scoring_rule_question_index`(`question_id`, `type`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '测试计分规则表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_relation
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_relation`;
CREATE TABLE `t_ht_relation` (
`id` bigint(20) NOT NULL,
`user_id` bigint(20) NULL DEFAULT 0 COMMENT ' 普通索引 ',
`relation_url` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 关联路径 ',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
PRIMARY KEY (`id`) USING BTREE,
INDEX `relation_user_index`(`user_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '关联其他域' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_report
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_report`;
CREATE TABLE `t_ht_report` (
`id` bigint(20) NOT NULL,
`code` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 编码 索引 ',
`name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 名称 ',
`parent_code` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 上级编码 索引 ',
`description` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 划界描述 ',
`total_score` int(11) NULL DEFAULT 0 COMMENT ' 总分(<0:不需要显示总分,=0:不计分, >0:总分) ',
`type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 类型(1:报告单 2:测评 3:测评子类 4:二级子类) ',
`is_show` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否在报告单上显示(1:是 0:否) ',
`sort` int(11) NULL DEFAULT 0 COMMENT ' 报告单展示顺序 ',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
PRIMARY KEY (`id`) USING BTREE,
INDEX `report_code_index`(`code`) USING BTREE,
INDEX `report_parent_code_index`(`parent_code`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '报告单表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_ht_title
-- ----------------------------
DROP TABLE IF EXISTS `t_ht_title`;
CREATE TABLE `t_ht_title` (
`id` bigint(20) NOT NULL,
`type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 类型(1:医生 2:护士) ',
`title` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 职称 ',
`superidor_id` bigint(20) NULL DEFAULT 0 COMMENT ' 上级ID ',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ',
`create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ',
`update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ',
`is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '职称表' ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;

1353
tall.sql

File diff suppressed because it is too large

338
tcm.sql

@ -0,0 +1,338 @@
/*
Navicat Premium Data Transfer
Source Server :
Source Server Type : MariaDB
Source Server Version : 100328
Source Host : www.tall.wiki:3306
Source Schema : tcm
Target Server Type : MariaDB
Target Server Version : 100328
File Encoding : 65001
Date: 13/05/2021 15:22:07
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for t_biological_samples
-- ----------------------------
DROP TABLE IF EXISTS `t_biological_samples`;
CREATE TABLE `t_biological_samples` (
`id` bigint(20) NOT NULL,
`code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '生物样本编码(废弃字段)',
`sample_type` tinyint(1) NULL DEFAULT 0 COMMENT '样本类型 0:尿标本 1:抗凝血标本',
`patient_information_id` bigint(20) NULL DEFAULT 0 COMMENT '患者id',
`collect_time` int(11) NULL DEFAULT 0 COMMENT '采集时间 0 14 90',
`user_id` bigint(20) NULL DEFAULT 0 COMMENT '录入人id',
`created_at` timestamp NOT NULL DEFAULT current_timestamp,
`update_at` timestamp NOT NULL DEFAULT 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_common_file
-- ----------------------------
DROP TABLE IF EXISTS `t_common_file`;
CREATE TABLE `t_common_file` (
`id` bigint(20) UNSIGNED NOT NULL,
`user_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '上传用户ID',
`file_name` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '文件名',
`location` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '存储位置',
`visit_location` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' 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
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '文件表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_conference_records
-- ----------------------------
DROP TABLE IF EXISTS `t_conference_records`;
CREATE TABLE `t_conference_records` (
`id` bigint(20) NOT NULL,
`task_id` bigint(20) NULL DEFAULT 0 COMMENT '任务id',
`task_start_time` datetime NULL DEFAULT NULL COMMENT '任务开始时间',
`task_end_time` datetime NULL DEFAULT NULL COMMENT '任务结束时间',
`start_time` datetime NULL DEFAULT NULL COMMENT '会议开始时间',
`end_time` datetime NULL DEFAULT NULL COMMENT '会议开始时间',
`place` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '会议地点',
`host` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '主持人',
`participants` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '参会人',
`discussion_content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '研讨内容',
`meeting_minutes` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '会议纪要',
`user_id` bigint(20) NULL DEFAULT 0 COMMENT '录入人id',
`created_at` timestamp NOT NULL DEFAULT current_timestamp,
`update_at` timestamp NOT NULL DEFAULT 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_doctor
-- ----------------------------
DROP TABLE IF EXISTS `t_doctor`;
CREATE TABLE `t_doctor` (
`id` bigint(20) NOT NULL,
`name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '姓名',
`hospital_id` bigint(20) NULL DEFAULT 0 COMMENT '所属医院id',
`role` tinyint(1) NULL DEFAULT 0 COMMENT '角色 0:主治医生 1:项目助理 2:医院负责人 3:课题助理 4课题负责人',
`user_id` bigint(20) NULL DEFAULT 0 COMMENT ' 登录用户id',
`remark` 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,
INDEX `doctor_hospital_index`(`hospital_id`) USING BTREE,
INDEX `doctor_user_index`(`user_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '医生表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_hospital
-- ----------------------------
DROP TABLE IF EXISTS `t_hospital`;
CREATE TABLE `t_hospital` (
`id` bigint(20) NOT NULL,
`code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '医院编码',
`name` varchar(64) 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删除',
`project_id` bigint(20) NULL DEFAULT 0 COMMENT '项目id',
`hospital_type` tinyint(1) NULL DEFAULT 1 COMMENT '类型: 0:项目 1:医院',
PRIMARY KEY (`id`) USING BTREE,
INDEX `hospital_project_index`(`project_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '医院表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_inpatient
-- ----------------------------
DROP TABLE IF EXISTS `t_inpatient`;
CREATE TABLE `t_inpatient` (
`id` bigint(20) NOT NULL,
`code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '对照组编码',
`name` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '名称',
`remarks` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注',
`collection_num` int(11) NULL DEFAULT 1 COMMENT '搜集次数',
`user_id` bigint(20) NULL DEFAULT 0 COMMENT '录入人id',
`created_at` timestamp NOT NULL DEFAULT current_timestamp,
`update_at` timestamp NOT NULL DEFAULT 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_patient_information
-- ----------------------------
DROP TABLE IF EXISTS `t_patient_information`;
CREATE TABLE `t_patient_information` (
`id` bigint(20) NOT NULL,
`hospitalization` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '住院号',
`code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '研究编号',
`inpatient_id` bigint(20) NULL DEFAULT 0 COMMENT '对照组id',
`age` int(11) UNSIGNED NULL DEFAULT 0 COMMENT '发病年龄',
`input_status` tinyint(1) NULL DEFAULT 0 COMMENT '录入状态:0:新建 1:数据搜集中 2数据搜集完成 3数据搜集超时 4:废弃 5审核通过 6 已结算',
`hospital_id` bigint(20) NULL DEFAULT 0 COMMENT '医院id',
`check_id` bigint(20) NULL DEFAULT 0 COMMENT '审核人id',
`pass_id` bigint(20) NULL DEFAULT 0 COMMENT '通过人ID',
`user_id` bigint(20) NULL DEFAULT 0 COMMENT '录入人id',
`created_at` timestamp NOT NULL DEFAULT current_timestamp,
`update_at` timestamp NOT NULL DEFAULT current_timestamp,
`rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态 0正常 1禁用 2删除',
PRIMARY KEY (`id`) USING BTREE,
INDEX `hospitalization_index`(`hospitalization`) USING BTREE,
INDEX `hospital_id_index`(`hospital_id`) USING BTREE,
INDEX `patient_code_index`(`code`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '患者基本信息表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_patient_record
-- ----------------------------
DROP TABLE IF EXISTS `t_patient_record`;
CREATE TABLE `t_patient_record` (
`id` bigint(20) NOT NULL,
`patient_id` bigint(20) NULL DEFAULT 0 COMMENT '患者id',
`test_questions_id` bigint(20) NULL DEFAULT 0 COMMENT '试题id',
`contents` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '内容',
`user_id` bigint(20) NULL DEFAULT 0 COMMENT '录入人id',
`collect_time` int(11) NULL DEFAULT 0 COMMENT '采集时间 0 14 90',
`time_slot` datetime NULL DEFAULT NULL COMMENT '诊断时间段',
`created_at` timestamp NOT NULL DEFAULT current_timestamp,
`update_at` timestamp NOT NULL DEFAULT current_timestamp,
`rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态 0正常 1禁用 2删除',
`contents_type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '内容的类型 0普通的选项或填写的内容,1关联的其他信息,2题目的说明信息',
PRIMARY KEY (`id`) USING BTREE,
INDEX `contents_index`(`contents`) USING BTREE,
INDEX `patient_id_index`(`patient_id`) USING BTREE,
INDEX `test_questions_id_contents_index`(`test_questions_id`, `contents`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '患者记录表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_question
-- ----------------------------
DROP TABLE IF EXISTS `t_question`;
CREATE TABLE `t_question` (
`id` bigint(20) NOT NULL,
`question` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT ' 题目',
`code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '测评类型的id',
`sort` int(11) NULL DEFAULT 0 COMMENT '排序',
`units` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '单位 例如 g/L',
`type` tinyint(3) UNSIGNED NULL DEFAULT 0 COMMENT '1单行文本,2多行文本,3单选,4多选,5下拉菜单,6日期,7图片(文件),8单选+其他,9多选+其他,10下拉+其他,11多选+其他+说明,12单选+关联其他内容 13数字类型,14图片识别',
`fill_status` tinyint(1) NULL DEFAULT 0 COMMENT '填写状态: 0:非必填 1:必填',
`reference_lower` decimal(10, 2) NULL DEFAULT NULL COMMENT '参考值下限',
`reference_upper` decimal(10, 2) NULL DEFAULT NULL COMMENT '参考值上限',
`relevance_option_id` bigint(20) NULL DEFAULT 0 COMMENT '关联选项ID 默认0不关联',
`search_criteria` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '是否为搜索条件 0否 1是',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_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,
INDEX `question_code_index`(`code`, `sort`) USING BTREE,
INDEX `question_relevance_index`(`relevance_option_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '题目表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_question_hospital
-- ----------------------------
DROP TABLE IF EXISTS `t_question_hospital`;
CREATE TABLE `t_question_hospital` (
`id` bigint(20) NOT NULL,
`question_id` bigint(20) NULL DEFAULT 0 COMMENT '试题ID',
`hospital_id` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '医院ID',
`fill_type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '填写状态 0:非必填 1:必填',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_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,
INDEX `question_hospital_question_index`(`question_id`) USING BTREE,
INDEX `question_hospital_hospital_index`(`hospital_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '题目记录时间表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_question_ocr
-- ----------------------------
DROP TABLE IF EXISTS `t_question_ocr`;
CREATE TABLE `t_question_ocr` (
`id` bigint(20) NOT NULL,
`code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '测评类型',
`sort` int(11) NULL DEFAULT 0 COMMENT '排序',
`hospital_id` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '医院ID',
`start` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 开始,例:{\"key\":\"描述\"} 表示 描述后面的都是相关答案,若没有,默认从第0行开始 ',
`end` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 结束 ,例:{\"key\":\"超声提示\"} 表示 超声提示前的都是相关答案,若没有,以最后一行结束 ',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_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,
INDEX `ocr_code_sort_index`(`code`, `sort`) USING BTREE,
INDEX `ocr_hospital_index`(`hospital_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '题目ocr表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_question_option
-- ----------------------------
DROP TABLE IF EXISTS `t_question_option`;
CREATE TABLE `t_question_option` (
`id` bigint(20) NOT NULL,
`question_id` bigint(20) NULL DEFAULT 0 COMMENT ' 试题ID',
`sort` int(11) NULL DEFAULT 1 COMMENT ' 排序 ',
`show_value` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '显示值',
`submit_value` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '提交值',
`after_operation` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '选择之后的操作 0无 1单行文本 2多行文本 3关联其他题目',
`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 `option_question_index`(`question_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '选项表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_question_record_time
-- ----------------------------
DROP TABLE IF EXISTS `t_question_record_time`;
CREATE TABLE `t_question_record_time` (
`id` bigint(20) NOT NULL,
`code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '测评类型',
`recode_time` int(11) UNSIGNED NULL DEFAULT 0 COMMENT '记录时间 0 14 90 180 365',
`hospital_id` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '医院ID',
`remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_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,
INDEX `question_record_index`(`recode_time`) USING BTREE,
INDEX `question_code_index`(`code`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '题目记录时间表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_question_standard
-- ----------------------------
DROP TABLE IF EXISTS `t_question_standard`;
CREATE TABLE `t_question_standard` (
`id` bigint(20) NOT NULL,
`question_id` bigint(20) NULL DEFAULT 0 COMMENT ' 试题ID',
`max` int(11) NULL DEFAULT 0 COMMENT '最大值(上限)',
`min` int(11) NULL DEFAULT 0 COMMENT '最小值(下限)',
`description` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '描述',
`sort` int(11) NULL DEFAULT 1 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 `option_question_index`(`question_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '题目标准表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_report_code
-- ----------------------------
DROP TABLE IF EXISTS `t_report_code`;
CREATE TABLE `t_report_code` (
`id` bigint(20) NOT NULL,
`code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '类型code',
`name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '名称',
`parent_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '上级code',
`must` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '是否为必做项目 0否 1是',
`level` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '层级数',
`sort` int(11) NULL DEFAULT 0 COMMENT '顺序',
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注',
`report_type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '记录类型 0:只记录1次数据,1:记录3次,分别为0,14,90天 ,2:记录两次,分别是180,365',
`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删除',
`record_type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '录入状态,0仅手动输入 1:手动输入+图片识别',
PRIMARY KEY (`id`) USING BTREE,
INDEX `code_parent_index`(`parent_code`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '测评类型表' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_report_ocr
-- ----------------------------
DROP TABLE IF EXISTS `t_report_ocr`;
CREATE TABLE `t_report_ocr` (
`id` bigint(20) NOT NULL,
`code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '测评类型',
`ocr_channel` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT 'ocr渠道 0:百度 1:阿里',
`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 `report_code_index`(`code`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '类型ocr表' ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;

217
wisdomcar.sql

@ -0,0 +1,217 @@
/*
Navicat Premium Data Transfer
Source Server :
Source Server Type : MariaDB
Source Server Version : 100318
Source Host : test.tall.wiki:3306
Source Schema : wisdomcar
Target Server Type : MariaDB
Target Server Version : 100318
File Encoding : 65001
Date: 13/05/2021 15:13:25
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for t_first_aid
-- ----------------------------
DROP TABLE IF EXISTS `t_first_aid`;
CREATE TABLE `t_first_aid` (
`id` bigint(20) NOT NULL,
`car_id` bigint(20) NULL DEFAULT 0 COMMENT '平车id',
`hospital_id` bigint(20) NULL DEFAULT 0 COMMENT '医院id',
`begin_time` bigint(20) NULL DEFAULT 0 COMMENT '开始时间',
`end_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 COMMENT '状态,0正常 1禁用 2删除',
PRIMARY KEY (`id`) USING BTREE,
INDEX `aid_car_index`(`car_id`) USING BTREE,
INDEX `aid_hospital_index`(`hospital_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '急救表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_first_aid_record
-- ----------------------------
DROP TABLE IF EXISTS `t_first_aid_record`;
CREATE TABLE `t_first_aid_record` (
`id` bigint(20) NOT NULL,
`first_aid_id` bigint(20) NULL DEFAULT 0 COMMENT '急救表id',
`type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '类型 0开始 1体重 2rfid, 3称重一 4称重二 5称重三 6称重四 7震动 8剂量',
`value` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '该类型对应的值',
`begin_time` bigint(20) NULL DEFAULT 0 COMMENT '开始时间',
`step_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 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 = Compact;
-- ----------------------------
-- Table structure for t_first_aid_standard
-- ----------------------------
DROP TABLE IF EXISTS `t_first_aid_standard`;
CREATE TABLE `t_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 = Compact;
-- ----------------------------
-- Table structure for t_rfid
-- ----------------------------
DROP TABLE IF EXISTS `t_rfid`;
CREATE TABLE `t_rfid` (
`id` bigint(20) NOT NULL,
`rfid` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT 'rfid',
`type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '类型 0医生 1采血车 2门禁',
`name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '名字',
`step_id` bigint(20) NULL DEFAULT 0 COMMENT '环节id',
`hospital_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 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 = Compact;
-- ----------------------------
-- Table structure for t_screen
-- ----------------------------
DROP TABLE IF EXISTS `t_screen`;
CREATE TABLE `t_screen` (
`id` bigint(20) NOT NULL,
`name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '名字',
`hospital_id` bigint(20) NULL DEFAULT 0 COMMENT '医院id',
`show_type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '大屏显示类型 0主屏 当前默认全是0',
`user_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 COMMENT '状态,0正常 1禁用 2删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '平车信息' ROW_FORMAT = Compact;
-- ----------------------------
-- 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 = Compact;
-- ----------------------------
-- Table structure for t_step
-- ----------------------------
DROP TABLE IF EXISTS `t_step`;
CREATE TABLE `t_step` (
`id` bigint(20) NOT NULL,
`name` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '环节名称',
`code` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '环节code',
`sequence` int(11) NULL DEFAULT 0 COMMENT '顺序',
`step_type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '环节类型。0真正的环节,1rfid的环节',
`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 = Compact;
-- ----------------------------
-- Table structure for t_wisdom_car
-- ----------------------------
DROP TABLE IF EXISTS `t_wisdom_car`;
CREATE TABLE `t_wisdom_car` (
`id` bigint(20) NOT NULL,
`car_number` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '平车编号',
`time` bigint(20) NULL DEFAULT 0 COMMENT '入库时间',
`hospital_id` bigint(20) NULL DEFAULT 0 COMMENT '医院id',
`screen_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 COMMENT '状态,0正常 1禁用 2删除',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '平车信息' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for t_wisdom_car_record
-- ----------------------------
DROP TABLE IF EXISTS `t_wisdom_car_record`;
CREATE TABLE `t_wisdom_car_record` (
`id` bigint(20) NOT NULL,
`car_id` bigint(20) NULL DEFAULT 0 COMMENT '平车id',
`type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '类型 0开始 1体重 2rfid, 3称重一 4称重二 5称重三 6称重四 7震动 8剂量',
`value` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '该类型对应的值',
`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 COMMENT '状态,0正常 1禁用 2删除',
PRIMARY KEY (`id`) USING BTREE,
INDEX `wisdom_car_index`(`car_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '数据记录表' ROW_FORMAT = Compact;
-- ----------------------------
-- Procedure structure for u_head_and_low_pro
-- ----------------------------
DROP PROCEDURE IF EXISTS `u_head_and_low_pro`;
delimiter ;;
CREATE PROCEDURE `u_head_and_low_pro`()
begin
DECLARE n int DEFAULT 1;
DECLARE m int DEFAULT 1;
set @exesql = 'insert into t_first_aid (id,car_id,begin_time) values ';
set @exedata = '';
WHILE m < 13 DO
set @y = "";
select @y:=unix_timestamp(STR_TO_DATE(concat("2020-",m,"-01"),"%Y-%m-%d")) * 1000;
set @d = "";
select @d:= RAND() * 200 + 150;
WHILE n < @d DO
set @exedata = concat(@exedata,"(2020",if(m <10,concat("0",m),m),n,",","1,",@y,")");
if n < @d -1
then
set @exedata = concat(@exedata,',');
end if;
set n = n + 1;
END WHILE;
set @exesql = concat(@exesql,@exedata,";");
SELECT @exesql;
prepare stmt from @exesql;
execute stmt;
DEALLOCATE prepare stmt;
commit;
set @exesql = 'insert into t_first_aid (id,car_id,begin_time) values ';
set @exedata = "";
set m = m + 1;
set n = 1;
END WHILE;
end
;;
delimiter ;
SET FOREIGN_KEY_CHECKS = 1;

480
yanyuan.sql

@ -0,0 +1,480 @@
/*
Navicat Premium Data Transfer
Source Server :
Source Server Type : MariaDB
Source Server Version : 100323
Source Host : sd.tall.wiki:3306
Source Schema : yanyuan
Target Server Type : MariaDB
Target Server Version : 100323
File Encoding : 65001
Date: 13/05/2021 15:20:53
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for r_register
-- ----------------------------
DROP TABLE IF EXISTS `r_register`;
CREATE TABLE `r_register` (
`register_no` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`batch_num` int(11) NULL DEFAULT NULL,
`is_bound` tinyint(1) NULL DEFAULT NULL,
`created_at` date NULL DEFAULT NULL,
`updated_at` date NULL DEFAULT NULL,
`status` tinyint(1) NULL DEFAULT NULL,
PRIMARY KEY (`register_no`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for r_register_no
-- ----------------------------
DROP TABLE IF EXISTS `r_register_no`;
CREATE TABLE `r_register_no` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '注册码生成使用',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 1004 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Fixed;
-- ----------------------------
-- Table structure for s_admin
-- ----------------------------
DROP TABLE IF EXISTS `s_admin`;
CREATE TABLE `s_admin` (
`id` varchar(36) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '管理员ID UUID',
`login_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '登录名 索引',
`password` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '登录密码',
`role_id` varchar(36) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '角色ID',
`real_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '真实姓名',
`mobile` varchar(20) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '手机号码',
`email` varchar(100) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '邮箱',
`is_disable` tinyint(1) NULL DEFAULT 0 COMMENT '是否禁用 0:未禁用 1:禁用',
`is_fixed` tinyint(1) NULL DEFAULT 0 COMMENT '是否锁定(不可编辑,删除) 0:不锁定 1:锁定',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`update_time` datetime NULL DEFAULT NULL COMMENT '编辑时间',
`status` tinyint(1) NULL DEFAULT 1 COMMENT '状态 0:删除 1:正常',
PRIMARY KEY (`id`) USING BTREE,
INDEX `login_name`(`login_name`) USING BTREE
) ENGINE = MyISAM CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for s_area
-- ----------------------------
DROP TABLE IF EXISTS `s_area`;
CREATE TABLE `s_area` (
`id` int(11) NOT NULL COMMENT '区县ID',
`city_id` int(11) NULL DEFAULT NULL COMMENT '所属市',
`name` varchar(100) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '区县名称',
`pinyin` varchar(100) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '区县拼音',
`short_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '区县简称',
`zip_code` varchar(20) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '邮政编码',
`city_code` varchar(20) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '区县编码',
`longitude` double NULL DEFAULT NULL COMMENT '经度',
`latitude` double NULL DEFAULT NULL COMMENT '纬度',
`sort` int(11) NULL DEFAULT 0 COMMENT '排序值',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for s_city
-- ----------------------------
DROP TABLE IF EXISTS `s_city`;
CREATE TABLE `s_city` (
`id` int(11) NOT NULL,
`province_id` int(11) NULL DEFAULT NULL COMMENT '所属省',
`name` varchar(100) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '城市名称',
`pinyin` varchar(100) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '城市拼音',
`short_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '城市简称',
`zip_code` varchar(20) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '邮政编码',
`city_code` varchar(20) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '城市编码',
`longitude` double NULL DEFAULT NULL COMMENT '经度',
`latitude` double NULL DEFAULT NULL COMMENT '纬度',
`sort` int(11) NULL DEFAULT 0 COMMENT '排序值',
PRIMARY KEY (`id`) USING BTREE,
INDEX `index_cities_on_province_id`(`province_id`) USING BTREE
) ENGINE = MyISAM CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for s_config
-- ----------------------------
DROP TABLE IF EXISTS `s_config`;
CREATE TABLE `s_config` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`minValue` int(11) NULL DEFAULT NULL,
`maxValue` int(255) NULL DEFAULT NULL,
`grade` int(255) NULL DEFAULT NULL,
`intro` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for s_grade
-- ----------------------------
DROP TABLE IF EXISTS `s_grade`;
CREATE TABLE `s_grade` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(20) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL,
`minValue` decimal(6, 2) NULL DEFAULT NULL,
`maxValue` decimal(6, 2) NULL DEFAULT NULL,
`grade` int(6) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 6 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for s_menu
-- ----------------------------
DROP TABLE IF EXISTS `s_menu`;
CREATE TABLE `s_menu` (
`id` varchar(36) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'UUID 主键',
`name` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '菜单名称',
`url` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '菜单链接的Url',
`parent_id` varchar(36) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '父菜单ID',
`description` varchar(250) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL,
`is_disable` tinyint(1) NULL DEFAULT 0 COMMENT '是否禁用 0:未禁用 1:禁用',
`sort` int(4) NULL DEFAULT 0 COMMENT '排序值(越大值越大,顺序越靠前)',
`type` int(4) NULL DEFAULT 0 COMMENT '菜单类型 0:父菜单,没有链接 1:菜单页面,链接到页面 2:子页面 不再菜单中显示(例如详情页,编辑页)',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
`status` tinyint(1) NULL DEFAULT 1 COMMENT '状态 0:删除 1:正常',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for s_province
-- ----------------------------
DROP TABLE IF EXISTS `s_province`;
CREATE TABLE `s_province` (
`id` int(11) NOT NULL,
`name` varchar(100) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '省名称',
`pinyin` varchar(100) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '名称拼音',
`short_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '省简称',
`zip_code` varchar(20) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '邮政编码',
`type` int(11) NULL DEFAULT NULL COMMENT ' 1:直辖市 2:行政省 3:自治区 4:特别行政区',
`longitude` double NULL DEFAULT NULL COMMENT '经度',
`latitude` double NULL DEFAULT NULL COMMENT '纬度',
`sort` int(11) NULL DEFAULT 0 COMMENT '排序值',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for s_role
-- ----------------------------
DROP TABLE IF EXISTS `s_role`;
CREATE TABLE `s_role` (
`id` varchar(36) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`name` varchar(50) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL,
`description` varchar(250) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL,
`is_disable` tinyint(1) NULL DEFAULT 0 COMMENT '是否禁用 0:未禁用 1:已禁用',
`is_fixed` tinyint(1) NULL DEFAULT 0 COMMENT '是否锁定(锁定的话,不可编辑和删除) 0:未锁定 1:锁定',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
`status` tinyint(1) NULL DEFAULT 1 COMMENT '状态 0:删除 1:正常',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for s_role_menu
-- ----------------------------
DROP TABLE IF EXISTS `s_role_menu`;
CREATE TABLE `s_role_menu` (
`id` varchar(36) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
`menu_id` varchar(36) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '菜单id',
`role_id` varchar(36) CHARACTER SET utf8 COLLATE utf8_bin NULL DEFAULT NULL COMMENT '角色id',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
`status` tinyint(1) NULL DEFAULT 1 COMMENT '状态 0:删除 1:正常',
PRIMARY KEY (`id`) USING BTREE,
INDEX `role_id`(`role_id`) USING BTREE
) ENGINE = MyISAM CHARACTER SET = utf8 COLLATE = utf8_bin ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_train_aid
-- ----------------------------
DROP TABLE IF EXISTS `t_train_aid`;
CREATE TABLE `t_train_aid` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '教具',
`description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '描述',
`user_id` bigint(20) NULL DEFAULT 0 COMMENT '操作人id',
`created_at` timestamp NOT NULL DEFAULT current_timestamp,
`update_at` timestamp NOT NULL DEFAULT current_timestamp,
`rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态 0正常 1禁用 2删除',
PRIMARY KEY (`id`) USING BTREE,
INDEX `name_index`(`name`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '训练教具' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_train_content
-- ----------------------------
DROP TABLE IF EXISTS `t_train_content`;
CREATE TABLE `t_train_content` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`aid_id` int(11) NULL DEFAULT 0 COMMENT '教具ID',
`content` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '训练内容',
`level` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '训练难度,数值越大表示难度越高',
`user_id` bigint(20) NULL DEFAULT 0 COMMENT '操作人id',
`created_at` timestamp NOT NULL DEFAULT current_timestamp,
`update_at` timestamp NOT NULL DEFAULT current_timestamp,
`rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态 0正常 1禁用 2删除',
PRIMARY KEY (`id`) USING BTREE,
INDEX `train_content_aid_index`(`aid_id`) USING BTREE,
INDEX `train_content_level_index`(`level`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 286 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '训练内容' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_train_content_detail
-- ----------------------------
DROP TABLE IF EXISTS `t_train_content_detail`;
CREATE TABLE `t_train_content_detail` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`content_id` int(11) NULL DEFAULT 0 COMMENT '教具ID',
`content` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '训练内容',
`type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '类型 0:训练目标 1:训练元素 2:训练原理 3:训练步骤',
`sort` tinyint(2) UNSIGNED NULL DEFAULT 1 COMMENT '排序',
`user_id` bigint(20) NULL DEFAULT 0 COMMENT '操作人id',
`created_at` timestamp NOT NULL DEFAULT current_timestamp,
`update_at` timestamp NOT NULL DEFAULT current_timestamp,
`rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态 0正常 1禁用 2删除',
PRIMARY KEY (`id`) USING BTREE,
INDEX `train_detail_contentId_index`(`content_id`, `type`, `sort`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 617 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '训练内容详情' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_train_img
-- ----------------------------
DROP TABLE IF EXISTS `t_train_img`;
CREATE TABLE `t_train_img` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`content_id` int(11) NULL DEFAULT 0 COMMENT '教具ID',
`url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '访问路径',
`sort` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '排序',
`user_id` bigint(20) NULL DEFAULT 0 COMMENT '操作人id',
`created_at` timestamp NOT NULL DEFAULT current_timestamp,
`update_at` timestamp NOT NULL DEFAULT current_timestamp,
`rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态 0正常 1禁用 2删除',
PRIMARY KEY (`id`) USING BTREE,
INDEX `train_img_contentid_index`(`content_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 134 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '训练内容对应的图' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for t_train_record
-- ----------------------------
DROP TABLE IF EXISTS `t_train_record`;
CREATE TABLE `t_train_record` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`test_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '测试ID',
`question_id` int(11) NULL DEFAULT 0 COMMENT '试题ID',
`user_id` bigint(20) NULL DEFAULT 0 COMMENT '操作人id',
`created_at` timestamp NOT NULL DEFAULT current_timestamp,
`update_at` timestamp NOT NULL DEFAULT current_timestamp,
`rec_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态 0正常 1禁用 2删除',
PRIMARY KEY (`id`) USING BTREE,
INDEX `train_record_test_index`(`test_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 673 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '训练计划' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for u_care
-- ----------------------------
DROP TABLE IF EXISTS `u_care`;
CREATE TABLE `u_care` (
`id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`user_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`care_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`care_sex` tinyint(1) NULL DEFAULT NULL,
`care_age` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`job_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`educate_level` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`care_period` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`care_relation` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`zarit_point` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`zarit_state` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`create_at` datetime NULL DEFAULT NULL,
`update_at` datetime NULL DEFAULT NULL,
`status` tinyint(1) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for u_follow_up
-- ----------------------------
DROP TABLE IF EXISTS `u_follow_up`;
CREATE TABLE `u_follow_up` (
`id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`user_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`is_test` tinyint(1) NULL DEFAULT NULL,
`test_at` datetime NULL DEFAULT NULL,
`mmse_score` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`moca_score` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`adl_score` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`npi_score` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`total_score` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`first_medicine` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`second_medicine` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`third_medicine` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`forth_medicine` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`fifth_medicine` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`sixth_medicine` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`sev_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`sev_medicine` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`create_at` datetime NULL DEFAULT NULL,
`update_at` datetime NULL DEFAULT NULL,
`status` tinyint(1) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for u_health_record
-- ----------------------------
DROP TABLE IF EXISTS `u_health_record`;
CREATE TABLE `u_health_record` (
`id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`user_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`mental_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`follow_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`care_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`record_at` datetime NULL DEFAULT NULL,
`create_at` datetime NULL DEFAULT NULL,
`update_at` datetime NULL DEFAULT NULL,
`status` tinyint(1) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for u_mental_test
-- ----------------------------
DROP TABLE IF EXISTS `u_mental_test`;
CREATE TABLE `u_mental_test` (
`id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`user_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`memory_num` decimal(10, 2) NULL DEFAULT NULL,
`express_num` decimal(10, 2) NULL DEFAULT NULL,
`view_num` decimal(10, 2) NULL DEFAULT NULL,
`attention_num` decimal(10, 2) NULL DEFAULT NULL,
`direction_num` decimal(10, 2) NULL DEFAULT NULL,
`count_num` decimal(10, 2) NULL DEFAULT NULL,
`logic_num` decimal(10, 2) NULL DEFAULT NULL,
`average_num` decimal(10, 2) NULL DEFAULT NULL,
`from_type` bit(4) NULL DEFAULT NULL,
`grade_result` int(11) NULL DEFAULT NULL,
`test_at` datetime NULL DEFAULT NULL,
`create_at` datetime NULL DEFAULT NULL,
`update_at` datetime NULL DEFAULT NULL,
`status` tinyint(1) NULL DEFAULT NULL,
`pdf_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for u_practice
-- ----------------------------
DROP TABLE IF EXISTS `u_practice`;
CREATE TABLE `u_practice` (
`id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`user_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`mental_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`practice_period` int(11) NULL DEFAULT NULL,
`first_practice` int(11) NULL DEFAULT NULL,
`second_practice` int(11) NULL DEFAULT NULL,
`third_practice` int(11) NULL DEFAULT NULL,
`forth_practice` int(11) NULL DEFAULT NULL,
`fifth_practice` int(11) NULL DEFAULT NULL,
`sixth_practice` int(11) NULL DEFAULT NULL,
`seventh_practice` int(11) NULL DEFAULT NULL,
`eighth_practice` int(11) NULL DEFAULT NULL,
`ninth_practice` int(11) NULL DEFAULT NULL,
`tenth_practice` int(11) NULL DEFAULT NULL,
`eleventh_practice` int(11) NULL DEFAULT NULL,
`start_at` datetime NULL DEFAULT NULL,
`end_at` datetime NULL DEFAULT NULL,
`create_at` datetime NULL DEFAULT NULL,
`update_at` datetime NULL DEFAULT NULL,
`status` tinyint(1) NULL DEFAULT NULL,
`twelfth_practice` int(11) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for u_score
-- ----------------------------
DROP TABLE IF EXISTS `u_score`;
CREATE TABLE `u_score` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`memory_score` int(11) NULL DEFAULT 0 COMMENT '记忆力',
`express_score` int(11) NULL DEFAULT 0 COMMENT '语言能力',
`view_score` int(11) NULL DEFAULT 0 COMMENT '视空力',
`attention_score` int(11) NULL DEFAULT 0 COMMENT '注意力',
`direction_score` int(11) NULL DEFAULT 0 COMMENT '定向力',
`count_score` int(11) NULL DEFAULT 0 COMMENT '计算能力',
`logic_score` int(11) NULL DEFAULT 0 COMMENT '逻辑执行',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 121 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for u_user
-- ----------------------------
DROP TABLE IF EXISTS `u_user`;
CREATE TABLE `u_user` (
`id` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户ID',
`open_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '微信openId',
`nick_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '微信昵称',
`head_imgurl` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '头像',
`subscribe_time` int(11) NULL DEFAULT NULL COMMENT '用户关注时间,为时间戳',
`register_no` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '绑定注册码',
`user_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户姓名',
`mobile` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户手机',
`sex` int(11) NULL DEFAULT NULL COMMENT '用户的性别,值为1时是男性,值为2时是女性,值为0时是未知',
`clinic_hospital` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '就诊医院',
`hospital_province_id` int(11) NULL DEFAULT NULL COMMENT '医院所在省ID',
`hospital_city_id` int(11) NULL DEFAULT NULL COMMENT '医院所在城市ID',
`hospital_address` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '医院详细地址',
`clinic_office` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '就诊科室',
`clinic_doctor` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '就诊医生',
`birth_date` datetime NULL DEFAULT NULL COMMENT '出生年月',
`height` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '身高',
`weight` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '体重',
`job_title` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '职业',
`educate_status` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '受教育程度',
`educate_date` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '受教育年限',
`abode_place` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '长期居住地',
`appear_time` datetime NULL DEFAULT NULL COMMENT '出现认知障碍时间',
`diagnose_time` datetime NULL DEFAULT NULL COMMENT '首次诊断痴呆时间',
`diagnose_result` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '诊断',
`min_blood_pressure` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '血压最低值',
`max_blood_pressure` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '最大血压值',
`blood_fat` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '血脂',
`physical_act` varchar(4) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '体力活动',
`apoe_gene` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'ApoE基因',
`diseases_record` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '疾病史',
`relative_diseases_record` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '亲属疾病史',
`is_insomnic` tinyint(1) NULL DEFAULT NULL COMMENT '是否失眠: 0 不 1 是',
`insomnic_period` varchar(4) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '每天平均失眠时间',
`is_smoke` tinyint(4) NULL DEFAULT NULL COMMENT '是否吸烟 0 不 1 吸烟已戒 2 吸烟未戒',
`quit_period` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '已戒烟时长',
`sustain_period` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '吸烟持续时间',
`average_num` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '平均每天吸烟数量',
`is_drink` tinyint(4) NULL DEFAULT NULL COMMENT '是否饮酒 0 不 1 是 已戒 2 是 未戒',
`abstinence_period` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '戒酒时长',
`drink_type` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '饮酒种类',
`is_tea` tinyint(4) NULL DEFAULT NULL COMMENT '是否喝茶 0 不 2 是 不喝 3 喝 继续中',
`quit_tea` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '已不喝茶时长',
`continue_period` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '喝茶持续时长',
`tea_type` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '喝茶种类',
`tea_period` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '喝茶频率',
`is_strong_flavour` tinyint(1) NULL DEFAULT NULL COMMENT '是否口味重 0 不 1 是',
`is_like_meat` tinyint(1) NULL DEFAULT NULL COMMENT '是否偏爱荤菜 0 不 1 是',
`is_more_oil` tinyint(1) NULL DEFAULT NULL COMMENT '是否多油 0 不 1 是',
`msg_at` datetime NULL DEFAULT NULL COMMENT '发送短信时间',
`created_at` datetime NULL DEFAULT NULL,
`update_at` datetime NULL DEFAULT NULL,
`status` tinyint(1) NULL DEFAULT 1,
PRIMARY KEY (`id`) USING BTREE,
INDEX `mobile`(`mobile`) USING BTREE,
INDEX `_copy_1`(`open_id`) USING BTREE
) ENGINE = MyISAM CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '基本信息填写' ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;
Loading…
Cancel
Save