pres.weekly_justification_aggregates
Schema: pres
English table: pres.weekly_justification_aggregates
Italian original table: pres.giust_sett
Description: Weekly aggregates of absence and leave reasons, used for compliance checks and reporting.
Overview
- Columns: 7
- Primary key: id
- Outgoing foreign keys: 3
- Incoming foreign keys: 0
- Indexes: 2
Columns
| English column | Italian original column | Type | Null | Default / Generated | Description |
|---|
id | id | integer | NO | | Identifier of the related record. |
wja_id | gis_id | integer | NO | | Unique ID for the weekly aggregate. |
tenant_id | tenant_id | integer | NO | | Identifier of the related tenant. |
wja_employment_id | gis_rap_id | integer | NO | 0 | Reference to the employee employment contract. |
wja_reference_date | gis_data | date | NO | | Reference date for the week (usually the Monday). |
wja_reason_code | gis_cod_giust | character(4) | NO | ''::bpchar | The justification code being aggregated. |
wja_total_hours | gis_ore_giust | numeric(10,2) | NO | 0 | Sum of total hours for the specific reason within the week. |
Relationships
Outgoing foreign keys
| Constraint | Local columns | References | Referenced columns | On update | On delete |
|---|
fk_giust_sett_gis_rap_id_to_rapporti | tenant_id, wja_employment_id | hr.employment_relationships | tenant_id, er_id | RESTRICT | CASCADE |
fk_wja_reason_definition | tenant_id, wja_reason_code | pres.attendance_reasons | tenant_id, ar_code | CASCADE | RESTRICT |
fk_wja_tenant | tenant_id | cloud.tenants | ten_internal_id | CASCADE | CASCADE |
Referenced by
No incoming foreign keys found.
Constraints
- Primary key:
pk_weekly_justification_aggregates → id
- Unique:
c_uk_wja_id_tenant → tenant_id, wja_id
Indexes
| Name | Unique | Method | Columns / expression |
|---|
idx_wja_date_reason_lookup | NO | btree | tenant_id, wja_reference_date, wja_reason_code |
idx_wja_employment_date_lookup | NO | btree | tenant_id, wja_employment_id, wja_reference_date |
Navigation