117 lines
4.4 KiB
Go
117 lines
4.4 KiB
Go
package model
|
|
|
|
import "time"
|
|
|
|
// Book represents a book's metadata from MongoDB.
|
|
type Book struct {
|
|
ID string `json:"id"`
|
|
Book string `json:"book"`
|
|
Data map[string]interface{} `json:"data"`
|
|
}
|
|
|
|
// Verse represents a single verse from MongoDB.
|
|
type Verse struct {
|
|
ID string `json:"id"`
|
|
Book string `json:"book"`
|
|
Division *string `json:"division,omitempty"`
|
|
Chapter int `json:"chapter"`
|
|
Verse int `json:"verse"`
|
|
VerseEnd *int `json:"verse_end,omitempty"`
|
|
Reference string `json:"reference"`
|
|
BookTitle string `json:"book_title"`
|
|
Devanagari string `json:"devanagari"`
|
|
Bengali *string `json:"bengali,omitempty"`
|
|
Transliteration string `json:"transliteration"`
|
|
Synonyms []Synonym `json:"synonyms"`
|
|
Translation string `json:"translation"`
|
|
Purport []string `json:"purport"`
|
|
}
|
|
|
|
// Synonym represents a word-meaning pair in verse synonyms.
|
|
type Synonym struct {
|
|
Word string `json:"word"`
|
|
Meanings []string `json:"meanings"`
|
|
}
|
|
|
|
// Letter represents a letter from MongoDB.
|
|
type Letter struct {
|
|
ID string `json:"id"`
|
|
Slug string `json:"slug"`
|
|
Recipients []string `json:"recipients"`
|
|
RecipientDisplay string `json:"recipient_display"`
|
|
Date *string `json:"date,omitempty"`
|
|
DateRef *string `json:"date_ref,omitempty"`
|
|
Year *int `json:"year,omitempty"`
|
|
Month *int `json:"month,omitempty"`
|
|
Day *int `json:"day,omitempty"`
|
|
Location *string `json:"location,omitempty"`
|
|
Salutation *string `json:"salutation,omitempty"`
|
|
Paragraphs []string `json:"paragraphs"`
|
|
}
|
|
|
|
// Essay represents an essay from MongoDB.
|
|
type Essay struct {
|
|
ID string `json:"id"`
|
|
Slug string `json:"slug"`
|
|
Title string `json:"title"`
|
|
Author string `json:"author"`
|
|
Year *int `json:"year,omitempty"`
|
|
Group *string `json:"group,omitempty"`
|
|
Order int `json:"order"`
|
|
Paragraphs []string `json:"paragraphs"`
|
|
}
|
|
|
|
// GlossaryEntry represents a glossary term from MongoDB.
|
|
type GlossaryEntry struct {
|
|
ID string `json:"id"`
|
|
Term string `json:"term"`
|
|
Definition string `json:"definition"`
|
|
DefinitionHTML string `json:"definition_html"`
|
|
}
|
|
|
|
// Disciple represents a disciple from MongoDB.
|
|
type Disciple struct {
|
|
ID string `json:"id"`
|
|
InitiatedName string `json:"initiated_name"`
|
|
Suffix string `json:"suffix"`
|
|
InitiationDate *time.Time `json:"initiation_date,omitempty"`
|
|
InitiationPlace *string `json:"initiation_place,omitempty"`
|
|
KarmiName *string `json:"karmi_name,omitempty"`
|
|
Avatar *string `json:"avatar,omitempty"`
|
|
About *string `json:"about,omitempty"`
|
|
Tags []string `json:"tags"`
|
|
IsVerified bool `json:"is_verified"`
|
|
}
|
|
|
|
// Transcription represents a lecture/conversation from MongoDB.
|
|
type Transcription struct {
|
|
ID string `json:"id"`
|
|
Slug string `json:"slug"`
|
|
Name string `json:"name"`
|
|
Type string `json:"type"` // "lecture" | "conversation"
|
|
Date *string `json:"date,omitempty"`
|
|
Year *int `json:"year,omitempty"`
|
|
Month *int `json:"month,omitempty"`
|
|
Day *int `json:"day,omitempty"`
|
|
Place *string `json:"place,omitempty"`
|
|
Context *string `json:"context,omitempty"`
|
|
Reference *string `json:"reference,omitempty"`
|
|
Summary *string `json:"summary,omitempty"`
|
|
Content []ContentBlock `json:"content"`
|
|
Tags []string `json:"tags"`
|
|
Participants []string `json:"participants"`
|
|
Language string `json:"language"`
|
|
Source *string `json:"source,omitempty"`
|
|
DurationMinutes *int `json:"duration_minutes,omitempty"`
|
|
AudioUrl *string `json:"audio_url,omitempty"`
|
|
IsPublished bool `json:"is_published"`
|
|
}
|
|
|
|
// ContentBlock represents a rich text block within a transcription.
|
|
type ContentBlock struct {
|
|
Text string `json:"text"`
|
|
Format string `json:"format"` // "paragraph" | "heading" | "quote" | "verse" | "note"
|
|
Alignment string `json:"alignment"` // "left" | "center" | "right"
|
|
Speaker *string `json:"speaker,omitempty"`
|
|
}
|