hotel

Tables (8)

hotels

  • hotel_id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(100) — NOT NULL

images

  • image_id — BIGINT — Primary key — NOT NULL
  • room_id — BIGINT — Foreign key → rooms.room_id
  • review_id — BIGINT — Foreign key → reviews.review_id
  • image_url — VARCHAR(100) — NOT NULL

points

  • point_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • reservation_id — BIGINT — Foreign key → reservation.reservation_id
  • review_id — BIGINT — Foreign key → reviews.review_id
  • amount — INT — NOT NULL
  • expired_at — DATETIME — NOT NULL
  • created_at — DATETIME — NOT NULL

reservation

  • reservation_id — BIGINT — Primary key — NOT NULL
  • room_id — BIGINT — Foreign key → rooms.room_id — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • checkin_date (check_in_date) — DATETIME — NOT NULL
  • check_out_date — DATETIME — NOT NULL
  • number_of_guests — TINYINT — NOT NULL
  • reservation_number — VARCHAR(100) — NOT NULL — UNIQUE
  • status — TINYINT — NOT NULL

reviews

  • review_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.user_id — NOT NULL
  • reservation_id — BIGINT — Foreign key → reservation.reservation_id — NOT NULL
  • content — TEXT
  • is_exposure — TINYINT(1)

room_price

  • room_price_id — BIGINT — Primary key — NOT NULL
  • room_id — BIGINT — Foreign key → rooms.room_id — NOT NULL — UNIQUE
  • price_date — DATETIME — NOT NULL — UNIQUE
  • price — BIGINT — NOT NULL
  • day_of_the_week — TINYINT — NOT NULL
  • season_type — TINYINT — NOT NULL

rooms

  • room_id — BIGINT — Primary key — NOT NULL
  • hotel_id — BIGINT — Foreign key → hotels.hotel_id — NOT NULL
  • name — VARCHAR(100) — NOT NULL — UNIQUE
  • capacity — TINYINT — NOT NULL
  • floor — TINYINT — NOT NULL — UNIQUE
  • bathtub_flag — TINYINT(1) — NOT NULL
  • view_type — TINYINT — NOT NULL
  • created_at — DATETIME — NOT NULL

users

  • user_id — BIGINT — Primary key — NOT NULL
  • login_id — VARCHAR(100) — NOT NULL — UNIQUE
  • password — VARCHAR(200) — NOT NULL
  • role — ENUM('USER', 'ADMIN') — NOT NULL