21 lines
617 B
Go
21 lines
617 B
Go
package database
|
|
|
|
// Event represents a webhook event
|
|
type Event struct {
|
|
BaseModel
|
|
|
|
ProcessorID string `gorm:"type:uuid;not null" json:"processor_id"`
|
|
WebhookID string `gorm:"type:uuid;not null" json:"webhook_id"`
|
|
|
|
// 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:"content_type"`
|
|
|
|
// Relations
|
|
Processor Processor `json:"processor,omitempty"`
|
|
Webhook Webhook `json:"webhook,omitempty"`
|
|
Deliveries []Delivery `json:"deliveries,omitempty"`
|
|
}
|