/* 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;