webhooker/internal/database/model_delivery_result.go
2026-03-01 22:52:08 +07:00

18 lines
588 B
Go

package database
// DeliveryResult represents the result of a delivery attempt
type DeliveryResult struct {
BaseModel
DeliveryID string `gorm:"type:uuid;not null" json:"delivery_id"`
AttemptNum int `gorm:"not null" json:"attempt_num"`
Success bool `json:"success"`
StatusCode int `json:"status_code,omitempty"`
ResponseBody string `gorm:"type:text" json:"response_body,omitempty"`
Error string `json:"error,omitempty"`
Duration int64 `json:"duration_ms"` // Duration in milliseconds
// Relations
Delivery Delivery `json:"delivery,omitempty"`
}