hr.room_bookings
Schema: hr
English table: hr.room_bookings
Italian original table: hr.in_riu_prenotazioni
Description: Records of actual room and shared space bookings/reservations.
Overview
- Columns: 20
- Primary key: id
- Outgoing foreign keys: 5
- Incoming foreign keys: 0
- Indexes: 7
Columns
| English column | Italian original column | Type | Null | Default / Generated | Description |
|---|---|---|---|---|---|
id | id | integer | NO | Surrogate primary key. | |
rb_id | riupre_id | integer | NO | Identifier of the related rb record. | |
rb_room_id | riupre_riul_id | integer | NO | Identifier of the related rb room record. | |
rb_booked_at_timestamp | riupre_dt_pre | character varying(14) | NO | Timestamp associated with the record. | |
rb_person_id | riupre_ana_id | integer | NO | Identifier of the related rb person record. | |
rb_description | riupre_nome | character varying(50) | NO | A label or title for the booking (e.g., meeting subject). | |
rb_manager_person_id | riupre_gest_ana_id | integer | NO | Identifier of the related rb manager person record. | |
rb_date | riupre_data | date | NO | Date associated with the record. | |
rb_start_time | riupre_dalle_ore | integer | NO | Numeric value. | |
rb_end_time | riupre_alle_ore | integer | NO | Numeric value. | |
rb_status_id | riupre_status | integer | NO | Reference to the booking status (Confirmed, Pending, Cancelled, etc.). | |
rb_rescheduled_date | riupre_data_spostata | date | NO | New date if the original booking was moved. | |
rb_rescheduled_start_time | riupre_dalle_ore_spostato | numeric(4,0) | NO | Rb rescheduled start time. | |
rb_rescheduled_end_time | riupre_alle_ore_spostato | numeric(4,0) | NO | Rb rescheduled end time. | |
rb_timeslot_definition_id | riupre_riuf_id | integer | NO | Identifier of the related rb timeslot definition record. | |
rb_rescheduled_timeslot_id | riupre_riuf_id_spostato | integer | NO | Identifier of the related rb rescheduled timeslot record. | |
rb_canteen_reference_person_id | riupre_mensa_ana_id | integer | NO | Identifier of the related rb canteen reference person record. | |
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_rb_rescheduled_timeslot | rb_rescheduled_timeslot_id, tenant_id | hr.rooms_timeslot_definitions | rtd_id, tenant_id | RESTRICT | RESTRICT |
fk_rb_room | rb_room_id, tenant_id | hr.rooms | rm_id, tenant_id | RESTRICT | RESTRICT |
fk_rb_status | rb_status_id, tenant_id | hr.room_booking_statuses | rbs_id, tenant_id | RESTRICT | RESTRICT |
fk_rb_tenant | tenant_id | cloud.tenants | ten_internal_id | RESTRICT | CASCADE |
fk_rb_timeslot | rb_timeslot_definition_id, tenant_id | hr.rooms_timeslot_definitions | rtd_id, tenant_id | RESTRICT | RESTRICT |
Referenced by
No incoming foreign keys found.
Constraints
- Primary key:
pk_room_bookings→id - Unique:
uk_room_bookings_id→rb_id, tenant_id
Indexes
| Name | Unique | Method | Columns / expression |
|---|---|---|---|
idx_rb_canteen_ref_tenant | NO | btree | tenant_id, rb_canteen_reference_person_id) WHERE (_deleted = false |
idx_rb_id_tenant | NO | btree | tenant_id, rb_id) WHERE (_deleted = false |
idx_rb_manager_tenant | NO | btree | tenant_id, rb_manager_person_id) WHERE (_deleted = false |
idx_rb_person_tenant | NO | btree | tenant_id, rb_person_id) WHERE (_deleted = false |
idx_rb_room_tenant | NO | btree | tenant_id, rb_room_id) WHERE (_deleted = false |
idx_rb_tenant | NO | btree | tenant_id |
idx_rb_timeslot_tenant | NO | btree | tenant_id, rb_timeslot_definition_id) WHERE (_deleted = false |
Navigation
- Back to main index
- [Back to
hrindex]../)