/*
 Navicat Premium Data Transfer

 Source Server         : hisScrm
 Source Server Type    : MySQL
 Source Server Version : 80025
 Source Host           : 139.186.77.83:3306
 Source Schema         : ylrz_his_scrm

 Target Server Type    : MySQL
 Target Server Version : 80025
 File Encoding         : 65001

 Date: 14/05/2026 16:48:25
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for company_ai_sensitive_word
-- ----------------------------
DROP TABLE IF EXISTS `company_ai_sensitive_word`;
CREATE TABLE `company_ai_sensitive_word`  (
                                              `word_id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
                                              `company_id` bigint NULL DEFAULT NULL COMMENT '公司ID',
                                              `word` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '敏感词',
                                              `enabled` tinyint NULL DEFAULT 1 COMMENT '是否启用 0/1',
                                              `source` tinyint NULL DEFAULT 1 COMMENT '来源 1=手工 2=批量 3=内置',
                                              `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
                                              `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
                                              `create_time` datetime NULL DEFAULT CURRENT_TIMESTAMP,
                                              `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
                                              `update_time` datetime NULL DEFAULT NULL,
                                              `del_flag` tinyint NULL DEFAULT 0,
                                              PRIMARY KEY (`word_id`) USING BTREE,
                                              UNIQUE INDEX `uk_word_company`(`word` ASC, `company_id` ASC, `del_flag` ASC) USING BTREE,
                                              INDEX `idx_company_id`(`company_id` ASC) USING BTREE,
                                              INDEX `idx_enabled`(`enabled` ASC) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '敏感词库' ROW_FORMAT = DYNAMIC;

SET FOREIGN_KEY_CHECKS = 1;
