pres.attendance_counter_balances
Schema: pres
English table: pres.attendance_counter_balances
Italian original table: pres.tot_numeri
Description: Historical balances, accruals, and usage records for employee attendance counters.
Overview
- Columns: 10
- Primary key: id
- Outgoing foreign keys: 3
- Incoming foreign keys: 0
- Indexes: 3
Columns
| English column | Italian original column | Type | Null | Default / Generated | Description |
|---|---|---|---|---|---|
id | id | integer | NO | Internal surrogate primary key. | |
acb_balance_id | tot_id | integer | NO | Unique business identifier for the balance record. | |
tenant_id | tenant_id | integer | NO | Tenant identifier for data isolation. | |
acb_counter_definition_id | tot_cnt_id | integer | NO | 0 | Reference to the counter type definition (attendance_counter_definitions). |
acb_entry_type | tot_type | character(1) | NO | ''::bpchar | Category of the record: e.g., Initial Balance, Accrual, Usage, Final Balance. |
acb_value | tot_valore | numeric(9,2) | NO | 0 | The numeric value of the counter (hours or days). |
acb_reference_date | tot_data | date | NO | The date the balance or movement refers to (e.g., end of month). | |
acb_is_manual_adjustment | tot_forzato | boolean | NO | false | True if the value was manually overridden by an administrator. |
acb_description | tot_descrizione | character(50) | NO | ''::bpchar | Human-readable description of the balance entry. |
acb_employment_contract_id | tot_rap_id | integer | NO | 0 | Reference to the specific employee contract. |
Relationships
Outgoing foreign keys
| Constraint | Local columns | References | Referenced columns | On update | On delete |
|---|---|---|---|---|---|
fk_acb_counter_definition | tenant_id, acb_counter_definition_id | pres.attendance_counter_definitions | tenant_id, acd_counter_id | CASCADE | CASCADE |
fk_acb_tenant | tenant_id | cloud.tenants | ten_internal_id | CASCADE | CASCADE |
fk_tot_numeri_tot_rap_id_to_rapporti | tenant_id, acb_employment_contract_id | hr.employment_relationships | tenant_id, er_id | RESTRICT | CASCADE |
Referenced by
No incoming foreign keys found.
Constraints
- Primary key:
pk_attendance_counter_balances→id - Unique:
c_uk_acb_tenant_balance_id→tenant_id, acb_balance_id
Indexes
| Name | Unique | Method | Columns / expression |
|---|---|---|---|
idx_acb_tenant_contract_id | NO | btree | tenant_id, acb_employment_contract_id |
idx_acb_tenant_counter_id | NO | btree | tenant_id, acb_counter_definition_id |
idx_acb_tenant_reference_date | NO | btree | tenant_id, acb_reference_date |
Navigation
- Back to main index
- [Back to
presindex]../)