pres.employee_leave_balances
Schema: pres
English table: pres.employee_leave_balances
Italian original table: pres.progressivi
Description: Historical balances and snapshots for employee leave (vacation, PTO, and other time-off types).
Overview
- Columns: 8
- Primary key: id
- Outgoing foreign keys: 2
- Incoming foreign keys: 0
- Indexes: 3
Columns
| English column | Italian original column | Type | Null | Default / Generated | Description |
|---|
id | id | integer | NO | | Primary Key. |
elb_balance_id | prog_id | integer | NO | | Internal unique identifier for the leave balance record. |
tenant_id | tenant_id | integer | NO | | Tenant identifier for data isolation. |
elb_reference_date | prog_data | date | NO | | Reference date (snapshot date) for the leave balance. |
elb_leave_type_code | prog_codice | character(3) | NO | ''::bpchar | Code identifying the type of leave (e.g., FER, PER). |
elb_value | prog_valore | numeric(9,2) | NO | 0 | The numeric value of the balance (accrued or remaining) at the reference date. |
elb_employee_id | prog_rap_id | integer | NO | 0 | Foreign key to the employee or employment relationship record. |
elb_is_manual_override | prog_forzato | boolean | NO | false | Flag indicating if the value was manually forced/overridden. |
Relationships
Outgoing foreign keys
| Constraint | Local columns | References | Referenced columns | On update | On delete |
|---|
fk_elb_tenant | tenant_id | cloud.tenants | ten_internal_id | CASCADE | CASCADE |
fk_progressivi_prog_rap_id_to_rapporti | tenant_id, elb_employee_id | hr.employment_relationships | tenant_id, er_id | RESTRICT | CASCADE |
Referenced by
No incoming foreign keys found.
Constraints
- Primary key:
pk_employee_leave_balances → id
- Unique:
c_uk_elb_tenant_balance → tenant_id, elb_balance_id
Indexes
| Name | Unique | Method | Columns / expression |
|---|
idx_elb_tenant_employee_id | NO | btree | tenant_id, elb_employee_id |
idx_elb_tenant_leave_type_code | NO | btree | tenant_id, elb_leave_type_code |
idx_elb_tenant_reference_date | NO | btree | tenant_id, elb_reference_date |
Navigation