hotel
Tables (11)
bed_type (Untitled5)
- bed_type_id (Key) — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
- bed_type_name (Field) — VARCHAR(30) — NOT NULL
files (Untitled3)
- file_id — BIGINT — Primary key — NOT NULL
- file_url
hotels (Untitled)
- hotel_id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
- name — VARCHAR(100)
price_policy (Untitled7)
- price_policy_id — BIGINT — Primary key — NOT NULL
- price_policy_name — VARCHAR(20) — NOT NULL
- price_policy_price — TINYINT — NOT NULL
reservation_status
- reservation_status_id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
- reservation_status_name — VARCHAR(20) — NOT NULL
reservations
- reservation_id — BiGINT — Primary key — NOT NULL — AUTO_INCREMENT
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- room_id — BIGINT — Foreign key → rooms.room_id — NOT NULL
- hotel_id — BIGINT — Foreign key → hotels.hotel_id — NOT NULL
- checkin_at — DATETIME — NOT NULL
- checkout_at — DATETIME — NOT NULL
- phone_number — VARCHAR(12) — NOT NULL
- reservation_code — BINARY(16) — NOT NULL
- Field (reserve_at) — DATE — NOT NULL
reviews
- review_id — BIGINT — Primary key — NOT NULL — AUTO_INCREMENT
- review_content
- review_exposure — TINYINT(1)
- reservation_id — BiGINT — Foreign key → reservations.reservation_id — NOT NULL
- room_id — BIGINT — Foreign key → rooms.room_id — NOT NULL
reviews_files (Untitled4)
- file_id — BIGINT — Foreign key → files.file_id — NOT NULL
- review_id — BIGINT — Foreign key → reviews.review_id — NOT NULL
room_files
- file_id — BIGINT — Foreign key → files.file_id — NOT NULL
- room_id — BIGINT — Foreign key → rooms.room_id — NOT NULL
rooms (Untitled2)
- room_id — BIGINT — Primary key — NOT NULL
- hotel_id — BIGINT — Foreign key → hotels.hotel_id — NOT NULL
- price_policy_id — BIGINT — Foreign key → price_policy.price_policy_id — NOT NULL
- bed_type_id (Key) — BIGINT — Foreign key → bed_type.bed_type_id — NOT NULL
- reservation_status_id — BIGINT — Foreign key → reservation_status.reservation_status_id — NOT NULL
- name — VARCHAR(100)
- capacity — TINYINT
- floor — TINYINT
- bathtub_flag — TINYINT
- view_type — TINYINT
- created_at — DATETIME
- smoking — BIGINT(1)
users
- user_id — BIGINT — Primary key — NOT NULL
- username — VARCHAR(20)
- password — VARCHAR(20)
- point — BIGINT