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.
RuoYi-Vue/sql_refacor0120/t_industry_basic_updated.sql

16 lines
1.1 KiB

-- 行业基础数据表存储行业基础信息已删除parent_industry_code和description字段
CREATE TABLE `t_industry_basic` (
`industry_code` VARCHAR(20) NOT NULL COMMENT '行业代码如802089.EI',
`industry_name` VARCHAR(50) NOT NULL COMMENT '行业名称(如"银行"',
`industry_level` TINYINT NOT NULL DEFAULT 2 COMMENT '行业级别1=一级行业2=二级行业3=三级行业等)',
`status` TINYINT NOT NULL DEFAULT 1 COMMENT '状态1=正常0=禁用)',
`sort_order` INT NOT NULL DEFAULT 0 COMMENT '排序',
`create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
-- 主键:行业代码
PRIMARY KEY (`industry_code`),
-- 索引:按行业级别查询优化
INDEX `idx_t_industry_basic_level` (`industry_level`),
-- 索引:按状态查询优化
INDEX `idx_t_industry_basic_status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='行业基础数据表';