mirror of
https://github.com/nicetry247/offlineacademy.git
synced 2026-08-19 23:17:25 +00:00
feat: add multilingual subtitle tracks
This commit is contained in:
@@ -71,6 +71,7 @@ model Lesson {
|
||||
|
||||
progress Progress[]
|
||||
bookmarks Bookmark[]
|
||||
subtitles SubtitleTrack[]
|
||||
quiz Quiz?
|
||||
quizAttempts QuizAttempt[]
|
||||
|
||||
@@ -79,6 +80,22 @@ model Lesson {
|
||||
@@index([filePath])
|
||||
}
|
||||
|
||||
model SubtitleTrack {
|
||||
id String @id @default(cuid())
|
||||
lessonId String
|
||||
lesson Lesson @relation(fields: [lessonId], references: [id], onDelete: Cascade)
|
||||
src String
|
||||
lang String
|
||||
label String
|
||||
format String
|
||||
isDefault Boolean @default(false)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
@@unique([lessonId, lang, src])
|
||||
@@index([lessonId])
|
||||
}
|
||||
|
||||
model Progress {
|
||||
id String @id @default(cuid())
|
||||
userId String @default("local-user")
|
||||
|
||||
Reference in New Issue
Block a user