feat: letters added

This commit is contained in:
gosangam
2026-05-04 00:08:31 +05:30
parent 35d1d14f37
commit 401766928a
20 changed files with 4272 additions and 26 deletions
+78
View File
@@ -198,9 +198,87 @@ model JournalChapter {
@@map("journal_chapters")
}
// ---------------------------------------------------------------------------
// MagazineMeta — metadata for magazines (Back to Godhead, etc.)
//
// book: slug identifier (e.g. "btg")
// data: JSON blob containing title, author, description, volumes/issues list
// ---------------------------------------------------------------------------
model MagazineMeta {
id String @id @default(auto()) @map("_id") @db.ObjectId
book String @unique
data Json
@@map("magazine_meta")
}
// ---------------------------------------------------------------------------
// MagazineIssue — individual issues within a magazine
//
// book: slug identifier matching MagazineMeta.book
// volume: volume number
// part: part/issue number within the volume
// title: display title (e.g. "Volume 3, Part 5, May 5, 1956")
// slug: URL-friendly identifier (e.g. "v3-p5")
// order: sort order
// paragraphs: array of HTML paragraph strings (all articles concatenated)
// ---------------------------------------------------------------------------
model MagazineIssue {
id String @id @default(auto()) @map("_id") @db.ObjectId
book String
volume Int
part Int
title String
slug String
order Int
paragraphs String[]
paragraphsJson String?
@@unique([book, slug])
@@index([book])
@@index([book, volume])
@@map("magazine_issues")
}
// ---------------------------------------------------------------------------
// GlossaryEntry — individual glossary term + definition
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
// Letter — individual letters written by Śrīla Prabhupāda
//
// slug: unique identifier (e.g. "47-07-12-mahatma-gandhi", "68-01-15-hayagriva")
// recipients: array of individual recipient names (split from comma-separated)
// recipientDisplay: original recipient string for display (e.g. "Mukunda, Janaki")
// date: date string as written (e.g. "12 July, 1947")
// dateRef: reference code (e.g. "47-07-12")
// year: extracted year number for filtering/grouping
// month: extracted month number (1-12) for filtering
// day: extracted day number for filtering
// location: city/place where the letter was written
// salutation: the "Dear..." line
// paragraphs: array of HTML paragraph strings (letter body)
// ---------------------------------------------------------------------------
model Letter {
id String @id @default(auto()) @map("_id") @db.ObjectId
slug String @unique
recipients String[]
recipientDisplay String
date String?
dateRef String?
year Int?
month Int?
day Int?
location String?
salutation String?
paragraphs String[]
@@index([year])
@@index([recipients])
@@index([location])
@@index([year, month])
@@map("letters")
}
model GlossaryEntry {
id String @id @default(auto()) @map("_id") @db.ObjectId
term String