Hotel_NHN
Tables (10)
Hotels
- hotel_id — BIGINT — Primary key — NOT NULL
- name — VARCHAR(100)
PointHistory
- point_id — BIGINT — Primary key — NOT NULL
- user_id (user_id2) — BIGINT — Foreign key → User.user_id — NOT NULL
- user_id — BIGINT — NOT NULL
- points — BIGINT — NOT NULL
- description — TEXT
- created_at — DATETIME
- expired_at — DATETIME
ReservationStatuses
- status_id — INT — Primary key — NOT NULL
- status_name — VARCHAR(50) — NOT NULL
Reservations
- reservation_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → User.user_id — NOT NULL
- room_id — BIGINT — Foreign key → Rooms.room_id — NOT NULL — auto incrsement
- hotel_id — BIGINT — Foreign key → Rooms.hotel_id — NOT NULL
- status_id — INT — Foreign key → ReservationStatuses.status_id — NOT NULL
- check_in_date — DATE
- check_out_date — DATE
- status — VARCHAR(50)
Reviews
- review_id — BIGINT — Primary key — NOT NULL
- room_id — BIGINT — Foreign key → Rooms.room_id — NOT NULL — auto incrsement
- hotel_id — BIGINT — Foreign key → Rooms.hotel_id — NOT NULL
- user_id — BIGINT — NOT NULL
- review_score — TINYINT
- review_text — TEXT
- created_at — DATETIME
- approved — TINYINT(1)
RoomImages
- image_idimage_id (image_id) — BIGINT — Primary key — NOT NULL
- room_id — BIGINT — Foreign key → Rooms.room_id — NOT NULL — auto incrsement
- hotel_id — BIGINT — Foreign key → Rooms.hotel_id — NOT NULL
- image_url — VARCHAR(1000)
Rooms
- room_id — BIGINT — Primary key — NOT NULL — auto incrsement
- hotel_id — BIGINT — Foreign key → Hotels.hotel_id — NOT NULL
- name — VARCHAR(100)
- capacity — TINYINT
- floor — TINYINT
- bathtub_flag — TINYINT(1)
- view_type — TINYINT
- created_at — DATETIME
SeasonalRates
- rate_id — BIGINT — Primary key — NOT NULL
- room_id — BIGINT — Foreign key → Rooms.room_id — NOT NULL — auto incrsement
- hotel_id — BIGINT — Foreign key → Rooms.hotel_id — NOT NULL
- is_peak_season — TINYINT(1)
- rate — DECIMAL(10, 2)
User
- user_id — BIGINT — Primary key — NOT NULL
- user_name — VARCHAR(255)
UserPoints
- user_id — BIGINT — Foreign key → User.user_id — NOT NULL
- points — BIGINT