hr.employment_inail_positions
Schema: hr
English table: hr.employment_inail_positions
Italian original table: hr.rapporti_posizioni_inail
Description: Assignment of INAIL (Italian National Institute for Insurance against Accidents at Work) insurance positions to employment relationships.
Overview
- Columns: 10
- Primary key: id
- Outgoing foreign keys: 3
- Incoming foreign keys: 0
- Indexes: 6
Columns
| English column | Italian original column | Type | Null | Default / Generated | Description |
|---|---|---|---|---|---|
id | id | integer | NO | Internal surrogate primary key. | |
eip_id | rapposina_id | integer | NO | Business identifier for the assignment, unique per tenant. | |
eip_employment_relationship_id | rapposina_rap_id | integer | NO | Reference to the employment relationship. | |
eip_inail_position_id | rapposina_posin_id | integer | NO | Reference to the specific INAIL position code. | |
eip_valid_from | rapposina_dal | date | NO | Start date of the insurance position validity. | |
tenant_id | tenant_id | integer | YES | Tenant identifier for row ownership and RLS filtering. | |
colcustom | colcustom | jsonb | YES | '{}'::jsonb | Custom fields in JSON format. |
_deleted | _deleted | boolean | YES | false | Logical deletion flag. |
eip_valid_to | rapposina_al | date | YES | End date of the insurance position validity. | |
eip_period | rapposina_periodo | daterange | YES | GENERATED: daterange(eip_valid_from, eip_valid_to, '[]'::text) | Temporal range of validity (daterange), generated from start and end dates. |
Relationships
Outgoing foreign keys
| Constraint | Local columns | References | Referenced columns | On update | On delete |
|---|---|---|---|---|---|
fk_eip_employment_relationship | eip_employment_relationship_id, tenant_id | hr.employment_relationships | er_id, tenant_id | RESTRICT | CASCADE |
fk_eip_inail_position | eip_inail_position_id, tenant_id | hr.x_inail_positions | xip_id, tenant_id | RESTRICT | RESTRICT |
fk_eip_tenant | tenant_id | cloud.tenants | ten_internal_id | RESTRICT | CASCADE |
Referenced by
No incoming foreign keys found.
Constraints
- Primary key:
pk_eip→id - Unique:
uk_eip_id_tenant→eip_id, tenant_id
Indexes
| Name | Unique | Method | Columns / expression |
|---|---|---|---|
idx_eip_emp_period_gist | NO | gist | tenant_id, eip_employment_relationship_id, eip_period) WHERE (_deleted = false |
idx_eip_emp_rel_tenant | NO | btree | tenant_id, eip_employment_relationship_id) WHERE (_deleted = false |
idx_eip_id_tenant | NO | btree | tenant_id, eip_id) WHERE (_deleted = false |
idx_eip_inail_pos_tenant | NO | btree | tenant_id, eip_inail_position_id) WHERE (_deleted = false |
idx_eip_period_gist | NO | gist | tenant_id, eip_period) WHERE (_deleted = false |
idx_eip_tenant | NO | btree | tenant_id |
Navigation
- Back to main index
- [Back to
hrindex]../)