hr.expense_note_travel_mean_custom_fields
Schema: hr
English table: hr.expense_note_travel_mean_custom_fields
Italian original table: hr.in_notaspese_mezzi_fieldcustom
Description: Bridge table that assigns/whitelists custom fields to specific expense note travel means.
Overview
- Columns: 7
- Primary key: id
- Outgoing foreign keys: 2
- Incoming foreign keys: 0
- Indexes: 4
Columns
| English column | Italian original column | Type | Null | Default / Generated | Description |
|---|
id | id | integer | NO | | Surrogate primary key. |
entmcf_id | nsmf_id | integer | NO | | Logical bridge row identifier (unique per tenant). |
entmcf_entm_id | nsmf_nsm_id | integer | NO | | Reference to the travel mean (expense_note_travel_means.entm_id). |
entmcf_custom_field_id | nsmf_cfield_id | integer | NO | | Reference to the custom field identifier (from the application custom fields catalog). |
tenant_id | tenant_id | integer | YES | | Tenant identifier for data isolation. |
colcustom | colcustom | jsonb | YES | '{}'::jsonb | Custom fields container (JSON). |
_deleted | _deleted | boolean | YES | false | Technical soft delete flag. FALSE = active, TRUE = hidden (not a functional deletion). |
Relationships
Outgoing foreign keys
| Constraint | Local columns | References | Referenced columns | On update | On delete |
|---|
fk_entmcf_tenant | tenant_id | cloud.tenants | ten_internal_id | RESTRICT | CASCADE |
fk_entmcf_travel_mean | entmcf_entm_id, tenant_id | hr.expense_note_travel_means | entm_id, tenant_id | RESTRICT | RESTRICT |
Referenced by
No incoming foreign keys found.
Constraints
- Primary key:
pk_expense_note_travel_mean_custom_fields → id
- Unique:
uk_entmcf_id_tenant → entmcf_id, tenant_id
Indexes
| Name | Unique | Method | Columns / expression |
|---|
idx_entmcf_tenant_custom_field | NO | btree | tenant_id, entmcf_custom_field_id) WHERE (_deleted = false |
idx_entmcf_tenant_entm | NO | btree | tenant_id, entmcf_entm_id) WHERE (_deleted = false |
idx_expense_note_travel_mean_custom_fields_tenant | NO | btree | tenant_id |
idx_expense_note_travel_mean_custom_fields_tenant_entmcf_id | NO | btree | tenant_id, entmcf_id) WHERE (_deleted = false |
Navigation