properties table
The properties table in the Hotel Booking Database Schema schema has 16 columns, keyed by id. 5 columns in room_types, rate_plans, cancellation_policies, bookings and 1 more reference it.
timezone matters more than it looks. A stay date is a local calendar date, not a UTC instant.
Columns (16)
| Column | Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | |
| name | varchar(160) | not null | |
| slug | varchar(180) | unique, not null | |
| description | text | ||
| star_rating | smallint | ||
| address_line1 | varchar(255) | not null | |
| city | varchar(120) | not null | |
| region | varchar(120) | ||
| postal_code | varchar(20) | ||
| country_code | char(2) | not null | |
| latitude | decimal(9,6) | ||
| longitude | decimal(9,6) | ||
| timezone | varchar(60) | not null | |
| check_in_time | time | not null | |
| check_out_time | time | not null | |
| currency | char(3) | not null |
Indexes (1)
(city, country_code)
Relationships
room_types.property_idreferencespropertiesrate_plans.property_idreferencespropertiescancellation_policies.property_idreferencespropertiesbookings.property_idreferencespropertiesreviews.property_idreferencesproperties