package models // NotificationPreference stores a user's per-type notification delivery preference. // Type "*" acts as a catch-all default for types without an explicit row. type NotificationPreference struct { ID string `json:"id" db:"id"` UserID string `json:"user_id" db:"user_id"` Type string `json:"type" db:"type"` // notification type or "*" InApp bool `json:"in_app" db:"in_app"` // show in-app bell/panel Email bool `json:"email" db:"email"` // send email } // ResolvedPreference is the effective preference after resolution chain. type ResolvedPreference struct { InApp bool Email bool } // SystemDefaultPreference is the fallback when no user preference exists. var SystemDefaultPreference = ResolvedPreference{InApp: true, Email: false}