package database // TargetType represents the type of delivery target type TargetType string // Target type values. const ( TargetTypeHTTP TargetType = "http" TargetTypeDatabase TargetType = "database" TargetTypeLog TargetType = "log" TargetTypeSlack TargetType = "slack" ) // Target represents a delivery target for a webhook type Target struct { BaseModel WebhookID string `gorm:"type:uuid;not null" json:"webhookId"` Name string `gorm:"not null" json:"name"` Type TargetType `gorm:"not null" json:"type"` Active bool `gorm:"default:true" json:"active"` // Configuration fields (JSON stored based on type) Config string `gorm:"type:text" json:"config"` // JSON configuration // For HTTP targets (max_retries=0 means fire-and-forget, >0 enables retries with backoff) MaxRetries int `json:"maxRetries,omitempty"` MaxQueueSize int `json:"maxQueueSize,omitempty"` // Relations Webhook Webhook `json:"webhook,omitzero"` Deliveries []Delivery `json:"deliveries,omitempty"` }