Skip to main content

hr.employment_special_regulation_assignments

Schema: hr
English table: hr.employment_special_regulation_assignments
Italian original table: hr.rapporti_leggi_speciali
Description: Links employment relationships to special regulations (laws, benefits, exemptions) within specific timeframes.

Overview

  • Columns: 10
  • Primary key: id
  • Outgoing foreign keys: 3
  • Incoming foreign keys: 0
  • Indexes: 6

Columns

English columnItalian original columnTypeNullDefault / GeneratedDescription
ididintegerNOInternal surrogate primary key.
esra_idraplegspe_idintegerNOBusiness identifier for the assignment, unique per tenant.
esra_employment_relationship_idraplegspe_rap_idintegerNOReference to the employment relationship.
esra_special_regulation_idraplegspe_legspe_idintegerNOReference to the specific regulation applied.
esra_valid_fromraplegspe_daldateNOStart date of the regulation application.
esra_valid_toraplegspe_aldateNOEnd date of the regulation application.
tenant_idtenant_idintegerYESTenant identifier for row ownership and RLS filtering.
colcustomcolcustomjsonbYES'{}'::jsonbCustom fields in JSON format.
_deleted_deletedbooleanYESfalseLogical deletion flag.
esra_periodraplegspe_periododaterangeYESGENERATED: daterange(esra_valid_from, esra_valid_to, '[]'::text)Temporal range (daterange) of validity, generated from start and end dates.

Relationships

Outgoing foreign keys

ConstraintLocal columnsReferencesReferenced columnsOn updateOn delete
fk_esra_employment_relationshipesra_employment_relationship_id, tenant_idhr.employment_relationshipser_id, tenant_idRESTRICTCASCADE
fk_esra_special_regulationesra_special_regulation_id, tenant_idhr.special_regulationsregulation_code_id, tenant_idRESTRICTRESTRICT
fk_esra_tenanttenant_idcloud.tenantsten_internal_idRESTRICTCASCADE

Referenced by

No incoming foreign keys found.

Constraints

  • Primary key: pk_esraid
  • Unique: uk_esra_id_tenantesra_id, tenant_id

Indexes

NameUniqueMethodColumns / expression
idx_esra_emp_period_gistNOgisttenant_id, esra_employment_relationship_id, esra_period) WHERE (_deleted = false
idx_esra_emp_rel_tenantNObtreetenant_id, esra_employment_relationship_id) WHERE (_deleted = false
idx_esra_id_tenantNObtreetenant_id, esra_id) WHERE (_deleted = false
idx_esra_period_gistNOgisttenant_id, esra_period) WHERE (_deleted = false
idx_esra_spec_reg_tenantNObtreetenant_id, esra_special_regulation_id) WHERE (_deleted = false
idx_esra_tenantNObtreetenant_id