CREATE TABLE IF NOT EXISTS `la_article_ai_comment_task`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
  `article_id` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '文章ID',
  `virtual_user_id` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '虚拟用户ID',
  `comment_content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '评论内容',
  `run_at` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '计划执行时间',
  `status` tinyint UNSIGNED NOT NULL DEFAULT 0 COMMENT '状态 0-待执行 1-已执行 2-失败',
  `error_msg` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '错误信息',
  `create_time` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间',
  `update_time` int UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间',
  `delete_time` int UNSIGNED NULL DEFAULT NULL COMMENT '删除时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_article_status_runat`(`article_id` ASC, `status` ASC, `run_at` ASC) USING BTREE,
  INDEX `idx_virtual_user`(`virtual_user_id` ASC) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '文章AI评论任务队列表' ROW_FORMAT = Dynamic;

