concert_booking

Tables (8)

Concert

  • concert_id — BIGINT — Primary key — NOT NULL
  • venue_id — BIGINT — Foreign key → Venue.venue_id — NOT NULL
  • name — VARCHAR(100)
  • date — TIMESTAMP

Payment

  • payment_id — BIGINT — Primary key — NOT NULL
  • reservation_id — BIGINT — Foreign key → Reservation.reservation_id — NOT NULL
  • amount — DECIMAL(10,2)
  • status — VARCHAR(20)
  • paid_at — TIMESTAMP

QueueToken (UserQueueToken)

  • user_id — BIGINT — Foreign key → Users.user_id — NOT NULL
  • queue_position — INT
  • user_UUID (Field2) — VARCHAR(36)
  • expires_at — TIMESTAMP
  • issued_at (Field) — TIMESTAMP

Reservation

  • reservation_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → Users.user_id — NOT NULL
  • concert_id — BIGINT — Foreign key → Concert.concert_id — NOT NULL
  • status — VARCHAR(20)
  • reserved_at — TIMESTAMP
  • expires_at — TIMESTAMP

Reservation_Seat

  • expires_at (Key) — TIMESTAMP — Primary key — NOT NULL
  • reservation_id — BIGINT — Foreign key → Reservation.reservation_id — NOT NULL
  • seat_id — BIGINT — Foreign key → Seat.seat_id — NOT NULL

Seat

  • seat_id — BIGINT — Primary key — NOT NULL
  • concert_id — BIGINT — Foreign key → Concert.concert_id — NOT NULL
  • seat_num — INT — NOT NULL
  • price — DECIMAL(10,2)

Users (User)

  • user_id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(50)
  • password — VARCHAR(255)
  • balance (Field) — DECIMAL(10,2)
  • create_at — TIMESTAMP

Venue

  • venue_id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(100)
  • location — VARCHAR(255)