Skip to main content

hr.company_work_sites

Schema: hr
English table: hr.company_work_sites
Italian original table: hr.sedi_link
Description: Many-to-many relationship mapping between legal companies and their operational work sites/branches.

Overview

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

Columns

English columnItalian original columnTypeNullDefault / GeneratedDescription
ididintegerNOSurrogate primary key.
cws_idsedel_idintegerNOIdentifier of the related cws record.
cws_work_site_idsedel_sede_idintegerNOReference to the operational work site.
cws_company_idsedel_az_idintegerNOReference to the legal company entity.
tenant_idtenant_idintegerYESTenant identifier for data isolation.
colcustomcolcustomjsonbYES'{}'::jsonbJSON payload containing additional attributes.
_deleted_deletedbooleanYESfalseFlag indicating whether the record is soft-deleted.

Relationships

Outgoing foreign keys

ConstraintLocal columnsReferencesReferenced columnsOn updateOn delete
fk_sedel_az_idcws_company_id, tenant_idhr.companiescmp_id, tenant_idRESTRICTRESTRICT
fk_sedel_sede_idcws_work_site_id, tenant_idhr.work_sitessede_id, tenant_idRESTRICTRESTRICT
fk_tenant_idtenant_idcloud.tenantsten_internal_idRESTRICTCASCADE

Referenced by

No incoming foreign keys found.

Constraints

  • Primary key: pk_company_work_sitesid
  • Unique: uk_cws_id_tenantcws_id, tenant_id

Indexes

NameUniqueMethodColumns / expression
idx_cws_company_tenantNObtreetenant_id, cws_company_id) WHERE (_deleted = false
idx_cws_id_tenantNObtreetenant_id, cws_id) WHERE (_deleted = false
idx_cws_tenantNObtreetenant_id
idx_cws_work_site_tenantNObtreetenant_id, cws_work_site_id) WHERE (_deleted = false