Skip to main content

hr.customer_projects

Schema: hr
English table: hr.customer_projects
Italian original table: hr.in_commesse
Description: Management of projects or work orders linked to specific customers.

Overview

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

Columns

English columnItalian original columnTypeNullDefault / GeneratedDescription
ididintegerNOTechnical primary key (surrogate).
cpr_idcom_idintegerNOFunctional identifier for the customer project.
cpr_codecom_codecharacter varying(50)NOUnique alphanumeric project code.
cpr_descriptioncom_descriptioncharacter varying(250)NOFull detailed description of the project.
cpr_is_enabledcom_enabledbooleanNOFlag indicating if the project is currently active.
cpr_short_descriptioncom_short_descrcharacter varying(100)NOAbridged version of the project description.
cpr_cust_idcom_incli_idintegerNOReference to the associated customer (cust_id in hr.customers).
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_customer_projects_tenanttenant_idcloud.tenantsten_internal_idRESTRICTCASCADE

Referenced by

From tableForeign keySource columnsTarget columns
hr.business_tripsfk_intra_com_idbtr_cpr_id, tenant_idcpr_id, tenant_id
hr.customer_project_activitiesfk_customer_project_activities_cpr_idcpa_cpr_id, tenant_idcpr_id, tenant_id
hr.customer_project_linksfk_customer_project_links_cpr_idcpl_cpr_id, tenant_idcpr_id, tenant_id

Constraints

  • Primary key: pk_customer_projectsid
  • Unique: uk_customer_projects_cpr_idcpr_id, tenant_id

Indexes

NameUniqueMethodColumns / expression
idx_cpr_cust_id_tenantNObtreetenant_id, cpr_cust_id) WHERE (_deleted = false
idx_cpr_id_tenantNObtreetenant_id, cpr_id) WHERE (_deleted = false
idx_cpr_tenantNObtreetenant_id