You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
78 lines
2.8 KiB
78 lines
2.8 KiB
drop database if exists test_repo;
|
|
|
|
create database test_repo;
|
|
|
|
use test_repo;
|
|
|
|
drop table if exists case_info;
|
|
|
|
create table case_info
|
|
(
|
|
ID tinyint auto_increment comment '主键'
|
|
primary key,
|
|
CASE_NAME varchar(100) charset utf8mb3 null comment '用例名称',
|
|
NODE_ID tinyint not null comment '用例树节点',
|
|
CREATOR varchar(32) charset utf8mb3 null comment '创建人',
|
|
CREATE_TIME datetime null comment '创建时间',
|
|
EDITOR varchar(32) charset utf8mb3 null comment '修改人',
|
|
UPDATE_TIME datetime null comment '修改时间'
|
|
)
|
|
comment '用例信息表';
|
|
|
|
drop table if exists case_tree;
|
|
|
|
create table case_tree
|
|
(
|
|
ID tinyint auto_increment comment '主键'
|
|
primary key,
|
|
NODE_NAME varchar(50) charset utf8mb3 null comment '树节点名称',
|
|
PARENT_NODE_ID tinyint null comment '父节点ID',
|
|
IS_LEAF tinyint default 0 not null comment '是否叶子节点(0-是)',
|
|
ID_PATH varchar(350) charset utf8mb3 null comment 'ID全路径',
|
|
CREATOR varchar(32) charset utf8mb3 null comment '创建人',
|
|
CREATE_TIME datetime null comment '创建时间',
|
|
EDITOR varchar(32) charset utf8mb3 null comment '修改人',
|
|
UPDATE_TIME datetime null comment '修改时间'
|
|
)
|
|
comment '用例树表';
|
|
|
|
drop table if exists role;
|
|
|
|
create table role
|
|
(
|
|
ID tinyint auto_increment comment '主键'
|
|
primary key,
|
|
ROLE_NAME varchar(50) charset utf8mb3 null comment '角色名称',
|
|
ROLE_CODE varchar(50) charset utf8mb3 null comment '角色代号(英文代号)',
|
|
CREATE_TIME datetime null comment '创建时间',
|
|
UPDATE_TIME datetime null comment '更新时间',
|
|
constraint ROLE_CODE
|
|
unique (ROLE_CODE)
|
|
)
|
|
comment '角色表';
|
|
|
|
drop table if exists user;
|
|
|
|
create table user
|
|
(
|
|
ID tinyint auto_increment comment '主键'
|
|
primary key,
|
|
LOGIN_NAME varchar(50) charset utf8mb3 null comment '用户登录名',
|
|
USER_CHN_NAME varchar(50) charset utf8mb3 null comment '用户中文名称',
|
|
CREATE_TIME datetime null comment '创建时间',
|
|
UPDATE_TIME datetime null comment '更新时间',
|
|
PASSWORD varchar(16) default '123456' not null comment '密码'
|
|
)
|
|
comment '用户信息表';
|
|
|
|
drop table if exists user_role_relation;
|
|
|
|
create table user_role_relation
|
|
(
|
|
ID tinyint auto_increment comment '主键'
|
|
primary key,
|
|
USER_ID tinyint null comment '用户ID',
|
|
ROLE_ID tinyint null comment '角色ID',
|
|
CREATE_TIME datetime null comment '创建时间'
|
|
)
|
|
comment '用户-角色关系表';
|