/*
 Navicat Premium Dump SQL

 Source Server         : 蓉易创
 Source Server Type    : MySQL
 Source Server Version : 80405 (8.4.5)
 Source Host           : 139.155.104.10:3306
 Source Schema         : ryc

 Target Server Type    : MySQL
 Target Server Version : 80405 (8.4.5)
 File Encoding         : 65001

 Date: 30/09/2025 09:55:45
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for t_media
-- ----------------------------
DROP TABLE IF EXISTS `t_media`;
CREATE TABLE `t_media`  (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `target_type` int NOT NULL,
  `target_id` bigint NOT NULL,
  `media_type` int NOT NULL,
  `path` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '腾讯云的存储桶地址',
  `thumb_path` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `file_ext` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `file_size` int NOT NULL,
  `duration` int NULL DEFAULT NULL COMMENT '视频的长度秒',
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `state` int NOT NULL DEFAULT 1,
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `create_user_id` bigint NULL DEFAULT NULL,
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `update_user_id` bigint NULL DEFAULT NULL,
  `version` bigint NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `uq_type_id`(`target_type` ASC, `target_id` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 119 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of t_media
-- ----------------------------
INSERT INTO `t_media` VALUES (112, 'judge_avatar.jpg', 1, 65, 1, 'avatars/judge_avatar_1759142940287.jpg', NULL, 'jpg', 1024, NULL, NULL, 1, '2025-09-29 18:48:59', NULL, '2025-09-29 18:48:59', NULL, 0);
INSERT INTO `t_media` VALUES (113, 'logo.jpg', 1, 66, 1, '20250929/b5840d47-b046-4461-9d78-27881c917f03.jpg', NULL, 'jpg', 67671, NULL, NULL, 1, '2025-09-29 18:49:02', NULL, '2025-09-29 18:49:02', NULL, 0);
INSERT INTO `t_media` VALUES (114, 'a1.png', 2, 73, 1, '20250929/bc8be85a-c0d9-4d75-885e-cb19d613e00f.png', NULL, 'png', 3628657, NULL, NULL, 1, '2025-09-29 19:16:11', NULL, '2025-09-29 19:16:11', NULL, 0);
INSERT INTO `t_media` VALUES (115, 'bug1.png', 2, 73, 1, '20250929/23aee0a8-dc1e-4ec5-b4a6-2b80370940cb.png', NULL, 'png', 84959, NULL, NULL, 1, '2025-09-29 19:16:11', NULL, '2025-09-29 19:16:11', NULL, 0);
INSERT INTO `t_media` VALUES (116, 'mg5v05lk-vchro9dh-dn24k81r-ibqm.jpg', 7, 2, 1, 'avatars/20250930/mg5v05lk-vchro9dh-dn24k81r-ibqm.jpg', NULL, 'jpg', 3624223, NULL, NULL, 1, '2025-09-30 09:08:55', NULL, '2025-09-30 09:08:55', NULL, 0);
INSERT INTO `t_media` VALUES (117, 'mg5v06il-rei95zgu-f9okwt82-iruh.png', 5, 51, 1, 'attachments/20250930/mg5v06il-rei95zgu-f9okwt82-iruh.png', NULL, 'png', 93686, NULL, NULL, 1, '2025-09-30 09:08:55', NULL, '2025-09-30 09:08:55', NULL, 0);
INSERT INTO `t_media` VALUES (118, 'test-avatar.jpg', 7, 1, 1, 'avatars/test-avatar.jpg', NULL, 'jpg', 50000, NULL, NULL, 1, '2025-09-30 09:32:13', NULL, '2025-09-30 09:32:13', NULL, 0);

SET FOREIGN_KEY_CHECKS = 1;
