标准回答: PowerDesigner是一种数据库建模和设计工具,它用于创建数据库模型、设计表结构、定义关系和生成数据库脚本。它在数据库设计和开发中的作用是帮助开发人员规划数据库架构、可视化数据模型,以及生成DDL(数据定义语言)脚本用于数据库的创建和维护。
标准回答: PowerDesigner是一种数据库建模和设计工具,它的主要用途和功能包括:
在数据库设计和开发中,PowerDesigner可以帮助开发人员:
标准回答: PowerDesigner支持数据库设计中的物理数据建模和逻辑数据建模:
PowerDesigner的强大之处在于它可以支持物理数据模型和逻辑数据模型之间的无缝转换和同步。设计人员可以从逻辑数据模型创建物理数据模型,并生成特定数据库管理系统的DDL脚本。反之,他们也可以从物理数据模型反向生成逻辑数据模型,以进行独立的数据结构分析和设计。
这种能力使得数据库设计人员能够在不受特定数据库限制的情况下进行数据建模,然后根据需要将其映射到不同的数据库管理系统中,提高了设计的灵活性和可维护性。
标准回答:
PDM文件在数据库设计中的作用是定义数据库结构和关系,包括表的字段、主键、外键等信息。SQL文件则用于执行具体的数据库操作。相互转换的过程通常包括:
这样,PowerDesigner允许数据库设计人员在PDM文件和SQL文件之间进行无缝的转换,提高了设计和维护数据库的效率。
标准回答: Docker容器是一种轻量级的、可移植的应用程序打包和部署技术。它将应用程序及其所有依赖项(包括运行时、库、配置等)打包到一个独立的容器中,使应用程序能够在不同的环境中以相同的方式运行。
与传统虚拟机(VM)相比,Docker容器有以下区别和优势:
Docker容器已经成为构建和部署微服务架构的重要工具,帮助开发人员更快速、可靠地交付应用程序。
标准回答: Docker镜像是一个轻量级、可执行的文件,包含了运行一个容器所需的一切,包括代码、运行时、系统工具、库以及环境变量。Docker镜像是容器的基础,容器是从镜像创建的运行实例。
Docker镜像与容器的关系如下:
创建和使用Docker镜像的步骤包括:
docker build
命令根据Dockerfile构建镜像。这将执行Dockerfile中的指令,生成镜像。docker run
命令根据镜像创建并运行容器实例。Docker镜像的可移植性和轻量级使其成为容器化应用程序开发和部署的理想选择。
-- 表结构:t_exam_paper (考试试卷表)
DROP TABLE IF EXISTS `t_exam_paper`;
CREATE TABLE `t_exam_paper` (
`id` int NOT NULL AUTO_INCREMENT COMMENT '试卷ID',
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '试卷名称',
`subject_id` int NULL DEFAULT NULL COMMENT '学科ID',
`paper_type` int NULL DEFAULT NULL COMMENT '试卷类型',
`grade_level` int NULL DEFAULT NULL COMMENT '年级',
`score` int NULL DEFAULT NULL COMMENT '总分',
`question_count` int NULL DEFAULT NULL COMMENT '试题数量',
`suggest_time` int NULL DEFAULT NULL COMMENT '建议完成时间',
`limit_start_time` datetime NULL DEFAULT NULL COMMENT '限制开始时间',
`limit_end_time` datetime NULL DEFAULT NULL COMMENT '限制结束时间',
`frame_text_content_id` int NULL DEFAULT NULL COMMENT '正文内容ID',
`create_user` int NULL DEFAULT NULL COMMENT '创建用户',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`deleted` bit(1) NULL DEFAULT NULL COMMENT '删除标志',
`task_exam_id` int NULL DEFAULT NULL COMMENT '任务考试ID',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
-- 表结构:t_exam_paper_answer (试卷答案表)
DROP TABLE IF EXISTS `t_exam_paper_answer`;
CREATE TABLE `t_exam_paper_answer` (
`id` int NOT NULL AUTO_INCREMENT COMMENT '答案ID',
`exam_paper_id` int NULL DEFAULT NULL COMMENT '试卷ID',
`paper_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '试卷名称',
`paper_type` int NULL DEFAULT NULL COMMENT '试卷类型',
`subject_id` int NULL DEFAULT NULL COMMENT '学科ID',
`system_score` int NULL DEFAULT NULL COMMENT '系统得分',
`user_score` int NULL DEFAULT NULL COMMENT '用户得分',
`paper_score` int NULL DEFAULT NULL COMMENT '试卷得分',
`question_correct` int NULL DEFAULT NULL COMMENT '正确题数',
`question_count` int NULL DEFAULT NULL COMMENT '试题数量',
`do_time` int NULL DEFAULT NULL COMMENT '完成时间',
`status` int NULL DEFAULT NULL COMMENT '状态',
`create_user` int NULL DEFAULT NULL COMMENT '创建用户',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`task_exam_id` int NULL DEFAULT NULL COMMENT '任务考试ID',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
-- 表结构:t_exam_paper_question_customer_answer (试卷试题客户答案表)
DROP TABLE IF EXISTS `t_exam_paper_question_customer_answer`;
CREATE TABLE `t_exam_paper_question_customer_answer` (
`id` int NOT NULL AUTO_INCREMENT COMMENT '答案ID',
`question_id` int NULL DEFAULT NULL COMMENT '试题ID',
`exam_paper_id` int NULL DEFAULT NULL COMMENT '试卷ID',
`exam_paper_answer_id` int NULL DEFAULT NULL COMMENT '试卷答案ID',
`question_type` int NULL DEFAULT NULL COMMENT '试题类型',
`subject_id` int NULL DEFAULT NULL COMMENT '学科ID',
`customer_score` int NULL DEFAULT NULL COMMENT '客户得分',
`question_score` int NULL DEFAULT NULL COMMENT '试题得分',
`question_text_content_id` int NULL DEFAULT NULL COMMENT '试题文本内容ID',
`answer` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '答案',
`text_content_id` int NULL DEFAULT NULL COMMENT '文本内容ID',
`do_right` bit(1) NULL DEFAULT NULL COMMENT '是否正确',
`create_user` int NULL DEFAULT NULL COMMENT '创建用户',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`item_order` int NULL DEFAULT NULL COMMENT '项次',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
-- 表结构:t_message (消息表)
DROP TABLE IF EXISTS `t_message`;
CREATE TABLE `t_message` (
`id` int NOT NULL AUTO_INCREMENT COMMENT '消息ID',
`title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标题',
`content` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '内容',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`send_user_id` int NULL DEFAULT NULL COMMENT '发送用户ID',
`send_user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '发送用户名',
`send_real_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '发送用户真实姓名',
`receive_user_count` int NULL DEFAULT NULL COMMENT '接收用户数量',
`read_count` int NULL DEFAULT NULL COMMENT '阅读数量',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
-- 表结构:t_message_user (消息用户关联表)
DROP TABLE IF EXISTS `t_message_user`;
CREATE TABLE `t_message_user` (
`id` int NOT NULL AUTO_INCREMENT COMMENT '关联ID',
`message_id` int NULL DEFAULT NULL COMMENT '消息ID',
`receive_user_id` int NULL DEFAULT NULL COMMENT '接收用户ID',
`receive_user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '接收用户名',
`receive_real_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '接收用户真实姓名',
`readed` bit(1) NULL DEFAULT NULL COMMENT '是否已阅读',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`read_time` datetime NULL DEFAULT NULL COMMENT '阅读时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
-- 表结构:t_question (试题表)
DROP TABLE IF EXISTS `t_question`;
CREATE TABLE `t_question` (
`id` int NOT NULL AUTO_INCREMENT COMMENT '试题ID',
`question_type` int NULL DEFAULT NULL COMMENT '试题类型',
`subject_id` int NULL DEFAULT NULL COMMENT '学科ID',
`score` int NULL DEFAULT NULL COMMENT '分数',
`grade_level` int NULL DEFAULT NULL COMMENT '年级',
`difficult` int NULL DEFAULT NULL COMMENT '难度',
`correct` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '答案',
`info_text_content_id` int NULL DEFAULT NULL COMMENT '信息文本内容ID',
`create_user` int NULL DEFAULT NULL COMMENT '创建用户',
`status` int NULL DEFAULT NULL COMMENT '状态',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`deleted` bit(1) NULL DEFAULT NULL COMMENT '删除标志',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
-- 表结构:t_subject (学科表)
DROP TABLE IF EXISTS `t_subject`;
CREATE TABLE `t_subject` (
`id` int NOT NULL AUTO_INCREMENT COMMENT '学科ID',
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '学科名称',
`level` int NULL DEFAULT NULL COMMENT '级别',
`level_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '级别名称',
`item_order` int NULL DEFAULT NULL COMMENT '项次',
`deleted` bit(1) NULL DEFAULT NULL COMMENT '删除标志',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
-- 表结构:t_task_exam (任务考试表)
DROP TABLE IF EXISTS `t_task_exam`;
CREATE TABLE `t_task_exam` (
`id` int NOT NULL AUTO_INCREMENT COMMENT '任务考试ID',
`title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标题',
`grade_level` int NULL DEFAULT NULL COMMENT '年级',
`frame_text_content_id` int NULL DEFAULT NULL COMMENT '框架文本内容ID',
`create_user` int NULL DEFAULT NULL COMMENT '创建用户',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`deleted` bit(1) NULL DEFAULT NULL COMMENT '删除标志',
`create_user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建用户名',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
-- 表结构:t_task_exam_customer_answer (任务考试客户答案表)
DROP TABLE IF EXISTS `t_task_exam_customer_answer`;
CREATE TABLE `t_task_exam_customer_answer` (
`id` int NOT NULL AUTO_INCREMENT COMMENT '客户答案ID',
`task_exam_id` int NULL DEFAULT NULL COMMENT '任务考试ID',
`create_user` int NULL DEFAULT NULL COMMENT '创建用户',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`text_content_id` int NULL DEFAULT NULL COMMENT '文本内容ID',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
-- 表结构:t_text_content (文本内容表)
DROP TABLE IF EXISTS `t_text_content`;
CREATE TABLE `t_text_content` (
`id` int NOT NULL AUTO_INCREMENT COMMENT '文本内容ID',
`content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '内容',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
-- 表结构:t_user (用户表)
DROP TABLE IF EXISTS `t_user`;
CREATE TABLE `t_user` (
`id` int NOT NULL AUTO_INCREMENT COMMENT '用户ID',
`user_uuid` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户UUID',
`user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户名',
`password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '密码',
`real_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '真实姓名',
`age` int NULL DEFAULT NULL COMMENT '年龄',
`sex` int NULL DEFAULT NULL COMMENT '性别',
`birth_day` datetime NULL DEFAULT NULL COMMENT '出生日期',
`user_level` int NULL DEFAULT NULL COMMENT '用户级别',
`phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '电话号码',
`role` int NULL DEFAULT NULL COMMENT '角色',
`status` int NULL DEFAULT NULL COMMENT '状态',
`image_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '头像路径',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`modify_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
`last_active_time` datetime NULL DEFAULT NULL COMMENT '最后活动时间',
`deleted` bit(1) NULL DEFAULT NULL COMMENT '删除标志',
`wx_open_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '微信OpenID',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
-- 添加记录到表:t_user (用户表)
INSERT INTO `t_user` VALUES (1, 'd2d29da2-dcb3-4013-b874-727626236f47', 'student', 'D1AGFL+Gx37t0NPG4d6biYP5Z31cNbwhK5w1lUeiHB2zagqbk8efYfSjYoh1Z/j1dkiRjHU+b0EpwzCh8IGsksJjzD65ci5LsnodQVf4Uj6D3pwoscXGqmkjjpzvSJbx42swwNTA+QoDU8YLo7JhtbUK2X0qCjFGpd+8eJ5BGvk=', '学生', 18, 1, '2019-09-01 16:00:00', 1, '19171171610', 1, 1, 'https://www.mindskip.net:9008/image/ba607a75-83ba-4530-8e23-660b72dc4953/头像.jpg', '2019-09-07 18:55:02', '2020-02-04 08:26:54', NULL, b'0', NULL);
INSERT INTO `t_user` VALUES (2, '52045f5f-a13f-4ccc-93dd-f7ee8270ad4c', 'admin', 'D1AGFL+Gx37t0NPG4d6biYP5Z31cNbwhK5w1lUeiHB2zagqbk8efYfSjYoh1Z/j1dkiRjHU+b0EpwzCh8IGsksJjzD65ci5LsnodQVf4Uj6D3pwoscXGqmkjjpzvSJbx42swwNTA+QoDU8YLo7JhtbUK2X0qCjFGpd+8eJ5BGvk=', '管理员', 30, 1, '2019-09-07 18:56:07', NULL, NULL, 3, 1, NULL, '2019-09-07 18:56:21', NULL, NULL, b'0', NULL);
-- 表结构:t_user_event_log (用户事件日志表)
DROP TABLE IF EXISTS `t_user_event_log`;
CREATE TABLE `t_user_event_log` (
`id` int NOT NULL AUTO_INCREMENT COMMENT '事件日志ID',
`user_id` int NULL DEFAULT NULL COMMENT '用户ID',
`user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户名',
`real_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '真实姓名',
`content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '内容',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
-- 表结构:t_user_token (用户令牌表)
DROP TABLE IF EXISTS `t_user_token`;
CREATE TABLE `t_user_token` (
`id` int NOT NULL AUTO_INCREMENT COMMENT '令牌ID',
`token` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '令牌',
`user_id` int NULL DEFAULT NULL COMMENT '用户ID',
`wx_open_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '微信OpenID',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`end_time` datetime NULL DEFAULT NULL COMMENT '结束时间',
`user_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户名',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
-- 恢复外键检查
SET FOREIGN_KEY_CHECKS = 1;
SQL文件:
/*==============================================================*/
/* DBMS name: MySQL 5.0 */
/* Created on: 2023-09-11 12:47:42 */
/*==============================================================*/
drop table if exists t_exam_paper;
drop table if exists t_exam_paper_answer;
drop table if exists t_exam_paper_question_customer_answer;
drop table if exists t_message;
drop table if exists t_message_user;
drop table if exists t_question;
drop table if exists t_subject;
drop table if exists t_task_exam;
drop table if exists t_task_exam_customer_answer;
drop table if exists t_text_content;
drop table if exists t_user;
drop table if exists t_user_event_log;
drop table if exists t_user_token;
/*==============================================================*/
/* Table: t_exam_paper */
/*==============================================================*/
create table t_exam_paper
(
id int not null auto_increment comment '试卷ID',
name varchar(255),
subject_id int default NULL comment '学科ID',
paper_type int default NULL comment '试卷类型',
grade_level int default NULL comment '年级',
score int default NULL comment '总分',
question_count int default NULL comment '试题数量',
suggest_time int default NULL comment '建议完成时间',
limit_start_time datetime default NULL comment '限制开始时间',
limit_end_time datetime default NULL comment '限制结束时间',
frame_text_content_id int default NULL comment '正文内容ID',
create_user int default NULL comment '创建用户',
create_time datetime default NULL comment '创建时间',
deleted bit(1) default NULL comment '删除标志',
task_exam_id int default NULL comment '任务考试ID',
primary key (id)
)
ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
/*==============================================================*/
/* Table: t_exam_paper_answer */
/*==============================================================*/
create table t_exam_paper_answer
(
id int not null auto_increment comment '答案ID',
exam_paper_id int default NULL comment '试卷ID',
paper_name varchar(255),
paper_type int default NULL comment '试卷类型',
subject_id int default NULL comment '学科ID',
system_score int default NULL comment '系统得分',
user_score int default NULL comment '用户得分',
paper_score int default NULL comment '试卷得分',
question_correct int default NULL comment '正确题数',
question_count int default NULL comment '试题数量',
do_time int default NULL comment '完成时间',
status int default NULL comment '状态',
create_user int default NULL comment '创建用户',
create_time datetime default NULL comment '创建时间',
task_exam_id int default NULL comment '任务考试ID',
primary key (id)
)
ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
/*==============================================================*/
/* Table: t_exam_paper_question_customer_answer */
/*==============================================================*/
create table t_exam_paper_question_customer_answer
(
id int not null auto_increment comment '答案ID',
question_id int default NULL comment '试题ID',
exam_paper_id int default NULL comment '试卷ID',
exam_paper_answer_id int default NULL comment '试卷答案ID',
question_type int default NULL comment '试题类型',
subject_id int default NULL comment '学科ID',
customer_score int default NULL comment '客户得分',
question_score int default NULL comment '试题得分',
question_text_content_id int default NULL comment '试题文本内容ID',
answer varchar(255),
text_content_id int default NULL comment '文本内容ID',
do_right bit(1) default NULL comment '是否正确',
create_user int default NULL comment '创建用户',
create_time datetime default NULL comment '创建时间',
item_order int default NULL comment '项次',
primary key (id)
)
ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
/*==============================================================*/
/* Table: t_message */
/*==============================================================*/
create table t_message
(
id int not null auto_increment comment '消息ID',
title varchar(255),
content varchar(500),
create_time datetime default NULL comment '创建时间',
send_user_id int default NULL comment '发送用户ID',
send_user_name varchar(255),
send_real_name varchar(255),
receive_user_count int default NULL comment '接收用户数量',
read_count int default NULL comment '阅读数量',
primary key (id)
)
ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
/*==============================================================*/
/* Table: t_message_user */
/*==============================================================*/
create table t_message_user
(
id int not null auto_increment comment '关联ID',
message_id int default NULL comment '消息ID',
receive_user_id int default NULL comment '接收用户ID',
receive_user_name varchar(255),
receive_real_name varchar(255),
readed bit(1) default NULL comment '是否已阅读',
create_time datetime default NULL comment '创建时间',
read_time datetime default NULL comment '阅读时间',
primary key (id)
)
ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
/*==============================================================*/
/* Table: t_question */
/*==============================================================*/
create table t_question
(
id int not null auto_increment comment '试题ID',
question_type int default NULL comment '试题类型',
subject_id int default NULL comment '学科ID',
score int default NULL comment '分数',
grade_level int default NULL comment '年级',
difficult int default NULL comment '难度',
correct text,
info_text_content_id int default NULL comment '信息文本内容ID',
create_user int default NULL comment '创建用户',
status int default NULL comment '状态',
create_time datetime default NULL comment '创建时间',
deleted bit(1) default NULL comment '删除标志',
primary key (id)
)
ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
/*==============================================================*/
/* Table: t_subject */
/*==============================================================*/
create table t_subject
(
id int not null auto_increment comment '学科ID',
name varchar(255),
level int default NULL comment '级别',
level_name varchar(255),
item_order int default NULL comment '项次',
deleted bit(1) default NULL comment '删除标志',
primary key (id)
)
ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
/*==============================================================*/
/* Table: t_task_exam */
/*==============================================================*/
create table t_task_exam
(
id int not null auto_increment comment '任务考试ID',
title varchar(255),
grade_level int default NULL comment '年级',
frame_text_content_id int default NULL comment '框架文本内容ID',
create_user int default NULL comment '创建用户',
create_time datetime default NULL comment '创建时间',
deleted bit(1) default NULL comment '删除标志',
create_user_name varchar(255),
primary key (id)
)
ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
/*==============================================================*/
/* Table: t_task_exam_customer_answer */
/*==============================================================*/
create table t_task_exam_customer_answer
(
id int not null auto_increment comment '客户答案ID',
task_exam_id int default NULL comment '任务考试ID',
create_user int default NULL comment '创建用户',
create_time datetime default NULL comment '创建时间',
text_content_id int default NULL comment '文本内容ID',
primary key (id)
)
ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
/*==============================================================*/
/* Table: t_text_content */
/*==============================================================*/
create table t_text_content
(
id int not null auto_increment comment '文本内容ID',
content text,
create_time datetime default NULL comment '创建时间',
primary key (id)
)
ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
/*==============================================================*/
/* Table: t_user */
/*==============================================================*/
create table t_user
(
id int not null auto_increment comment '用户ID',
user_uuid varchar(36),
user_name varchar(255),
password varchar(255),
real_name varchar(255),
age int default NULL comment '年龄',
sex int default NULL comment '性别',
birth_day datetime default NULL comment '出生日期',
user_level int default NULL comment '用户级别',
phone varchar(255),
role int default NULL comment '角色',
status int default NULL comment '状态',
image_path varchar(255),
create_time datetime default NULL comment '创建时间',
modify_time datetime default NULL comment '修改时间',
last_active_time datetime default NULL comment '最后活动时间',
deleted bit(1) default NULL comment '删除标志',
wx_open_id varchar(255),
primary key (id)
)
ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
/*==============================================================*/
/* Table: t_user_event_log */
/*==============================================================*/
create table t_user_event_log
(
id int not null auto_increment comment '事件日志ID',
user_id int default NULL comment '用户ID',
user_name varchar(255),
real_name varchar(255),
content text,
create_time datetime default NULL comment '创建时间',
primary key (id)
)
ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;
/*==============================================================*/
/* Table: t_user_token */
/*==============================================================*/
create table t_user_token
(
id int not null auto_increment comment '令牌ID',
token varchar(36),
user_id int default NULL comment '用户ID',
wx_open_id varchar(255),
create_time datetime default NULL comment '创建时间',
end_time datetime default NULL comment '结束时间',
user_name varchar(255),
primary key (id)
)
ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT;