Schema: hr
English table: hr.cost_group_details
Italian original table: hr.gruppi_costi_det
Description: Cost group detail records linking cost groups to elements and their hierarchical relationships.
Overview
- Columns: 8
- Primary key: id
- Outgoing foreign keys: 1
- Incoming foreign keys: 0
- Indexes: 5
Columns
| English column | Italian original column | Type | Null | Default / Generated | Description |
|---|
id | id | integer | NO | | Primary key of the record. |
cgdet_id | grpcosd_id | integer | NO | | Business identifier of the cost group detail, unique within the tenant. |
cgdet_cost_group_id | grpcos_id | integer | NO | | Reference to the cost group this detail belongs to. |
cgdet_element_id | grpcosd_elec_id | integer | NO | | Identifier of the element associated with the cost group detail. |
cgdet_parent_element_id | grpcosd_elec_father_id | integer | NO | | Identifier of the parent element in the hierarchy. |
tenant_id | tenant_id | integer | YES | | Tenant identifier for row-level partitioning. |
colcustom | colcustom | jsonb | YES | '{}'::jsonb | Custom fields in JSON format. |
_deleted | _deleted | boolean | YES | false | Soft delete flag. |
Relationships
Outgoing foreign keys
| Constraint | Local columns | References | Referenced columns | On update | On delete |
|---|
fk_cost_group_details_tenant_id | tenant_id | cloud.tenants | ten_internal_id | RESTRICT | CASCADE |
Referenced by
No incoming foreign keys found.
Constraints
- Primary key:
pk_cost_group_details → id
- Unique:
uk_cost_group_details_cgdet_id → cgdet_id, tenant_id
Indexes
| Name | Unique | Method | Columns / expression |
|---|
idx_cgdet_tenant | NO | btree | tenant_id |
idx_cgdet_tenant_cgdet | NO | btree | tenant_id, cgdet_id) WHERE (_deleted = false |
idx_cgdet_tenant_cost_group | NO | btree | tenant_id, cgdet_cost_group_id) WHERE (_deleted = false |
idx_cgdet_tenant_element | NO | btree | tenant_id, cgdet_element_id) WHERE (_deleted = false |
idx_cgdet_tenant_parent_element | NO | btree | tenant_id, cgdet_parent_element_id) WHERE (_deleted = false |
Navigation