app.accommodation_blocks
TableRow level security on
Hotel room blocks contracted for a project: rooms held each night between check-in and check-out, released back to the hotel on the cutoff date. A NULL rate is unpriced.
Primary key: id
| Column | Type | Nullable | Description |
|---|---|---|---|
| id | uuid | No | Primary key, UUID v7. |
| org_id | uuid | No | Owning org, derived from app.projects on insert; never accepted from the caller and never changed.References app.organizations.id |
| project_id | uuid | No | Project.References app.projects.id |
| counterparty_id | uuid | Yes | Hotel or lodging supplier.References app.counterparties.id |
| title | text | No | Block name, such as the hotel and purpose. |
| check_in_on | date | No | First night held (hotel local date). |
| check_out_on | date | No | Departure date; the last night held is the day before. |
| rooms_held | integer | No | Rooms held on each night of the block. |
| release_on | date | Yes | Cutoff date when unassigned rooms return to the hotel. |
| nightly_rate_minor | bigint | Yes | Contracted nightly rate in minor units; NULL is unpriced. |
| currency_code | character(3) | Yes | ISO 4217 currency of the rate.References private.currencies.currency_code |
| block_number | bigint | No | Number within the project from the record sequence. The display key is {project_key}-{block_number}, read through app.accommodation_block_display_key. |
| deleted_at | timestamp with time zone | Yes | Soft delete time. A row with deleted_at set is ignored by every access helper. |
| created_at | timestamp with time zone | No | When the row was inserted. Set by the database. |
| created_by | uuid | Yes | Person who inserted the row, or null for a platform process. Set by the database.References app.people.id |
| updated_at | timestamp with time zone | No | When the row last changed. Set by the database. |
| updated_by | uuid | Yes | Person who last changed the row, or null for a platform process. Set by the database.References app.people.id |