Schema: hr
English table: hr.room_booking_statuses
Italian original table: hr.in_riu_prenotazioni_status
Description: Lookup table for room reservation statuses (e.g., Pending, Confirmed, Cancelled).
Overview
- Columns: 6
- Primary key: id
- Outgoing foreign keys: 1
- Incoming foreign keys: 1
- Indexes: 2
Columns
| English column | Italian original column | Type | Null | Default / Generated | Description |
|---|
id | id | integer | NO | | Surrogate primary key. |
rbs_id | riulps_id | integer | NO | | Unique status identifier within a tenant. |
rbs_description | riulps_descrizione | character varying(50) | NO | | Human-readable description of the status. |
tenant_id | tenant_id | integer | YES | | Tenant identifier for data isolation. |
colcustom | colcustom | jsonb | YES | '{}'::jsonb | JSON payload containing additional attributes. |
_deleted | _deleted | boolean | YES | false | Flag indicating whether the record is soft-deleted. |
Relationships
Outgoing foreign keys
| Constraint | Local columns | References | Referenced columns | On update | On delete |
|---|
fk_rbs_tenant | tenant_id | cloud.tenants | ten_internal_id | RESTRICT | CASCADE |
Referenced by
| From table | Foreign key | Source columns | Target columns |
|---|
hr.room_bookings | fk_rb_status | rb_status_id, tenant_id | rbs_id, tenant_id |
Constraints
- Primary key:
pk_room_booking_statuses → id
- Unique:
uk_room_booking_statuses_id → rbs_id, tenant_id
Indexes
| Name | Unique | Method | Columns / expression |
|---|
idx_rbs_id_tenant | NO | btree | tenant_id, rbs_id) WHERE (_deleted = false |
idx_rbs_tenant | NO | btree | tenant_id |
Navigation