hr.employment_relationship_details
Schema: hr
English table: hr.employment_relationship_details
Italian original table: hr.rapporti_det
Description: Time-bound details for an employment relationship, including contractual level, time type and weekly hours (multi-tenant).
Overview
- Columns: 17
- Primary key: id
- Outgoing foreign keys: 5
- Incoming foreign keys: 0
- Indexes: 9
Columns
| English column | Italian original column | Type | Null | Default / Generated | Description |
|---|---|---|---|---|---|
id | id | integer | NO | Surrogate primary key. | |
erd_code | rapd_id | integer | NO | Business identifier for the employment relationship detail (unique per tenant). | |
erd_employment_relationship_id | rapd_rap_id | integer | NO | Employment relationship identifier this detail record refers to. | |
erd_start_date | rapd_data_inizio | date | NO | Start date (inclusive) of the detail validity. | |
erd_job_grade_id | rapd_conq_id | integer | NO | Job grade identifier (qualification) applied during the validity period. | |
erd_job_level_id | rapd_conl_id | integer | NO | Job level identifier applied during the validity period. | |
erd_job_role_id | rapd_conm_id | integer | NO | Job role identifier applied during the validity period. | |
erd_weekly_workable_hours | rapd_ore_lavorabili_settimanali | numeric(6,2) | NO | Weekly workable hours for the employment relationship during the validity period. | |
erd_daily_hours_pattern | rapd_ore_per_giorni | character varying(40) | NO | Serialized daily hours pattern (e.g., hours per day distribution). | |
erd_time_type_id | rapd_tipt_id | integer | NO | Time type identifier (e.g., full-time/part-time classification). | |
erd_part_time_coefficient | rapd_coeff_ptime | numeric(8,4) | NO | Part-time coefficient applied during the validity period. | |
erd_is_on_call | rapd_a_chiamata | boolean | NO | Whether the employment relationship is on-call during the validity period. | |
tenant_id | tenant_id | integer | YES | Tenant identifier. | |
colcustom | colcustom | jsonb | YES | '{}'::jsonb | Custom fields stored as JSON. |
_deleted | _deleted | boolean | YES | false | Soft delete flag (technical). |
erd_end_date | rapd_al | date | YES | End date (inclusive) of the detail validity. | |
erd_valid_period | rapd_periodo | daterange | YES | GENERATED: daterange(erd_start_date, erd_end_date, '[]'::text) | Generated validity period as a daterange derived from start_date and end_date (inclusive). |
Relationships
Outgoing foreign keys
| Constraint | Local columns | References | Referenced columns | On update | On delete |
|---|---|---|---|---|---|
fk_erd_employment_relationship_id | erd_employment_relationship_id, tenant_id | hr.employment_relationships | er_id, tenant_id | RESTRICT | CASCADE |
fk_erd_job_grade_id | erd_job_grade_id, tenant_id | hr.agreement_qualifications | aq_code, tenant_id | RESTRICT | RESTRICT |
fk_erd_job_level_id | erd_job_level_id, tenant_id | hr.agreement_levels | al_code, tenant_id | RESTRICT | RESTRICT |
fk_erd_tenant_id | tenant_id | cloud.tenants | ten_internal_id | RESTRICT | CASCADE |
fk_erd_time_type_id | erd_time_type_id, tenant_id | hr.x_working_time_types | xwtt_id, tenant_id | RESTRICT | RESTRICT |
Referenced by
No incoming foreign keys found.
Constraints
- Primary key:
pk_employment_relationship_details→id - Unique:
uk_erd_code_tenant→erd_code, tenant_id
Indexes
| Name | Unique | Method | Columns / expression |
|---|---|---|---|
idx_erd_tenant | NO | btree | tenant_id |
idx_erd_tenant_code | NO | btree | tenant_id, erd_code) WHERE (_deleted = false |
idx_erd_tenant_empr | NO | btree | tenant_id, erd_employment_relationship_id) WHERE (_deleted = false |
idx_erd_tenant_empr_period_gist | NO | gist | tenant_id, erd_employment_relationship_id, erd_valid_period) WHERE (_deleted = false |
idx_erd_tenant_grade | NO | btree | tenant_id, erd_job_grade_id) WHERE (_deleted = false |
idx_erd_tenant_level | NO | btree | tenant_id, erd_job_level_id) WHERE (_deleted = false |
idx_erd_tenant_period_gist | NO | gist | tenant_id, erd_valid_period) WHERE (_deleted = false |
idx_erd_tenant_role | NO | btree | tenant_id, erd_job_role_id) WHERE (_deleted = false |
idx_erd_tenant_time_type | NO | btree | tenant_id, erd_time_type_id) WHERE (_deleted = false |
Navigation
- Back to main index
- [Back to
hrindex]../)