Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Booking ¶
type Booking struct { ID uuid.UUID `json:"id" validate:"required"` EventID uuid.UUID `json:"event_id" validate:"required"` UserID uuid.UUID `json:"user_id" validate:"required"` Status string `json:"status" validate:"required"` Quantity int `json:"quantity" validate:"required"` CreatedAt time.Time `json:"created_at" validate:"required"` UpdatedAt time.Time `json:"updated_at" validate:"required"` }
type Event ¶
type Event struct { ID uuid.UUID `json:"id" db:"id"` Title string `json:"title" db:"title"` Description string `json:"description" db:"description"` StartTime time.Time `json:"start_time" db:"start_time"` EndTime time.Time `json:"end_time" db:"end_time"` Location string `json:"location" db:"location"` Capacity int `json:"capacity" db:"capacity"` AvailableTickets int `json:"available_tickets" db:"available_tickets"` Price float64 `json:"price" db:"price"` OrganizerId uuid.UUID `json:"organizer_id" db:"organizer_id"` CategoryId uuid.UUID `json:"category_id" db:"category_id"` Status string `json:"status" db:"status"` CreatedAt time.Time `json:"created_at" db:"created_at"` UpdatedAt time.Time `json:"updated_at" db:"updated_at"` }
func (*Event) CheckTicketAvailability ¶
CheckTicketAvailability verifies if the requested number of tickets is available
func (*Event) ReleaseTickets ¶
ReleaseTickets releases the specified number of tickets back to the available pool
func (*Event) ReserveTickets ¶
ReserveTickets attempts to reserve the specified number of tickets
type EventStatus ¶
type EventStatus string
const ( EventStatusDraft EventStatus = "draft" EventStatusPublished EventStatus = "published" EventStatusCancelled EventStatus = "cancelled" EventStatusCompleted EventStatus = "completed" )
func (EventStatus) Validate ¶
func (s EventStatus) Validate() bool
Click to show internal directories.
Click to hide internal directories.