booking_room_nights table
The booking_room_nights table in the Hotel Booking Database Schema schema has 4 columns, keyed by id, with 1 foreign key to booking_rooms.
The frozen price of one night. Summing these gives the room total, and it survives any later change to rate_calendar.
Columns (4)
| Column | Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | |
| booking_room_id | uuid | not null, references booking_rooms.id | |
| stay_date | date | not null | |
| rate_cents | integer | not null |
Indexes (2)
(booking_room_id, stay_date)unique(stay_date)
Relationships
booking_room_nights.booking_room_idreferencesbooking_rooms.id