Skip to main content

hr.customer_locations

Schema: hr
English table: hr.customer_locations
Italian original table: hr.in_clienti_sedi
Description: Customer locations — sites and branches with operational and geographical data.

Overview

  • Columns: 36
  • Primary key: id
  • Outgoing foreign keys: 2
  • Incoming foreign keys: 2
  • Indexes: 5

Columns

English columnItalian original columnTypeNullDefault / GeneratedDescription
ididintegerNOSurrogate primary key.
cl_idinclise_idintegerNOLogical identifier of the customer location (unique per tenant).
cl_customer_idinclise_incli_idintegerNOReference to the customer.
cl_codeinclise_codicecharacter varying(10)NOLocation code.
cl_nameinclise_ragione_socialecharacter varying(250)NOCustomer location name.
cl_emailinclise_emailcharacter varying(150)NOContact email.
cl_contact_personinclise_referentecharacter varying(100)NOContact person.
cl_phoneinclise_telefonocharacter varying(20)NOContact phone number.
cl_countryinclise_statocharacter varying(100)NOCountry name.
cl_country_codeinclise_sigla_statocharacter varying(2)NOCountry ISO code.
cl_cityinclise_comunecharacter varying(100)NOCity.
cl_provinceinclise_provinciacharacter varying(2)NOProvince.
cl_addressinclise_indirizzocharacter varying(100)NOStreet address.
cl_street_numberinclise_num_civicocharacter varying(20)NOStreet number.
cl_zip_codeinclise_capcharacter varying(20)NOZIP/postal code.
cl_disabledinclise_disabilitatobooleanNOFlag indicating whether the location is disabled.
cl_area_p1_latitudeinclise_p1_latitudinenumeric(19,15)NOLatitude of first point defining the area.
cl_area_p1_longitudeinclise_p1_longitudinenumeric(19,15)NOLongitude of first point defining the area.
cl_area_p2_latitudeinclise_p2_latitudinenumeric(19,15)NOLatitude of second point defining the area.
cl_area_p2_longitudeinclise_p2_longitudinenumeric(19,15)NOLongitude of second point defining the area.
cl_address_latitudeinclise_lat_indirizzonumeric(19,15)NOLatitude of the address.
cl_address_longitudeinclise_lon_indirizzonumeric(19,15)NOLongitude of the address.
cl_radiusinclise_raggiointegerNOGeofencing radius.
cl_manager_report_idinclise_responsabile_rap_idintegerNOReference to the responsible manager report.
cl_closed_frominclise_chiuso_daldateNOClosure start date.
cl_closed_toinclise_chiuso_aldateNOClosure end date.
cl_patron_saint_typeinclise_santo_patrono_tiponumeric(1,0)NOType of patron saint configuration.
cl_patron_saint_dayinclise_santo_patrono_ggnumeric(2,0)NODay of patron saint.
cl_patron_saint_monthinclise_santo_patrono_mesenumeric(2,0)NOMonth of patron saint.
cl_patron_saint_dateinclise_dt_santo_patronodateNOExact date of patron saint.
cl_causal_idinclise_caubol_idcharacter varying(4)NOReference to causal.
cl_travel_justification_codeinclise_cod_giu_viaggiocharacter varying(4)NOTravel justification code.
cl_flat_travel_hoursinclise_v_ore_forfettizzateintegerNOFlat-rate travel hours.
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_cl_customercl_customer_id, tenant_idhr.customerscust_id, tenant_idRESTRICTRESTRICT
fk_tenant_idtenant_idcloud.tenantsten_internal_idRESTRICTCASCADE

Referenced by

From tableForeign keySource columnsTarget columns
hr.business_tripsfk_intra_inclise_idbtr_csl_id, tenant_idcl_id, tenant_id
hr.customer_location_group_assignmentsfk_customer_location_group_assignments_locationclga_customer_location_id, tenant_idcl_id, tenant_id

Constraints

  • Primary key: customer_locations_pkeyid
  • Unique: uk_cl_id_tenantcl_id, tenant_id

Indexes

NameUniqueMethodColumns / expression
idx_customer_locations_cl_causal_id_tenantNObtreetenant_id, cl_causal_id) WHERE (_deleted = false
idx_customer_locations_cl_id_tenantNObtreetenant_id, cl_id) WHERE (_deleted = false
idx_customer_locations_cl_customer_id_tenantNObtreetenant_id, cl_customer_id) WHERE (_deleted = false
idx_customer_locations_cl_manager_report_id_tenantNObtreetenant_id, cl_manager_report_id) WHERE (_deleted = false
idx_customer_locations_tenantNObtreetenant_id