Files
sionrui/sql/mysql/benchmark_task_tables.sql
2026-03-15 15:36:29 +08:00

42 lines
1.7 KiB
SQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- 对标分析异步任务表
-- 执行前请确认数据库名称
CREATE TABLE IF NOT EXISTS `muye_benchmark_task` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户ID',
`user_id` bigint NOT NULL COMMENT '用户ID',
-- 任务信息
`task_name` varchar(200) NOT NULL COMMENT '任务名称',
`video_count` int NOT NULL DEFAULT 0 COMMENT '视频数量',
`video_urls` text COMMENT '视频URL列表(JSON)',
-- 执行状态
`status` tinyint NOT NULL DEFAULT 0 COMMENT '任务状态0-待处理 1-处理中 2-成功 3-失败',
`progress` int NOT NULL DEFAULT 0 COMMENT '进度(0-100)',
-- 执行结果
`merged_text` longtext COMMENT '合并后的转写文本',
`generated_prompt` longtext COMMENT '生成的提示词',
`prompt_id` bigint DEFAULT NULL COMMENT '保存后的提示词ID',
-- 错误信息
`error_msg` varchar(1000) DEFAULT NULL COMMENT '错误信息',
-- 时间戳
`start_time` datetime DEFAULT NULL COMMENT '开始时间',
`finish_time` datetime DEFAULT NULL COMMENT '完成时间',
`creator` varchar(64) DEFAULT '' COMMENT '创建者',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updater` varchar(64) DEFAULT '' COMMENT '更新者',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
PRIMARY KEY (`id`),
KEY `idx_user_id` (`user_id`),
KEY `idx_status` (`status`),
KEY `idx_create_time` (`create_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='对标分析异步任务表';
-- 同步到 DO 类的 @TableName