ticketing
Tables (9)
Concert (Untitled)
- id — UUID — Primary key — NOT NULL
- title — varchar
- description — varchar
- director — varchar
balance_transaction
- id — UUID — Primary key — NOT NULL
- user_id — UUID — Foreign key → user.id — NOT NULL
- amount — INT — NOT NULL
- type — VARCHAR(20) — NOT NULL
- balance_after — INT — NOT NULL
- created_at — TIMESTAMP — NOT NULL
concert_schedule
- id — UUID — Primary key — NOT NULL
- start_time — TIME — NOT NULL
- end_time — TIME — NOT NULL
- total_seats — INT — NOT NULL
- status — ENUM('open','closed'.'cancelled')
payment
- id — UUID — Primary key — NOT NULL
- reservation_id — UUID — Foreign key → reservation.id — NOT NULL
- amount — INT — NOT NULL
- paid_at — TIMESTAMP — NOT NULL
- status — VARCHAR(20) — NOT NULL
queue_token
- id — UUID — Primary key — NOT NULL
- user_id — UUID — Foreign key → user.id — NOT NULL
- token — VARCHAR(512)
- position — INT — NOT NULL
- estimated_wait_time — INT — NOT NULL
- issued_at — TIMESTAMP — NOT NULL
- expires_at — TIMESTAMP — NOT NULL
- is_valid — BOOLEAN — NOT NULL
reservation
- id — UUID — Primary key — NOT NULL
- status — ENUM('pending','cancelled',expired','confirmed') — NOT NULL
- expires_at — TIMESTAMP
- created_at — TIMESTAMP — NOT NULL
reservation_seat (Untitled2)
- id — UUID — Primary key — NOT NULL
- seat_id — UUID — Foreign key → seat.id — NOT NULL
- reservation_id — UUID — Foreign key → reservation.id — NOT NULL
seat
- id — UUID — Primary key — NOT NULL
- schedule_id — UUID — Foreign key → concert_schedule.id — NOT NULL
- seat_no — INT — NOT NULL
- status — ENUM('available','reserved','sold') — NOT NULL
- reserved_by — UUID
- expires_at — TIMESTAMP
- price — INT
user
- id — UUID — Primary key — NOT NULL
- name — VARCHAR(100) — NOT NULL
- email — VARCHAR(100) — NOT NULL
- created_at — TIMESTAMP — NOT NULL