Skip to main content

hr.customers

Schema: hr
English table: hr.customers
Italian original table: hr.in_clienti
Description: Registry of company customers and their master data.

Overview

  • Columns: 27
  • Primary key: id
  • Outgoing foreign keys: 1
  • Incoming foreign keys: 5
  • Indexes: 3

Columns

English columnItalian original columnTypeNullDefault / GeneratedDescription
ididintegerNOTechnical primary key (surrogate).
cust_idincli_idintegerNOFunctional identifier used for foreign key relationships.
cust_codeincli_codicecharacter varying(10)NOUnique alphanumeric code for the customer.
cust_business_nameincli_ragione_socialecharacter varying(250)NOFull legal or commercial name of the customer.
cust_vat_numberincli_partita_ivacharacter varying(20)NOVAT registration number or tax ID.
cust_emailincli_emailcharacter varying(150)NOPrimary contact email address.
cust_contact_personincli_referentecharacter varying(100)NOName of the main contact person/referent.
cust_phoneincli_telefonocharacter varying(20)NOPrimary contact telephone number.
cust_countryincli_statocharacter varying(100)NOFull name of the country.
cust_cityincli_comunecharacter varying(100)NOName of the municipality or city.
cust_provinceincli_provinciacharacter varying(2)NOProvince or state abbreviation.
cust_addressincli_indirizzocharacter varying(100)NOStreet name or road.
cust_house_numberincli_numero_civicocharacter varying(20)NOBuilding or street number.
cust_zip_codeincli_capcharacter varying(20)NOPostal/Zip code.
cust_country_codeincli_stato_siglacharacter varying(2)NOTwo-letter ISO country code.
cust_is_enabledincli_enabledbooleanNOFlag indicating if the customer is active in the system.
cust_p1_latitudeincli_p1_latitudinenumeric(19,15)NOLatitude for geofencing boundary point 1.
cust_p1_longitudeincli_p1_longitudinenumeric(19,15)NOLongitude for geofencing boundary point 1.
cust_p2_latitudeincli_p2_latitudinenumeric(19,15)NOLatitude for geofencing boundary point 2.
cust_p2_longitudeincli_p2_longitudinenumeric(19,15)NOLongitude for geofencing boundary point 2.
cust_address_latitudeincli_lat_indirizzonumeric(19,15)NOLatitude coordinate of the specific address.
cust_address_longitudeincli_lon_indirizzonumeric(19,15)NOLongitude coordinate of the specific address.
cust_geofence_radiusincli_raggiointegerNORadius in meters for the geofencing area.
cust_account_manager_idincli_responsabile_rap_idintegerNOReference to the internal person responsible for the customer relationship.
tenant_idtenant_idintegerYESTenant identifier for data isolation.
colcustomcolcustomjsonbYES'{}'::jsonbJSON structure for custom fields.
_deleted_deletedbooleanYESfalseTechnical soft delete flag.

Relationships

Outgoing foreign keys

ConstraintLocal columnsReferencesReferenced columnsOn updateOn delete
fk_customers_tenanttenant_idcloud.tenantsten_internal_idRESTRICTCASCADE

Referenced by

From tableForeign keySource columnsTarget columns
hr.business_tripsfk_intra_incli_idbtr_cust_id, tenant_idcust_id, tenant_id
hr.customer_employment_linksfk_customer_employment_links_customercel_customer_id, tenant_idcust_id, tenant_id
hr.customer_group_assignmentsfk_customer_group_assignments_customercga_customer_id, tenant_idcust_id, tenant_id
hr.customer_profora_assignmentsfk_customer_profora_assignments_customercha_customer_id, tenant_idcust_id, tenant_id
hr.in_clienti_sedifk_incli_idinclise_incli_id, tenant_idcust_id, tenant_id

Constraints

  • Primary key: pk_customersid
  • Unique: uk_customers_cust_idcust_id, tenant_id

Indexes

NameUniqueMethodColumns / expression
idx_cust_id_tenantNObtreetenant_id, cust_id) WHERE (_deleted = false
idx_cust_manager_id_tenantNObtreetenant_id, cust_account_manager_id) WHERE (_deleted = false
idx_cust_tenantNObtreetenant_id