hotel
Tables (7)
hotels
- hotel_id — BIGINT — Primary key — NOT NULL
- name — VARCHAR(100) — NOT NULL
points (point_histories)
- point_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — NOT NULL
- reservation_id — BIGINT — Foreign key → reservations.reservation_id
- point — INT — NOT NULL
- type — VARCHAR(20) — NOT NULL
- created_at — DATETIME — NOT NULL
- expired_at — DATETIME
reservations
- reservation_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — NOT NULL
- room_id — BIGINT — Foreign key — NOT NULL
- check_in_date — DATE — NOT NULL
- check_out_date — DATE — NOT NULL
- person_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
- book_id — BIGINT — Foreign key → reviews.reservation_id — NOT NULL
reviews
- review_id — BIGINT — Primary key — NOT NULL
- reservation_id — BIGINT — Foreign key → reservations.reservation_id — NOT NULL
- room_id — BIGINT — Foreign key — NOT NULL
- user_id — BIGINT — NOT NULL
- rating — TINYINT — NOT NULL
- content — TEXT — NOT NULL
- is_approved — TINYINT — NOT NULL
- created_at — DATETIME — NOT NULL
room_images
- image_id — BIGINT — Primary key — NOT NULL
- room_id (room_id2) — BIGINT — Foreign key → rooms.room_id — NOT NULL
- book_id — BIGINT — Foreign key → rooms.reservation_id — NOT NULL
- room_id — BIGINT — Foreign key — NOT NULL
- image_url — VARCHAR(500) — NOT NULL
rooms
- room_id — BIGINT — Primary key — NOT NULL
- reservation_id — BIGINT — Foreign key → reservations.reservation_id — 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
- created_at — DATETIME — NOT NULL