spring-hotel-reserve
Tables (6)
hotels
- hotel_id — BIGINT — Primary key — NOT NULL
- name — VARCHAR(100) — NOT NULL
members
- user_id — BIGINT — Primary key — NOT NULL
- username — VARCHAR(50) — NOT NULL
- password — VARCHAR(100) — NOT NULL
- email — VARCHAR(100) — NOT NULL
- created_at — DATETIME — NOT NULL
- active_flag — TINYINT(1) — NOT NULL
- withdrawnAt (withdrawn_at) — DATETIME
point_transactions
- tx_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → members.user_id — NOT NULL
- reservation_id — BIGINT — Foreign key → reservations.reservation_id
- review_id — BIGINT
- points_amount — INT — NOT NULL
- expire_date — DATE — NOT NULL
- created_at — DATETIME — NOT NULL
- tx_type — ENUM('RESERVATION','CANCEL','REVIEW') — NOT NULL
reservations
- reservation_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → members.user_id — NOT NULL
- room_id — BIGINT — Foreign key → rooms.room_id — NOT NULL
- checkin_date — DATE — NOT NULL
- checkout_date — DATE — NOT NULL
- guest_count — TINYINT — NOT NULL
- reservation_code — VARCHAR(50) — NOT NULL
- created_at — DATETIME — NOT NULL
- cancelled_flag — TINYINT(1) — NOT NULL
reviews
- review_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → members.user_id — NOT NULL
- reservation_id — BIGINT — Foreign key → reservations.reservation_id — NOT NULL
- content — TEXT
- visible_flag — TINYINT(1) — NOT NULL
- created_at — DATETIME — 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 — TINYINT(1) — NOT NULL
- view_type — TINYINT — NOT NULL
- created_at — DATETIME — NOT NULL