package database // Event represents a captured webhook event type Event struct { BaseModel WebhookID string `gorm:"type:uuid;not null" json:"webhookId"` EntrypointID string `gorm:"type:uuid;not null" json:"entrypointId"` // Request data Method string `gorm:"not null" json:"method"` Headers string `gorm:"type:text" json:"headers"` // JSON Body string `gorm:"type:text" json:"body"` ContentType string `json:"contentType"` // ResubmittedFromID names the event this one was copied from by // an operator resubmit. It is nil for an event that arrived on // the receiver, which is every event created before the column // existed. It is not a foreign key: the source event can be // reaped by retention while its copies remain, and the id is // kept as the record of where the copy came from either way. ResubmittedFromID *string `gorm:"type:uuid;index" json:"resubmittedFromId,omitempty"` // Relations Webhook Webhook `json:"webhook,omitzero"` Entrypoint Entrypoint `json:"entrypoint,omitzero"` Deliveries []Delivery `json:"deliveries,omitempty"` }