Schema: hr
English table: hr.room_types
Italian original table: hr.in_riu_tipo_luogo
Description: Lookup table for room categories (e.g., Meeting Room, Canteen, Shared Desk).
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. |
rt_id | riultl_id | integer | NO | | Unique room type identifier within a tenant. |
rt_description | riultl_descrizione | character varying(50) | NO | | Description of the room type. |
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_rt_tenant | tenant_id | cloud.tenants | ten_internal_id | RESTRICT | CASCADE |
Referenced by
| From table | Foreign key | Source columns | Target columns |
|---|
hr.rooms | fk_rm_room_type | rm_room_type_id, tenant_id | rt_id, tenant_id |
Constraints
- Primary key:
pk_room_types → id
- Unique:
uk_room_types_id → rt_id, tenant_id
Indexes
| Name | Unique | Method | Columns / expression |
|---|
idx_rt_id_tenant | NO | btree | tenant_id, rt_id) WHERE (_deleted = false |
idx_rt_tenant | NO | btree | tenant_id |
Navigation