Skip to main content

hr.cost_groups

Schema: hr
English table: hr.cost_groups
Italian original table: hr.gruppi_costi
Description: Cost groups for categorizing and organizing costs and expenses. Used to group related costs for reporting, budgeting, and analysis purposes (e.g., "Personnel Costs", "Operational Costs", "Training Costs", "Benefits Costs").

Overview

  • Columns: 7
  • Primary key: id
  • Outgoing foreign keys: 1
  • Incoming foreign keys: 0
  • Indexes: 2

Columns

English columnItalian original columnTypeNullDefault / GeneratedDescription
ididintegerNOPrimary key (internal surrogate ID).
cg_idgrpcos_idintegerNOBusiness identifier for the cost group (unique within tenant).
cg_namegrpcos_denominazionecharacter varying(60)NOCost group name (e.g., "Personnel Costs", "Operational Expenses", "Training & Development").
cg_descriptiongrpcos_descrizionetextNODetailed description of the cost group, explaining what types of costs are included and the purpose of this grouping.
tenant_idtenant_idintegerYESTenant identifier for multi-tenancy (references cloud._tenant).
colcustomcolcustomjsonbYES'{}'::jsonbJSON object for custom fields and tenant-specific extensions.
_deleted_deletedbooleanYESfalseSoft delete flag for technical deletion (not functional cancellation).

Relationships

Outgoing foreign keys

ConstraintLocal columnsReferencesReferenced columnsOn updateOn delete
fk_cg_tenanttenant_idcloud.tenantsten_internal_idRESTRICTCASCADE

Referenced by

No incoming foreign keys found.

Constraints

  • Primary key: pk_cost_groupsid
  • Unique: uk_cost_groups_cg_id_tenantcg_id, tenant_id

Indexes

NameUniqueMethodColumns / expression
idx_cg_tenantNObtreetenant_id
idx_cg_tenant_cg_idNObtreetenant_id, cg_id) WHERE (_deleted = false