/**
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 NOT NULL AUTO_INCREMENT COMMENT 'ID',
    `user_id` BIGINT NOT NULL COMMENT '用户ID',
    `project_name` VARCHAR(50) NOT NULL COMMENT '项目名称',
    `crt_drama_lora_style_id` BIGINT COMMENT '风格LoRA ID',
    `crt_drama_lora_character_ids` VARCHAR(10) COMMENT '人物LoRA 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_crt_drama_lora_style_id` (`crt_drama_lora_style_id`)
) ENGINE=INNODB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='短剧创作-项目表';

INSERT INTO crt_drama_project(user_id, project_name, crt_drama_lora_style_id, crt_drama_lora_character_ids) VALUES
    (1, '测试项目', null, null),
    (1, '我的仙狐娘娘', 1, '1,2')
;