/**
Source Server Version: 8.0.31
Source Database: backendsys
Date: 2024/03/12 14:32:14
*/

DROP TABLE IF EXISTS `ali_dashscope_task`;
CREATE TABLE `ali_dashscope_task` (
   PRIMARY KEY (`id`),
   `id` BIGINT AUTO_INCREMENT COMMENT 'ID',
   `user_id` BIGINT NOT NULL COMMENT '用户ID',
   `request_id` VARCHAR(255) NOT NULL,

   `task_id` VARCHAR(255) NOT NULL COMMENT '任务ID',
   `task_status` VARCHAR(255) NOT NULL COMMENT '任务状态 (PENDING, RUNNING, SUCCEEDED, FAILED)',

   `thumb` VARCHAR(500) COMMENT '缩略图 (主图)',

   `submit_time` VARCHAR(255) COMMENT '提交时间',
   `scheduled_time` VARCHAR(255) COMMENT '计划时间',
   `end_time` VARCHAR(255) COMMENT '结束时间',

   `task_metrics_total` BIGINT(5) DEFAULT '0' COMMENT '任务指标-总计',
   `task_metrics_succeeded` BIGINT(5) DEFAULT '0' COMMENT '任务指标-成功的',
   `task_metrics_failed` BIGINT(5) DEFAULT '0' COMMENT '任务指标-失败的',

   `create_time` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
   `update_time` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
   INDEX `idx_task_id` (`task_id`)
) ENGINE=INNODB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='阿里云-通义万相-图像背景生成-任务列表';

INSERT INTO ali_dashscope_task(user_id, request_id, task_id, task_status, thumb, submit_time, scheduled_time, end_time, task_metrics_total, task_metrics_succeeded, task_metrics_failed) VALUES
    (1, '9abee97f-066a-94b9-94cc-779bc3a3f62c', '9955cf7e-dce1-4bf6-9cc6-40c5e8ab2470', 'SUCCEEDED', 'http://dev.api.daoguyujia.com/uploads/generator-materials/p-1.png','2024-03-12 11:32:34.679', '2024-03-12 11:32:34.707', '2024-03-12 11:32:40.255', 1, 1, 0),
    (1, '317287b7-89a5-9159-82a8-ab2089f2f1f7', 'e35acfdb-1357-4766-9afc-961ecf5ee463', 'PENDING', 'http://dev.api.daoguyujia.com/uploads/generator-materials/p-1.png', null, null, null, null, null, null)
;
