Ticketing Project

Tables (10)

Book (books)

  • id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → User.id — NOT NULL
  • performance_id — BIGINT — Foreign key → Performance.id — NOT NULL
  • book_status — VARCHAR(50)
  • total_price — INT
  • quantity — INT
  • created_at — DATETIME
  • updated_at — DATETIME

BookSeat (book_seat)

  • id — BIGINT — Primary key — NOT NULL
  • book_id — BIGINT — Foreign key → Book.id — NOT NULL
  • seat_id — BIGINT — Foreign key → Seat.id — NOT NULL
  • created_at — DATETIME
  • updated_at — DATETIME

File (files)

  • id — BIGINT — Primary key — NOT NULL
  • encodedFileName — VARCHAR(255)
  • originalFileName — VARCHAR(255)
  • created_at — DATETIME
  • updated_at — DATETIME

Grade (grade)

  • id (Key) — BIGINT — Primary key — NOT NULL
  • place_id — BIGINT — Foreign key → Place.id — NOT NULL
  • grade — VARCHAR(10) — NOT NULL
  • seat_count — INT — NOT NULL
  • default_price — INT
  • created_at — DATETIME
  • updated_at — DATETIME

Like (likes)

  • id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → User.id — NOT NULL
  • performance_id — BIGINT — Foreign key → Performance.id — NOT NULL
  • is_liked — BOOLEAN
  • created_at — DATETIME
  • updated_at — DATETIME

LikeCount (like_count)

  • id — BIGINT — Primary key — NOT NULL
  • performance_id — BIGINT — Foreign key → Performance.id — NOT NULL
  • like_count — BIGINT
  • created_at — DATETIME
  • updated_at — DATETIME

Performance (performances)

  • id — BIGINT — Primary key — NOT NULL
  • file_id — BIGINT — Foreign key → File.id — NOT NULL
  • place_id — BIGINT — Foreign key → Place.id — NOT NULL
  • title — VARCHAR(255) — NOT NULL
  • description — TEXT
  • start_time — DATETIME
  • end_time — DATETIME
  • category — VARCHAR(20)
  • performance_status (status) — BOOLEAN
  • reservation_start_time — DATETIME
  • deletedFlag — BOOLEAN
  • created_at — DATETIME
  • updated_at — DATETIME

Place (places)

  • id — BIGINT — Primary key — NOT NULL
  • address — VARCHAR(255)
  • name — VARCHAR(255)
  • total_seats — INT

Seat (seats)

  • id — BIGINT — Primary key — NOT NULL
  • performance_id — BIGINT — Foreign key → Performance.id — NOT NULL
  • grade_id — BIGINT — Foreign key → Grade.id — NOT NULL
  • seat_number — VARCHAR(50) — NOT NULL
  • price — INT
  • version — INT
  • seat_status — VARCHAR(20)
  • created_at — DATETIME
  • updated_at — DATETIME

User (users)

  • id — BIGINT — Primary key — NOT NULL
  • email — VARCHAR(255) — NOT NULL
  • password — VARCHAR(255) — NOT NULL
  • username — VARCHAR(255) — NOT NULL
  • role — VARCHAR(20) — NOT NULL
  • provider — VARCHAR(255)
  • is_blocked — BOOLEAN
  • created_at — DATETIME
  • updated_at — DATETIME