/**
Source Server Version: 8.0.31
Source Database: backendsys
Date: 2025/06/03 10:09:22
*/

DROP TABLE IF EXISTS `crt_drama_project`;
CREATE TABLE `crt_drama_project` (
    PRIMARY KEY (`id`),
    `id` BIGINT AUTO_INCREMENT COMMENT 'ID',
    `user_id` BIGINT NOT NULL COMMENT '用户ID (拥有者)',
    `project_name` VARCHAR(50) NOT NULL COMMENT '项目名称',
    `drama_lora_style_id` BIGINT COMMENT '风格LoRA ID',
    `drama_lora_character_ids` VARCHAR(10) COMMENT '人物LoRA ID (多个值使用逗号分隔)',
    `create_user_id` BIGINT NOT NULL COMMENT '用户ID (创建者)',
    `create_time` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
    `update_time` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
    INDEX `idx_user_id` (`user_id`),
    INDEX `idx_create_user_id` (`create_user_id`),
    INDEX `idx_drama_lora_style_id` (`drama_lora_style_id`)
) ENGINE=INNODB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='短剧创作-项目表';

INSERT INTO crt_drama_project(user_id, project_name, drama_lora_style_id, drama_lora_character_ids, create_user_id) VALUES
    (1, '测试项目', null, null, 1),
    (1, '我的仙狐娘娘', 1, '1,2', 1),
    (1, '数量测试项目3', null, null, 1),
    (1, '数量测试项目4', null, null, 1),
    (1, '数量测试项目5', null, null, 1),
    (1, '数量测试项目6', null, null, 1),
    (1, '数量测试项目7', null, null, 1),
    (1, '数量测试项目8', null, null, 1),
    (1, '数量测试项目9', null, null, 1),
    (1, '数量测试项目10', null, null, 1),
    (1, '数量测试项目11', null, null, 1),
    (1, '数量测试项目12', null, null, 1),
    (2, '数量测试项目12', null, null, 1)
;