package domain import ( "errors" "time" "github.com/google/uuid" ) type EventStatus string const ( EventStatusDraft EventStatus = "draft" EventStatusPublished EventStatus = "published" EventStatusClosed EventStatus = "closed" EventStatusArchived EventStatus = "archived" ) func (s EventStatus) Valid() bool { switch s { case EventStatusDraft, EventStatusPublished, EventStatusClosed, EventStatusArchived: return true } return false } type Event struct { ID uuid.UUID `json:"id"` HostID uuid.UUID `json:"host_id"` Name string `json:"name"` Slug string `json:"slug"` EventDate time.Time `json:"event_date"` Venue string `json:"venue"` MaxCapacity int `json:"max_capacity"` Settings map[string]any `json:"settings"` Status EventStatus `json:"status"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` } var ( ErrEventNotFound = errors.New("event not found") ErrSlugTaken = errors.New("slug already in use") )