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 column | Italian original column | Type | Null | Default / Generated | Description |
|---|---|---|---|---|---|
id | id | integer | NO | Primary key identifier for the person cost record. | |
person_cost_id | anacos_id | integer | NO | Internal reference ID for the person cost entry. | |
person_cost_relationship_id | anacos_rap_id | integer | NO | Foreign key referencing the employment relationship (rapporto) to which this cost applies. | |
person_cost_year_month | anacos_anno_mese | character varying(6) | NO | Year and month of the cost in YYYYMM format. | |
person_cost_element_id | anacos_elec_id | integer | NO | Foreign key referencing the payroll element (elemento retributivo) that defines the cost type. | |
person_cost_amount | anacos_valore | numeric(19,4) | NO | Monetary value of the cost with 4 decimal precision. | |
tenant_id | tenant_id | integer | YES | Multi-tenant isolation column. References cloud._tenant. | |
colcustom | colcustom | jsonb | YES | '{}'::jsonb | JSONB field for custom, tenant‑specific extensions. |
_deleted | _deleted | boolean | YES | false | Soft‑delete flag. When true, the record is considered logically deleted. |
Relationships
Outgoing foreign keys
| Constraint | Local columns | References | Referenced columns | On update | On delete |
|---|---|---|---|---|---|
fk_person_costs_tenant | tenant_id | cloud.tenants | ten_internal_id | RESTRICT | CASCADE |
Referenced by
No incoming foreign keys found.
Constraints
- Primary key:
pk_person_costs→id - Unique:
uk_person_costs_person_cost_tenant→person_cost_id, tenant_id
Indexes
| Name | Unique | Method | Columns / expression |
|---|---|---|---|
idx_prc_tenant | NO | btree | tenant_id |
idx_prc_tenant_person_cost | NO | btree | tenant_id, person_cost_id) WHERE (_deleted = false |
idx_prc_tenant_relationship | NO | btree | tenant_id, person_cost_relationship_id) WHERE (_deleted = false |
Navigation
- Back to main index
- [Back to
hrindex]../)