Skip to main content

hr.person_costs

Schema: hr
English table: hr.person_costs
Italian original table: hr.ana_costi
Description: Stores person-related costs, typically linked to employment relationships and payroll elements.

Overview

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

Columns

English columnItalian original columnTypeNullDefault / GeneratedDescription
ididintegerNOPrimary key identifier for the person cost record.
person_cost_idanacos_idintegerNOInternal reference ID for the person cost entry.
person_cost_relationship_idanacos_rap_idintegerNOForeign key referencing the employment relationship (rapporto) to which this cost applies.
person_cost_year_monthanacos_anno_mesecharacter varying(6)NOYear and month of the cost in YYYYMM format.
person_cost_element_idanacos_elec_idintegerNOForeign key referencing the payroll element (elemento retributivo) that defines the cost type.
person_cost_amountanacos_valorenumeric(19,4)NOMonetary value of the cost with 4 decimal precision.
tenant_idtenant_idintegerYESMulti-tenant isolation column. References cloud._tenant.
colcustomcolcustomjsonbYES'{}'::jsonbJSONB field for custom, tenant‑specific extensions.
_deleted_deletedbooleanYESfalseSoft‑delete flag. When true, the record is considered logically deleted.

Relationships

Outgoing foreign keys

ConstraintLocal columnsReferencesReferenced columnsOn updateOn delete
fk_person_costs_tenanttenant_idcloud.tenantsten_internal_idRESTRICTCASCADE

Referenced by

No incoming foreign keys found.

Constraints

  • Primary key: pk_person_costsid
  • Unique: uk_person_costs_person_cost_tenantperson_cost_id, tenant_id

Indexes

NameUniqueMethodColumns / expression
idx_prc_tenantNObtreetenant_id
idx_prc_tenant_person_costNObtreetenant_id, person_cost_id) WHERE (_deleted = false
idx_prc_tenant_relationshipNObtreetenant_id, person_cost_relationship_id) WHERE (_deleted = false