feat: daily vani

This commit is contained in:
Krispire Admin
2026-07-11 00:31:22 +05:30
parent 9c9c46caf1
commit c26904b61e
7 changed files with 490 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
package model
import "time"
// VaniPayload is the prebuilt display blob for the "Vāṇī of the Day" CTA. It's
// owned by the frontend's rendering needs and stored verbatim as JSONB, so the
// home page can render without re-reading Mongo.
type VaniPayload struct {
Kind string `json:"kind"` // "verse" | "prose" | "transcript"
Label string `json:"label"` // "Verse" | "Chapter" | "Lecture" | "Conversation"
Title string `json:"title"` // reference / chapter title / lecture name
Subtitle string `json:"subtitle"` // short excerpt or date · place
Href string `json:"href"` // in-app path to open the item
BookTitle string `json:"book_title,omitempty"` // e.g. "Bhagavad-gītā As It Is"
}
// VaniPick is one persisted day's choice. RefID is `<kind>:<mongo _id hex>` and
// is what the 90-day no-repeat rule dedupes on.
type VaniPick struct {
Day time.Time
Kind string
RefID string
Payload VaniPayload
}