/**
Source Server Version: 8.0.31
Source Database: backendsys
Date: 2024/04/27 10:12:01
*/

DROP TABLE IF EXISTS `ai_zn_image_task`;
CREATE TABLE `ai_zn_image_task` (
    PRIMARY KEY (`id`),
    `id` BIGINT AUTO_INCREMENT COMMENT 'ID',
    `user_id` BIGINT NOT NULL COMMENT '用户ID',
    `task_type` VARCHAR(255) COMMENT '任务类型 (INTELLIGENT_CLIP:智能抠图, MODEL:AI换模特, GOOD_COMPOUND:商品合成, GOOD_REPLACE:商品替换)',
    `task_id` VARCHAR(255) NOT NULL COMMENT '任务ID',
    `image_url` VARCHAR(255) NOT NULL COMMENT '原图',
    `result_image_url` TEXT COMMENT '生成结果图 (存储桶)(多个以逗号间隔)',
    `task_submit_json` TEXT NOT NULL COMMENT '任务提交回调信息 (JSONString)',
    `task_result_json` TEXT COMMENT '任务查询回调信息 (JSONString)',
    `status` INT DEFAULT '1' NOT NULL COMMENT '任务状态 (1.CREATE 2.MAKING 3.SUCCESS 4.FAIL 5.EXPIRE)',
    `create_time` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
    `update_time` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间'
) ENGINE=INNODB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='AI紫鸟-图片任务表';
