INSERT INTO `nx_llm`.`com_dictionary` (`id`, `name`, `code`, `pid`, `type`, `status`, `note`, `priority`, `creator`,
                                       `update_time`, `create_time`, `updater`, `data_status`, `create_user_id`,
                                       `update_user_id`)
VALUES (89, '任务状态', NULL, 0, 'task_status', '1', NULL, 0, NULL, NULL, CURRENT_TIMESTAMP, NULL, '1', NULL, NULL);
INSERT INTO `nx_llm`.`com_dictionary` (`id`, `name`, `code`, `pid`, `type`, `status`, `note`, `priority`, `creator`,
                                       `update_time`, `create_time`, `updater`, `data_status`, `create_user_id`,
                                       `update_user_id`)
VALUES (90, '待处理', '0', 89, 'task_status', '1', NULL, 0, NULL, NULL, CURRENT_TIMESTAMP, NULL, '1', NULL, NULL);
INSERT INTO `nx_llm`.`com_dictionary` (`id`, `name`, `code`, `pid`, `type`, `status`, `note`, `priority`, `creator`,
                                       `update_time`, `create_time`, `updater`, `data_status`, `create_user_id`,
                                       `update_user_id`)
VALUES (91, '处理中', '1', 89, 'task_status', '1', NULL, 0, NULL, NULL, CURRENT_TIMESTAMP, NULL, '1', NULL, NULL);
INSERT INTO `nx_llm`.`com_dictionary` (`id`, `name`, `code`, `pid`, `type`, `status`, `note`, `priority`, `creator`,
                                       `update_time`, `create_time`, `updater`, `data_status`, `create_user_id`,
                                       `update_user_id`)
VALUES (92, '取消中', '2', 89, 'task_status', '1', NULL, 0, NULL, NULL, CURRENT_TIMESTAMP, NULL, '1', NULL, NULL);
INSERT INTO `nx_llm`.`com_dictionary` (`id`, `name`, `code`, `pid`, `type`, `status`, `note`, `priority`, `creator`,
                                       `update_time`, `create_time`, `updater`, `data_status`, `create_user_id`,
                                       `update_user_id`)
VALUES (93, '已取消', '3', 89, 'task_status', '1', NULL, 0, NULL, NULL, CURRENT_TIMESTAMP, NULL, '1', NULL, NULL);
INSERT INTO `nx_llm`.`com_dictionary` (`id`, `name`, `code`, `pid`, `type`, `status`, `note`, `priority`, `creator`,
                                       `update_time`, `create_time`, `updater`, `data_status`, `create_user_id`,
                                       `update_user_id`)
VALUES (94, '处理成功', '4', 89, 'task_status', '1', NULL, 0, NULL, NULL, CURRENT_TIMESTAMP, NULL, '1', NULL, NULL);
INSERT INTO `nx_llm`.`com_dictionary` (`id`, `name`, `code`, `pid`, `type`, `status`, `note`, `priority`, `creator`,
                                       `update_time`, `create_time`, `updater`, `data_status`, `create_user_id`,
                                       `update_user_id`)
VALUES (95, '处理失败', '5', 89, 'task_status', '1', NULL, 0, NULL, NULL, CURRENT_TIMESTAMP, NULL, '1', NULL, NULL);

CREATE TABLE `task_record`
(
    `id`             varchar(64) NOT NULL,
    `name`           varchar(255) DEFAULT NULL COMMENT '名称',
    `prompt_id`      varchar(64)  DEFAULT NULL,
    `case_id`        text COMMENT '案件ID,英文逗号分隔',
    `record_id`      text COMMENT '笔录ID,英文逗号分隔',
    `evidence_id`    text COMMENT '证据ID,英文逗号分隔',
    `type`           varchar(1)   DEFAULT NULL COMMENT '0:全部案件 1:部分案件 2:部分笔录 3:部分证据',
    `status`         varchar(1)   DEFAULT '0' COMMENT '0:待处理 1:处理中 2:取消中 3:已取消 4:处理成功 5:处理失败',
    `cancel_time`    datetime     DEFAULT NULL COMMENT '取消时间',
    `create_user_id` varchar(64)  DEFAULT NULL COMMENT '创建人ID',
    `create_time`    datetime     DEFAULT NULL COMMENT '创建时间',
    `update_user_id` varchar(64)  DEFAULT NULL COMMENT '更新人ID',
    `update_time`    datetime     DEFAULT NULL COMMENT '更新时间',
    PRIMARY KEY (`id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4;

CREATE TABLE `task_case_record`
(
    `id`             varchar(64) NOT NULL,
    `task_record_id` varchar(64) DEFAULT NULL COMMENT '任务ID',
    `case_id`        varchar(64) DEFAULT NULL COMMENT '案件ID',
    `waiting_id`     text COMMENT '等待处理的ID,逗号分隔',
    `processed_id`   text COMMENT '处理完成的ID,逗号分隔',
    `exception_id`   text COMMENT '异常ID,逗号分隔',
    `status`         varchar(1)  DEFAULT NULL COMMENT '0:待处理 1:处理中 2:取消中 3:已取消 4:处理成功 5:处理失败',
    `create_user_id` varchar(64) DEFAULT NULL COMMENT '创建人ID',
    `create_time`    datetime    DEFAULT NULL COMMENT '创建时间',
    `update_user_id` varchar(64) DEFAULT NULL COMMENT '更新人ID',
    `update_time`    datetime    DEFAULT NULL COMMENT '更新时间',
    PRIMARY KEY (`id`)
) ENGINE = InnoDB
  DEFAULT CHARSET = utf8mb4;