package receipt import "time" const ( OutcomeAccepted = "accepted" OutcomeReplay = "replay" OutcomeConflict = "conflict" ) // IngestAudit contains only identifiers, a digest and an outcome. Event payloads, // credentials and tokens must never be copied into this append-only audit table. type IngestAudit struct { ID int64 `json:"id" gorm:"primaryKey;autoIncrement"` ProducerID string `json:"producerId" gorm:"size:128;not null;index"` SourceEventID string `json:"sourceEventId" gorm:"size:256;not null;index"` PayloadSHA256 string `json:"-" gorm:"type:char(64);not null"` Outcome string `json:"outcome" gorm:"size:16;not null"` ActorID int `json:"actorId" gorm:"not null"` CreatedAt time.Time `json:"createdAt" gorm:"type:timestamptz;not null"` } func (IngestAudit) TableName() string { return "bell_event_ingest_audits" }