/*
 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: 18/06/2025 16:31:33
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for FileUploads
-- ----------------------------
DROP TABLE IF EXISTS `FileUploads`;
CREATE TABLE `FileUploads`  (
  `Id` bigint(20) NOT NULL AUTO_INCREMENT,
  `UserId` bigint(20) NOT NULL,
  `FileName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `FileKey` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `FileSize` bigint(20) NOT NULL,
  `ContentType` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `Hash` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `QiniuUrl` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `UploadTime` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `Status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'active',
  `CreatedAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `DeleteTime` datetime NOT NULL COMMENT '删除时间',
  PRIMARY KEY (`Id`) USING BTREE,
  INDEX `IX_FileUploads_UserId`(`UserId` ASC) USING BTREE,
  INDEX `IX_FileUploads_FileKey`(`FileKey` ASC) USING BTREE,
  INDEX `IX_FileUploads_UploadTime`(`UploadTime` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;
