Checkpoint: v3.0 - 新增训练视频教程库(分类浏览、自评系统)、训练提醒通知(多类型提醒、浏览器推送)、通知记录管理、去除冗余文字。65个测试全部通过。
这个提交包含在:
57
drizzle/0004_exotic_randall.sql
普通文件
57
drizzle/0004_exotic_randall.sql
普通文件
@@ -0,0 +1,57 @@
|
||||
CREATE TABLE `notification_log` (
|
||||
`id` int AUTO_INCREMENT NOT NULL,
|
||||
`userId` int NOT NULL,
|
||||
`reminderId` int,
|
||||
`notificationType` varchar(32) NOT NULL,
|
||||
`title` varchar(256) NOT NULL,
|
||||
`message` text,
|
||||
`isRead` int DEFAULT 0,
|
||||
`createdAt` timestamp NOT NULL DEFAULT (now()),
|
||||
CONSTRAINT `notification_log_id` PRIMARY KEY(`id`)
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE `training_reminders` (
|
||||
`id` int AUTO_INCREMENT NOT NULL,
|
||||
`userId` int NOT NULL,
|
||||
`reminderType` varchar(32) NOT NULL,
|
||||
`title` varchar(256) NOT NULL,
|
||||
`message` text,
|
||||
`timeOfDay` varchar(5) NOT NULL,
|
||||
`daysOfWeek` json NOT NULL,
|
||||
`isActive` int DEFAULT 1,
|
||||
`lastTriggered` timestamp,
|
||||
`createdAt` timestamp NOT NULL DEFAULT (now()),
|
||||
`updatedAt` timestamp NOT NULL DEFAULT (now()) ON UPDATE CURRENT_TIMESTAMP,
|
||||
CONSTRAINT `training_reminders_id` PRIMARY KEY(`id`)
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE `tutorial_progress` (
|
||||
`id` int AUTO_INCREMENT NOT NULL,
|
||||
`userId` int NOT NULL,
|
||||
`tutorialId` int NOT NULL,
|
||||
`watched` int DEFAULT 0,
|
||||
`comparisonVideoId` int,
|
||||
`selfScore` float,
|
||||
`notes` text,
|
||||
`createdAt` timestamp NOT NULL DEFAULT (now()),
|
||||
`updatedAt` timestamp NOT NULL DEFAULT (now()) ON UPDATE CURRENT_TIMESTAMP,
|
||||
CONSTRAINT `tutorial_progress_id` PRIMARY KEY(`id`)
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE `tutorial_videos` (
|
||||
`id` int AUTO_INCREMENT NOT NULL,
|
||||
`title` varchar(256) NOT NULL,
|
||||
`category` varchar(64) NOT NULL,
|
||||
`skillLevel` enum('beginner','intermediate','advanced') DEFAULT 'beginner',
|
||||
`description` text,
|
||||
`keyPoints` json,
|
||||
`commonMistakes` json,
|
||||
`videoUrl` text,
|
||||
`thumbnailUrl` text,
|
||||
`duration` int,
|
||||
`sortOrder` int DEFAULT 0,
|
||||
`isPublished` int DEFAULT 1,
|
||||
`createdAt` timestamp NOT NULL DEFAULT (now()),
|
||||
`updatedAt` timestamp NOT NULL DEFAULT (now()) ON UPDATE CURRENT_TIMESTAMP,
|
||||
CONSTRAINT `tutorial_videos_id` PRIMARY KEY(`id`)
|
||||
);
|
||||
在新工单中引用
屏蔽一个用户