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.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
-- 行业基础数据表: 存储行业基础信息( 已删除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 = ' 行业基础数据表 ' ;