Module: Events (events / events)
Status: π’ Production (ticketing live; commission wired) Β· Last validated: 2026-09-06 Β· Priority: P1
Event listings, RSVP, ticketing (seat bookings), comments, nominees. Validated against classs/EventsModule.php + schema.
A. Purpose
Organizers list events and sell tickets; users RSVP and book seats. Revenue = 5% commission (18 processed rows in commission_transactions for order_table='events_ticket_orders', 2026-09-06; was miscited as 17 and against the wrong table name β see the table-name correction below).
B. Actors
Attendee; event organizer; admin. Enrollment events.
C. Entry points
/eventlist.php, /eventdetail.php.
E. Feature registry (prefix EVT-)
| ID | Feature | Actor | Method | Tables | Status |
|---|---|---|---|---|---|
| EVT-001 | Create event | organizer | createEvent :392 | events_master | π’ |
| EVT-002 | List / detail | anon+user | listEvents :717, getEventDetail :880 | events_master | π’ |
| EVT-003 | RSVP | user | setRsvp :974, listRsvps :1001 | events_rsvp | π’ |
| EVT-004 | Comments | user | addComment :1033, listComments :1074 | events_comments | π’ |
| EVT-005 | Nominees (awards) | user | addNominee :1097 | events_nominees | π’ |
| EVT-006 | Book ticket | user | bookTicket :1180 | events_ticket_orders | π’ (money) |
| EVT-007 | Cancel ticket | user | cancelTicket :1623 | events_ticket_orders | π’ |
| EVT-008 | My bookings | user | getMyBookings :33 | events_ticket_orders | π’ |
Correction (2026-09-06): an earlier pass of this page named the ticket-order tableevents_seat_bookingsthroughout EVT-006/007/008, the flow diagram, and the data model. That table exists (17 rows) but is never referenced anywhere inclasss/EventsModule.php(checkedbookTicket,cancelTicket,getMyBookings, and every other method β grep forevents_seat_bookingsreturns zero hits in the file). The real, live write/read table for tickets isevents_ticket_orders(bookTicketINSERTs into it at:1335;getMyBookingsSELECTs from it at:43;cancelTicketUPDATEs it at:1662).events_seat_bookingsis dormant/legacy β treat it like thehotel_rooms/hotel_masterdormant tables in the StayGo page: present in schema, not on any live code path. Code wins; the table name below is corrected accordingly.
F. Ticket flow (EVT-006)
eventdetail.php β bookTicket(userId, data) :1180 β wallet debit (wallet-first)
β escrow credit to CLASSIFIED_ESCROW_BUCKET_USER_ID (:1319, mirrors the Food/Hotel escrow pattern)
β INSERT events_ticket_orders (header, single flat row β no separate ticket-type/seat table) :1335
β generateInvoice() :1355 β central payments ledger (PaymentsModule::recordWalletPayment) :1369
β 5% commission (CommissionEngineModule::computeAndRecord, order_table='events_ticket_orders') :1511
β notify organizer
G. Data model (2026-09-06)
| Table | Rows | Role |
|---|---|---|
events_master | 0 | event header |
events_ticket_orders | 0 | ticket bookings (the real live table β see correction above) |
events_seat_bookings | 17 | dormant/legacy β not referenced by any code in EventsModule.php; do not use |
events_ticket_types | 0 | ticket tiers |
Data-state anomaly (requires verification):events_master= 0 ANDevents_ticket_orders= 0, yetcommission_transactionscarries 18processedrows withorder_table='events_ticket_orders'(2026-09-06 live count). Bookings clearly happened β commission was computed and recorded per booking β but both the event header and the order header table are now empty. This is a harder version of the FoodVerse/StayGo header-purge pattern (there the header is empty but the child/payment rows survive; here the child table itself is also empty and only the downstream commission ledger still shows the activity). Reconcile before quoting any event/ticket count. Note this is a different anomaly than what an earlier pass of this page described (it pointed atevents_seat_bookings, which was never the live table β see correction above).
K. State machine
Event: draft β published β live β completed / cancelled. Booking: booked β confirmed β attended / cancelled (refund) .
L / M / N
Errors: EVT-E001 booking without event header (see anomaly). Depends on wallet, commission, notifications. Change-impact: ticket booking touches money β re-test bookβpayβcommissionβcancel/refund.