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

DROP TABLE IF EXISTS `crt_generate_image`;
CREATE TABLE `crt_generate_image` (
    PRIMARY KEY (`id`),
    `id` BIGINT AUTO_INCREMENT COMMENT 'ID',
    `user_id` BIGINT COMMENT '用户ID',
    `drama_project_storyboard_id` BIGINT COMMENT '分镜ID',
    `prompt_id` VARCHAR(255) COMMENT '任务ID',
    `url_origin` VARCHAR(2000) NOT NULL COMMENT '原图',
    `url` VARCHAR(2000) COMMENT '转存图',
    `object_key` VARCHAR(500) COMMENT 'ObjectKey',
    `target` INT COMMENT '上传目标 (-1:本地, 1:腾讯云, 2:阿里云, 3.抖音云)',
    `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_prompt_id` (`prompt_id`),
    INDEX `idx_drama_project_storyboard_id` (`drama_project_storyboard_id`)
) ENGINE=INNODB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='短剧创作-生成图片记录表';
