Files
webhooker/internal/database/model_delivery_result.go
T
sneak 12e6c3bf3e Align DeliveryResult tags and make the index table test-local
Re-align the json tag column in DeliveryResult after the wider
DeliveryID gorm tag, and move the test's index table out of package
scope into the test function.

Model: opus-5-5
2026-09-28 11:02:08 +00:00

18 lines
619 B
Go

package database
// DeliveryResult represents the result of a delivery attempt
type DeliveryResult struct {
BaseModel
DeliveryID string `gorm:"type:uuid;not null;index" json:"deliveryId"`
AttemptNum int `gorm:"not null" json:"attemptNum"`
Success bool `json:"success"`
StatusCode int `json:"statusCode,omitempty"`
ResponseBody string `gorm:"type:text" json:"responseBody,omitempty"`
Error string `json:"error,omitempty"`
Duration int64 `json:"durationMs"` // Duration in milliseconds
// Relations
Delivery Delivery `json:"delivery,omitzero"`
}