46 lines
1.4 KiB
Plaintext
46 lines
1.4 KiB
Plaintext
generator client {
|
|
provider = "prisma-client-js"
|
|
}
|
|
|
|
datasource db {
|
|
provider = "sqlite"
|
|
url = "file:./dev.db"
|
|
}
|
|
|
|
model Episode {
|
|
id String @id @default(cuid())
|
|
title String
|
|
originalContent String
|
|
contentHash String? // SHA-256 for deduplication
|
|
scriptContent String?
|
|
mode String @default("VERBATIM") // VERBATIM | FEYNMAN | DUAL_HOST
|
|
targetLanguage String @default("auto") // auto | zh | en
|
|
status String @default("QUEUED") // QUEUED | PROCESSING | READY | FAILED
|
|
retryCount Int @default(0)
|
|
maxRetries Int @default(3)
|
|
nextAttemptAt DateTime?
|
|
errorMessage String?
|
|
durationSeconds Float?
|
|
audioUrl String?
|
|
timingsJson String? // Serialized array of cues / timestamps [{text, startTime, endTime, speaker}]
|
|
|
|
stages StageItem[]
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
@@index([contentHash])
|
|
}
|
|
|
|
model StageItem {
|
|
id String @id @default(cuid())
|
|
episodeId String
|
|
timestampSeconds Float
|
|
type String // IMAGE | CODE | CALLOUT
|
|
title String?
|
|
content String // Image URL, Code snippet, or Callout text
|
|
caption String?
|
|
|
|
episode Episode @relation(fields: [episodeId], references: [id], onDelete: Cascade)
|
|
createdAt DateTime @default(now())
|
|
}
|