Skip to main content

hr.employee_secondments

Schema: hr
English table: hr.employee_secondments
Italian original table: hr.rapporti_distaccati
Description: Employee secondments — temporary assignments to different roles, locations or companies.

Overview

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

Columns

English columnItalian original columnTypeNullDefault / GeneratedDescription
ididintegerNOSurrogate primary key.
es_idrapdi_idintegerNOLogical identifier of the secondment (unique per tenant).
es_employment_relationship_idrapdi_rap_idintegerNOReference to the employment relationship.
es_secondment_type_idrapdi_xdi_idintegerNOReference to the secondment type.
es_start_daterapdi_daldateNOSecondment start date.
es_end_daterapdi_aldateNOSecondment end date.
tenant_idtenant_idintegerYESTenant identifier for data isolation.
colcustomcolcustomjsonbYES'{}'::jsonbJSON payload containing additional attributes.
_deleted_deletedbooleanYESfalseFlag indicating whether the record is soft-deleted.
es_periodrapdi_periododaterangeYESGENERATED: daterange(es_start_date, es_end_date, '[]'::text)Date range of the secondment.

Relationships

Outgoing foreign keys

ConstraintLocal columnsReferencesReferenced columnsOn updateOn delete
fk_es_employment_relationshipes_employment_relationship_id, tenant_idhr.employment_relationshipser_id, tenant_idRESTRICTCASCADE
fk_es_secondment_typees_secondment_type_id, tenant_idhr.x_secondment_typesxst_id, tenant_idRESTRICTRESTRICT
fk_tenant_idtenant_idcloud.tenantsten_internal_idRESTRICTCASCADE

Referenced by

No incoming foreign keys found.

Constraints

  • Primary key: employee_secondments_pkeyid
  • Unique: uk_es_id_tenantes_id, tenant_id

Indexes

NameUniqueMethodColumns / expression
idx_employee_secondments_es_id_tenantNObtreetenant_id, es_id) WHERE (_deleted = false
idx_employee_secondments_es_employment_relationship_id_tenantNObtreetenant_id, es_employment_relationship_id) WHERE (_deleted = false
idx_employee_secondments_es_secondment_type_id_tenantNObtreetenant_id, es_secondment_type_id) WHERE (_deleted = false
idx_employee_secondments_tenantNObtreetenant_id
idx_employee_secondments_tenant_es_period_gistNOgisttenant_id, es_period) WHERE (_deleted = false
idx_employee_secondments_tenant_es_er_period_gistNOgisttenant_id, es_employment_relationship_id, es_period) WHERE (_deleted = false