package domain import ( "errors" "time" "github.com/google/uuid" ) type RSVPResponse string const ( RSVPAttending RSVPResponse = "attending" RSVPDeclined RSVPResponse = "declined" RSVPMaybe RSVPResponse = "maybe" ) func (r RSVPResponse) Valid() bool { switch r { case RSVPAttending, RSVPDeclined, RSVPMaybe: return true } return false } type RSVP struct { ID uuid.UUID `json:"id"` GuestID uuid.UUID `json:"guest_id"` Response RSVPResponse `json:"response"` PlusOnes int `json:"plus_ones"` DietaryNotes *string `json:"dietary_notes,omitempty"` SubmittedAt time.Time `json:"submitted_at"` DeviceFingerprint map[string]any `json:"device_fingerprint,omitempty"` IPAddress *string `json:"ip_address,omitempty"` RiskScore *int `json:"risk_score,omitempty"` } var ( ErrRSVPAlreadySubmitted = errors.New("rsvp already submitted") ErrRSVPBlocked = errors.New("rsvp blocked due to fraud risk") )