Skip to main content

hr.customer_employment_links

Schema: hr
English table: hr.customer_employment_links
Italian original table: hr.in_clienti_link
Description: Links employees (employment relationships) to customers for a specific time period.

Overview

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

Columns

English columnItalian original columnTypeNullDefault / GeneratedDescription
ididintegerNOInternal surrogate primary key.
cel_idinclil_idintegerNOUnique identifier for the link record within a tenant.
cel_customer_idinclil_incli_idintegerNOReference to the customer (hr.customers).
cel_employment_relationship_idinclil_rap_idintegerNOReference to the employee relationship (hr.employment_relationships).
cel_valid_frominclil_daldateNOStart date of the assignment.
cel_valid_toinclil_aldateNOEnd date of the assignment.
tenant_idtenant_idintegerYESTenant identifier for data isolation.
colcustomcolcustomjsonbYES'{}'::jsonbJSON field for custom data.
_deleted_deletedbooleanYESfalseTechnical soft delete flag.
cel_validity_periodinclil_periododaterangeYESGENERATED: daterange(cel_valid_from, cel_valid_to, '[]'::text)Generated daterange for the assignment validity.

Relationships

Outgoing foreign keys

ConstraintLocal columnsReferencesReferenced columnsOn updateOn delete
fk_customer_employment_links_customercel_customer_id, tenant_idhr.customerscust_id, tenant_idRESTRICTRESTRICT
fk_customer_employment_links_employmentcel_employment_relationship_id, tenant_idhr.employment_relationshipser_id, tenant_idRESTRICTCASCADE
fk_customer_employment_links_tenanttenant_idcloud.tenantsten_internal_idRESTRICTCASCADE

Referenced by

No incoming foreign keys found.

Constraints

  • Primary key: pk_customer_employment_linksid
  • Unique: uk_customer_employment_links_idcel_id, tenant_id

Indexes

NameUniqueMethodColumns / expression
idx_cel_customer_tenantNObtreetenant_id, cel_customer_id) WHERE (_deleted = false
idx_cel_employment_tenantNObtreetenant_id, cel_employment_relationship_id) WHERE (_deleted = false
idx_cel_id_tenantNObtreetenant_id, cel_id) WHERE (_deleted = false
idx_cel_tenantNObtreetenant_id
idx_cel_tenant_customer_period_gistNOgisttenant_id, cel_customer_id, cel_validity_period) WHERE (_deleted = false
idx_cel_tenant_employment_period_gistNOgisttenant_id, cel_employment_relationship_id, cel_validity_period) WHERE (_deleted = false
idx_cel_tenant_period_gistNOgisttenant_id, cel_validity_period) WHERE (_deleted = false