/*
 Navicat Premium Dump SQL

 Source Server         : 亿速云（国内）
 Source Server Type    : MySQL
 Source Server Version : 80018 (8.0.18)
 Source Host           : yisurds-66dc0b453c05d4.rds.ysydb1.com:14080
 Source Schema         : LMS_TEST

 Target Server Type    : MySQL
 Target Server Version : 80018 (8.0.18)
 File Encoding         : 65001

 Date: 11/06/2025 13:55:05
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for MJApiTasks
-- ----------------------------
DROP TABLE IF EXISTS `MJApiTasks`;
CREATE TABLE `MJApiTasks`  (
  `TaskId` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `Token` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `StartTime` datetime NOT NULL,
  `EndTime` datetime NULL DEFAULT NULL,
  `Status` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '0' COMMENT '0=Pending, 1=NotStart, 2=Running, 3=Completed, 4=Failed, 5=Timeout',
  `ThirdPartyTaskId` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `Properties` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL,
  `CreatedAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `UpdatedAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`TaskId`) USING BTREE,
  INDEX `idx_token`(`Token` ASC) USING BTREE,
  INDEX `idx_third_party_task_id`(`ThirdPartyTaskId` ASC) USING BTREE,
  INDEX `idx_status`(`Status` ASC) USING BTREE,
  INDEX `idx_start_time`(`StartTime` ASC) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '异步任务表' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;
