Schema: hr
English table: hr.business_trip_reasons
Italian original table: hr.in_trasferta_causali
Description: Lookup table for business trip reasons or categories (e.g., Sales, Technical Support, Training).
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 | | Technical primary key (surrogate). |
btrr_id | intrac_id | integer | NO | | Functional identifier for the business trip reason. |
btrr_description | intrac_description | character varying(50) | NO | | Description of the trip reason. |
tenant_id | tenant_id | integer | YES | | Tenant identifier for data isolation. |
colcustom | colcustom | jsonb | YES | '{}'::jsonb | JSON structure for custom fields. |
_deleted | _deleted | boolean | YES | false | Technical soft delete flag. |
Relationships
Outgoing foreign keys
| Constraint | Local columns | References | Referenced columns | On update | On delete |
|---|
fk_business_trip_reasons_tenant | tenant_id | cloud.tenants | ten_internal_id | RESTRICT | CASCADE |
Referenced by
| From table | Foreign key | Source columns | Target columns |
|---|
hr.business_trips | fk_intra_intrac_id | btr_reason_id, tenant_id | btrr_id, tenant_id |
Constraints
- Primary key:
pk_business_trip_reasons → id
- Unique:
uk_business_trip_reasons_btrr_id → btrr_id, tenant_id
Indexes
| Name | Unique | Method | Columns / expression |
|---|
idx_btrr_id_tenant | NO | btree | tenant_id, btrr_id) WHERE (_deleted = false |
idx_btrr_tenant | NO | btree | tenant_id |
Navigation