nhnexam

Tables (7)

hotels

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

point_earnings

  • point_earning_id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — NOT NULL
  • reservation_id — BIGINT — Foreign key → reservations.reservation_id
  • review_id — BIGINT — Foreign key → reviews.review_id
  • amount — INT — NOT NULL
  • earned_at — DATETIME — NOT NULL
  • expires_at — DATETIME — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • revoked_at — DATETIME

reservations

  • reservation_id — BIGINT — Primary key — NOT NULL
  • reservation_no — VARCHAR(50) — NOT NULL
  • room_id — BIGINT — Foreign key → rooms.room_id — NOT NULL
  • member_id — BIGINT — NOT NULL
  • check_in_date — DATE — NOT NULL
  • check_out_date — DATE — NOT NULL
  • guest_count — TINYINT — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • created_at — DATETIME — NOT NULL

review_images

  • review_image_id — BIGINT — Primary key — NOT NULL
  • review_id — BIGINT — Foreign key → reviews.review_id — NOT NULL
  • image_url — VARCHAR(500) — NOT NULL

reviews

  • review_id — BIGINT — Primary key — NOT NULL
  • reservation_id — BIGINT — Foreign key → reservations.reservation_id — NOT NULL
  • rating — DECIMAL(2, 1) — NOT NULL
  • visible_flag — TINYINT(1) — NOT NULL
  • created_at — DATETIME — NOT NULL

room_images

  • room_image_id — BIGINT — Primary key — NOT NULL
  • room_id — BIGINT — Foreign key → rooms.room_id — NOT NULL
  • image_url — VARCHAR(500) — 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_per_night — DECIMAL(12, 2) — NOT NULL
  • created_at — DATETIME — NOT NULL