feat: add journals

This commit is contained in:
gosangam
2026-05-03 21:02:41 +05:30
parent 89106efc98
commit 35d1d14f37
47 changed files with 11365 additions and 37 deletions
+80
View File
@@ -118,6 +118,86 @@ model Essay {
@@map("essays")
}
// ---------------------------------------------------------------------------
// OtherDocumentMeta — metadata for miscellaneous documents
//
// book: slug identifier (e.g. "analysis-bg", "real-peace-formula")
// data: JSON blob containing title, author, year, description, chapters list
// ---------------------------------------------------------------------------
model OtherDocumentMeta {
id String @id @default(auto()) @map("_id") @db.ObjectId
book String @unique
data Json
@@map("other_document_meta")
}
// ---------------------------------------------------------------------------
// OtherDocumentChapter — chapters within other documents
//
// book: slug identifier matching OtherDocumentMeta.book
// chapter: chapter number
// title: chapter title
// type: "chapter"
// slug: URL-friendly identifier (chapter number as string)
// order: sort order
// paragraphs: array of HTML paragraph strings
// ---------------------------------------------------------------------------
model OtherDocumentChapter {
id String @id @default(auto()) @map("_id") @db.ObjectId
book String
chapter Int
title String
type String
slug String
order Int
paragraphs String[]
@@unique([book, slug])
@@index([book])
@@map("other_document_chapters")
}
// ---------------------------------------------------------------------------
// JournalMeta — metadata for journals (Jaladuta Diary, The Beginning, etc.)
//
// book: slug identifier (e.g. "jaladuta-diary", "the-beginning")
// data: JSON blob containing title, author, year, description, chapters list
// ---------------------------------------------------------------------------
model JournalMeta {
id String @id @default(auto()) @map("_id") @db.ObjectId
book String @unique
data Json
@@map("journal_meta")
}
// ---------------------------------------------------------------------------
// JournalChapter — chapters within journals
//
// book: slug identifier matching JournalMeta.book
// chapter: chapter number
// title: chapter title
// type: "chapter" | "preface" | "introduction"
// slug: URL-friendly identifier (chapter number as string)
// order: sort order
// paragraphs: array of HTML paragraph strings
// ---------------------------------------------------------------------------
model JournalChapter {
id String @id @default(auto()) @map("_id") @db.ObjectId
book String
chapter Int
title String
type String
slug String
order Int
paragraphs String[]
@@unique([book, slug])
@@index([book])
@@map("journal_chapters")
}
// ---------------------------------------------------------------------------
// GlossaryEntry — individual glossary term + definition
// ---------------------------------------------------------------------------