package models import "time" type User struct { ID int64 `json:"id"` Username string `json:"username"` Email string `json:"email"` CreatedAt time.Time `json:"created_at"` // NtfyTopic is where this user's push notifications go. Nil means they get // none of their own; incidents assigned to them fall back to the configured // fallback topic instead. NtfyTopic *string `json:"ntfy_topic,omitempty"` } type APIKey struct { ID int64 `json:"id"` UserID int64 `json:"user_id"` Name string `json:"name"` CreatedAt time.Time `json:"created_at"` LastUsedAt *time.Time `json:"last_used_at,omitempty"` Key string `json:"key,omitempty"` // populated only on creation, never stored }