feat: add journals
This commit is contained in:
@@ -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
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user