parent
c411b5facf
commit
1b6b490502
@ -0,0 +1,17 @@
|
||||
-- 创建DB
|
||||
create database if not exists `indie_tag` default charset utf8mb4 collate utf8mb4_general_ci;
|
||||
use indie_tag;
|
||||
-- 创建表
|
||||
drop table if exists indie_tag.tb_tag;
|
||||
create table indie_tag.tb_tag (
|
||||
id bigint unsigned not null primary key auto_increment comment '主键',
|
||||
parent bigint unsigned not null default 0 comment '父类主键(0表示一级标签)',
|
||||
name_ch varchar(100) not null default '' comment '标签中文名称',
|
||||
name_en varchar(100) not null default '' comment '标签英文名称',
|
||||
status tinyint not null default 1 comment '状态(0=禁用,1=启用)',
|
||||
creator_id int default 0 comment '创建人用户ID',
|
||||
create_time datetime default current_timestamp comment '创建时间',
|
||||
update_time datetime default current_timestamp on update current_timestamp comment '更新时间',
|
||||
key idx_update_time(update_time),
|
||||
key idx_parent(parent)
|
||||
) character set utf8mb4 comment '标签表';
|
Loading…
Reference in new issue