/*
 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:48
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for MJApiTokens
-- ----------------------------
DROP TABLE IF EXISTS `MJApiTokens`;
CREATE TABLE `MJApiTokens`  (
  `Id` bigint(20) NOT NULL AUTO_INCREMENT,
  `Token` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'API令牌',
  `DailyLimit` int(11) NULL DEFAULT 0 COMMENT '日限制(0=无限制)',
  `TotalLimit` int(11) NULL DEFAULT 0 COMMENT '总限制(0=无限制)',
  `ConcurrencyLimit` int(11) NOT NULL DEFAULT 1 COMMENT '并发限制',
  `CreatedAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `ExpiresAt` datetime NULL DEFAULT NULL COMMENT '到期时间(NULL=永不过期)',
  PRIMARY KEY (`Id`) USING BTREE,
  UNIQUE INDEX `UkToken`(`Token` ASC) USING BTREE,
  INDEX `IdxExpires`(`ExpiresAt` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'API令牌表' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;
