/*
 Navicat Premium Data Transfer

 Source Server Type    : MySQL
 Source Server Version : 80042
 Target Server Type    : MySQL
 Target Server Version : 80042
 File Encoding         : 65001

 Date: 2025-01-29
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for industry_tags
-- ----------------------------
DROP TABLE IF EXISTS `industry_tags`;

CREATE TABLE `industry_tags` (
    `id` VARCHAR(36) PRIMARY KEY COMMENT 'UUID主键',
    `industry` VARCHAR(100) NOT NULL COMMENT '所属行业',
    `tag_type` VARCHAR(100) NOT NULL COMMENT '标签分类',
    `tag_name` VARCHAR(100) NOT NULL COMMENT '标签名称',
    `tag_detail` VARCHAR(100) NOT NULL COMMENT '标签详情',
    `remark` VARCHAR(500) COMMENT '备注',
    `create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
    `update_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='行业标签表';

-- 添加索引以提高查询性能
ALTER TABLE `industry_tags` 
ADD INDEX `idx_industry`(`industry`) USING BTREE COMMENT '所属行业索引';

ALTER TABLE `industry_tags` 
ADD INDEX `idx_tag_type`(`tag_type`) USING BTREE COMMENT '标签分类索引';

ALTER TABLE `industry_tags` 
ADD INDEX `idx_industry_tag_type`(`industry`, `tag_type`) USING BTREE COMMENT '所属行业和标签分类联合索引';

SET FOREIGN_KEY_CHECKS = 1;

