package models import ( "time" "go.mongodb.org/mongo-driver/v2/bson" ) type AlertSettings struct { Enabled bool `bson:"enabled" json:"enabled"` WebhookURL string `bson:"webhook_url" json:"webhook_url"` OfflineThresholdMinutes int `bson:"offline_threshold_minutes" json:"offline_threshold_minutes"` } type EmailSettings struct { Enabled bool `bson:"enabled" json:"enabled"` SMTPHost string `bson:"smtp_host" json:"smtp_host"` SMTPPort int `bson:"smtp_port" json:"smtp_port"` Username string `bson:"username" json:"username"` Password string `bson:"password" json:"password"` FromAddr string `bson:"from_addr" json:"from_addr"` ToAddrs []string `bson:"to_addrs" json:"to_addrs"` UseTLS bool `bson:"use_tls" json:"use_tls"` } type SecretsSettings struct { ReadTokenHash string `bson:"read_token_hash,omitempty" json:"-"` ReadTokenSet bool `bson:"-" json:"read_token_set"` RotatedAt time.Time `bson:"rotated_at,omitempty" json:"rotated_at,omitempty"` } type Settings struct { ID bson.ObjectID `bson:"_id,omitempty" json:"-"` OrgID string `bson:"org_id" json:"org_id"` Alerts AlertSettings `bson:"alerts" json:"alerts"` Email EmailSettings `bson:"email" json:"email"` Secrets SecretsSettings `bson:"secrets" json:"secrets"` WorkflowLogRetentionDays *int `bson:"workflow_log_retention_days,omitempty" json:"workflow_log_retention_days,omitempty"` }