hotel-exam2
Tables (10)
daily_room_products
- product_id — BIGINT — Primary key — NOT NULL
- room_id — BIGINT — Foreign key → rooms.room_id — NOT NULL
- stay_date — DATE — NOT NULL
- is_peak_season — BOOLEAN — NOT NULL
- reservation_id — BIGINT — Foreign key → reservations.reservation_id
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
hotels
- hotel_id — BIGINT — Primary key — NOT NULL
- name — VARCHAR(100) — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
images
- image_id — BIGINT — Primary key — NOT NULL
- url — VARCHAR(255) — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
point_logs
- point_log_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — NOT NULL
- point_policy_id — BIGINT — Foreign key → point_policies.point_policy_id
- action_code — VARCHAR(50) — NOT NULL
- points_change — INT — NOT NULL
- related_id — BIGINT
- description — VARCHAR(255)
- expiry_date — DATE
- created_at — DATETIME — NOT NULL
point_policies
- point_policy_id — BIGINT — Primary key — NOT NULL
- policy_name — VARCHAR(100) — NOT NULL
- action_code — VARCHAR(50) — NOT NULL
- point_value — DECIMAL(10, 2) — NOT NULL
- is_active — BOOLEAN — NOT NULL
- expiry_days — INT
- created_at — DATETIME — NOT NULL
- updated_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
- total_price — DECIMAL(12, 2) — NOT NULL
- status — ENUM — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_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_id — BIGINT — Foreign key → images.image_id — NOT NULL
- priority — INT — NOT NULL
reviews
- review_id — BIGINT — Primary key — NOT NULL
- reservation_id — BIGINT — Foreign key → reservations.reservation_id — NOT NULL
- user_id — BIGINT — NOT NULL
- rating — TINYINT — NOT NULL
- title — VARCHAR(100) — NOT NULL
- content — TEXT — NOT NULL
- is_visible — BOOLEAN — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_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_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 — BOOLEAN — NOT NULL
- view_type — ENUM — NOT NULL
- price — DECIMAL(10, 2) — NOT NULL
- peak_season_price — DECIMAL(10, 2) — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL