feat: add transcriptions collection

This commit is contained in:
gosangam
2026-05-06 12:21:07 +05:30
parent e6529ef62e
commit 9730ab0170
4 changed files with 179 additions and 0 deletions
+71
View File
@@ -324,3 +324,74 @@ model Disciple {
@@index([tags])
@@map("disciples")
}
// ---------------------------------------------------------------------------
// ContentBlock — embedded document for rich text content within transcriptions
//
// text: the actual text content (may contain inline HTML for bold/italic)
// format: formatting hint — "paragraph" | "heading" | "quote" | "verse" | "note"
// alignment: text alignment — "left" | "center" | "right" (default: left)
// speaker: who is speaking this block (for dialogues — e.g., "Prabhupāda", "Devotee")
// ---------------------------------------------------------------------------
type ContentBlock {
text String
format String @default("paragraph")
alignment String @default("left")
speaker String?
}
// ---------------------------------------------------------------------------
// Transcription — lectures and conversations of Śrīla Prabhupāda
//
// slug: URL-friendly unique identifier (e.g., "720911-lecture-los-angeles")
// name: display title (e.g., "Lecture on Bhagavad-gītā 2.13")
// type: "lecture" | "conversation"
// date: date of the transcription
// year: extracted year for filtering/grouping
// month: extracted month (1-12) for filtering
// day: extracted day for filtering
// place: location where it was delivered (e.g., "Los Angeles", "Vṛndāvana")
// context: additional context (e.g., "Morning Walk", "Room Conversation", "Arrival Address")
// reference: scripture reference if applicable (e.g., "BG 2.13", "SB 1.2.6")
// summary: brief description of the content (for OG images, search results)
// content: array of ContentBlock embedded documents (the actual transcription)
// tags: array of tags for categorization (e.g., ["science", "reincarnation", "guru"])
// participants: array of named participants (e.g., ["Prabhupāda", "Bob Cohen", "Śyāmasundara"])
// language: primary language of the transcription (default: "en")
// source: origin of the transcription (e.g., "Vedabase", "BBT Archives")
// durationMinutes: approximate duration in minutes (if known)
// isPublished: whether the transcription is ready for public display
// notes: internal editorial notes (not shown in UI)
// ---------------------------------------------------------------------------
model Transcription {
id String @id @default(auto()) @map("_id") @db.ObjectId
slug String @unique
name String
type String // "lecture" | "conversation"
date String? // date as written (e.g., "September 11, 1972")
year Int?
month Int?
day Int?
place String?
context String?
reference String?
summary String?
content ContentBlock[]
tags String[]
participants String[]
language String @default("en")
source String?
durationMinutes Int?
isPublished Boolean @default(false)
notes String?
@@index([type])
@@index([year])
@@index([year, month])
@@index([place])
@@index([tags])
@@index([reference])
@@index([participants])
@@index([isPublished])
@@map("transcriptions")
}