hotel-exam

Tables (10)

daily_room_products

  • product_id — BIGINT — Primary key — NOT NULL — 일별 객실 상품 ID (PK)
  • room_id — BIGINT — Foreign key → rooms.room_id — NOT NULL
  • reservation_id — BIGINT — Foreign key → reservations.reservation_id
  • stay_date — DATE — NOT NULL — 숙박일 (상품 기준일)
  • is_peak_season — BOOLEAN — NOT NULL — 시즌 타입 (예: PEAK, OFF_PEAK, SHOULDER)
  • last_updated_at — DATETIME — NOT NULL — 최종 업데이트 일시
  • created_at — DATETIME — NOT NULL

hotels

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

images

  • image_id — BIGINT — Primary key — NOT NULL
  • url — VARCHAR(255) — NOT NULL
  • created_at — DATETIME — NOT NULL

point_logs (pointLogs)

  • point_log_id — BIGINT — Primary key — NOT NULL
  • point_policie_id — BIGINT — Foreign key → point_policies.point_policie_id — NOT NULL
  • user_id — BIGINT — NOT NULL
  • description — VARCHAR(128) — NOT NULL
  • created_at — DATETIME — NOT NULL

point_policies

  • point_policie_id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(50) — NOT NULL
  • value — DECIMAL(10, 2) — NOT NULL
  • created_at — DATETIME — NOT NULL

reservations

  • reservation_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — NOT NULL
  • check_in_date — DATE — NOT NULL
  • check_out_date — DATE — NOT NULL
  • pax — INT — NOT NULL
  • created_at — DATETIME — NOT NULL

review_images (reviewImages)

  • review_image_id — BIGINT — Primary key — NOT NULL
  • image_id (image_id2) — BIGINT — Foreign key → images.image_id — NOT NULL
  • review_id — BIGINT — Foreign key → reviews.review_id — NOT NULL
  • priority — INT

reviews

  • review_id — BIGINT — Primary key — NOT NULL
  • reservation_id — BIGINT — Foreign key → reservations.reservation_id — NOT NULL
  • user_id — BIGINT — NOT NULL
  • title — VARCHAR(50) — NOT NULL
  • content — VARCHAR(1000) — NOT NULL
  • is_visible — BOOLEAN — NOT NULL
  • created_at — DATETIME — NOT NULL

room_images (roomImages)

  • room_image_id — BIGINT — Primary key — NOT NULL
  • room_id — BIGINT — Foreign key → rooms.room_id — NOT NULL
  • image_id — BIGINT — Foreign key → images.image_id — NOT NULL
  • priority — INT — 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
  • capacity — TINYINT — NOT NULL
  • floor — TINYINT — NOT NULL
  • bathtub_flag — TINYINT(1) — NOT NULL
  • view_type — TINYINT — NOT NULL
  • price — DECIMAL(10, 2) — NOT NULL
  • peak_season_price — DECIMAL(10, 2) — NOT NULL
  • created_at — DATETIME — NOT NULL