123456789101112131415161718192021222324 |
- DROP TABLE IF EXISTS dict_data ;
- CREATE TABLE dict_data (
- id BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT '序号',
- dict_type VARCHAR(100) NOT NULL COMMENT '字典类型',
- dict_label VARCHAR(100) NOT NULL COMMENT '字典标签',
- dict_value VARCHAR(100) NOT NULL COMMENT '字典键值',
- status TINYINT(1) NOT NULL COMMENT '状态',
- is_default CHAR(1) NOT NULL COMMENT '是否默认',
- sort INT(4) NOT NULL COMMENT '排序',
- remark VARCHAR(200) COMMENT '备注',
- created_by BIGINT(10) NOT NULL COMMENT '创建者',
- updated_by BIGINT(10) NOT NULL COMMENT '更新者',
- deleted_by BIGINT(10) NOT NULL COMMENT '删除者',
- created_at DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- updated_at DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- deleted_at DATETIME COMMENT '删除时间',
- deleted_flag BIT(1) DEFAULT 0 COMMENT '是否删除',
- PRIMARY KEY ( id ),
- INDEX idx_dict_type ( dict_type ),
- INDEX idx_dict_label ( dict_label ),
- INDEX idx_dict_value ( dict_value ),
- INDEX idx_status ( status ),
- INDEX idx_deleted_flag ( deleted_flag )
- ) COMMENT='字典数据表';
|