ㅇㅇ3

Tables (7)

Hotel

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

Reservation

  • reservation_id — BIGINT — Primary key — NOT NULL
  • customer_id — BIGINT — Foreign key → customers.customer_id — NOT NULL
  • room_id — BIGINT — Foreign key → Room.room_id — NOT NULL
  • check_in — DATE — NOT NULL
  • check_out — DATE — NOT NULL
  • created_at — DATETIME — NOT NULL

Room

  • room_id — BIGINT — Primary key — NOT NULL
  • hotel_id — BIGINT — Foreign key → Hotel.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
  • created_at — DATETIME — NOT NULL
  • price — BIGINT

customers

  • customer_id — BIGINT — Primary key — NOT NULL
  • customer_name — VARCHAR(100) — NOT NULL
  • password — VARCHAR(255)
  • email — VARCHAR(150) — NOT NULL
  • phone — VARCHAR(15) — NOT NULL

image

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

points

  • point_id — BIGINT — Primary key — NOT NULL
  • customer_id — BIGINT — Foreign key → customers.customer_id — NOT NULL
  • points — INT — NOT NULL
  • created_at — DATETIME — NOT NULL

reviews

  • review_id — BIGINT — Primary key — NOT NULL
  • customer_id — BIGINT — Foreign key → customers.customer_id — NOT NULL
  • room_id — BIGINT — Foreign key → Room.room_id — NOT NULL
  • title — VARCHAR(255)
  • comment — TEXT
  • rating — TINYINT — NOT NULL
  • created_at — DATETIME — NOT NULL