优化页面、修复BUG

This commit is contained in:
李琦
2026-07-04 17:58:19 +08:00
parent e4baa4b585
commit 88c447fe18
34 changed files with 5884 additions and 13 deletions

View File

@@ -540,6 +540,8 @@ CREATE TABLE `works` (
`category` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '作品分类',
`year` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '创作年份',
`hero_img` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '作品主图URL',
`hero_video` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '演示视频URL',
`video_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '关联视频库ID',
`description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '作品详细描述',
`links` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT '作品链接(JSON格式)',
`is_featured` tinyint(1) NULL DEFAULT 0 COMMENT '是否为精选作品(0:否,1:是)',
@@ -566,4 +568,74 @@ CREATE TABLE `post_snippets` (
INDEX `idx_sort_order`(`sort_order` ASC) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '文章代码片段关联表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Table structure for video_categories
-- ----------------------------
DROP TABLE IF EXISTS `video_categories`;
CREATE TABLE `video_categories` (
`id` int UNSIGNED NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL,
`slug` varchar(100) NOT NULL,
`description` text NULL,
`sort_order` int UNSIGNED NOT NULL DEFAULT 0,
`deleted_at` bigint NOT NULL DEFAULT 0,
`created_at` bigint NOT NULL DEFAULT 0,
`updated_at` bigint NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE INDEX `idx_slug`(`slug`)
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '视频分类表';
-- ----------------------------
-- Table structure for video_albums
-- ----------------------------
DROP TABLE IF EXISTS `video_albums`;
CREATE TABLE `video_albums` (
`id` int UNSIGNED NOT NULL AUTO_INCREMENT,
`name` varchar(200) NOT NULL,
`description` text NULL,
`cover` varchar(500) NULL,
`category_id` int UNSIGNED NOT NULL DEFAULT 0,
`is_active` tinyint(1) NOT NULL DEFAULT 1,
`sort_order` int UNSIGNED NOT NULL DEFAULT 0,
`deleted_at` bigint NOT NULL DEFAULT 0,
`created_at` bigint NOT NULL DEFAULT 0,
`updated_at` bigint NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
INDEX `idx_category_id`(`category_id`)
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '视频专辑表';
-- ----------------------------
-- Table structure for videos
-- ----------------------------
DROP TABLE IF EXISTS `videos`;
CREATE TABLE `videos` (
`id` varchar(50) NOT NULL,
`title` varchar(200) NOT NULL,
`description` text NULL,
`video_url` varchar(500) NOT NULL,
`cover` varchar(500) NULL,
`poster` varchar(500) NULL,
`category_id` int UNSIGNED NOT NULL DEFAULT 0,
`duration` int NOT NULL DEFAULT 0,
`is_published` tinyint(1) NOT NULL DEFAULT 1,
`deleted_at` bigint NOT NULL DEFAULT 0,
`created_at` bigint NOT NULL DEFAULT 0,
`updated_at` bigint NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
INDEX `idx_category_id`(`category_id`)
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '视频表';
-- ----------------------------
-- Table structure for album_videos
-- ----------------------------
DROP TABLE IF EXISTS `album_videos`;
CREATE TABLE `album_videos` (
`album_id` int UNSIGNED NOT NULL,
`video_id` varchar(50) NOT NULL,
`sort_order` int UNSIGNED NOT NULL DEFAULT 0,
`created_at` bigint NOT NULL DEFAULT 0,
PRIMARY KEY (`album_id`, `video_id`),
INDEX `idx_video_id`(`video_id`)
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '专辑视频关联表';
SET FOREIGN_KEY_CHECKS = 1;