Skip to main content

pres.long_term_absences

Schema: pres
English table: pres.long_term_absences
Italian original table: pres.giustif
Description: Source table for multi-day absence events. Used to generate daily justification records.

Overview

  • Columns: 21
  • Primary key: id
  • Outgoing foreign keys: 4
  • Incoming foreign keys: 0
  • Indexes: 3

Columns

English columnItalian original columnTypeNullDefault / GeneratedDescription
ididintegerNOIdentifier of the related record.
lta_idarg_idintegerNOUnique identifier for the long-term absence request.
tenant_idtenant_idintegerNOIdentifier of the related tenant.
lta_employment_idarg_rap_idintegerNO0Reference to the employee employment contract.
lta_start_datearg_dalla_datadateNOStart date of the absence event.
lta_end_datearg_alla_datadateNOEnd date of the absence event.
lta_reason_codecod_giucharacter(4)NO''::bpcharReason code (e.g., MATERNITY, SICKNESS, VACATION).
lta_daily_hoursarg_oregiusnumeric(6,2)NO0Daily hours to be justified (if 0, uses theoretical schedule).
lta_sourcearg_provenienzacharacter(2)NO''::bpcharValue of lta source.
lta_is_automaticarg_automaticobooleanNOfalseBoolean flag for lta is automatic.
lta_is_cancelledarg_annullatobooleanNOfalseBoolean flag for lta is cancelled.
lta_start_time_intarg_dalle_orenumeric(4,0)NO0Time associated with lta start time int.
lta_end_time_intarg_alle_orenumeric(4,0)NO0Time associated with lta end time int.
lta_week_days_patternarg_giornicharacter(8)NO''::bpcharBinary string (7 chars) indicating active weekdays (e.g., 1111100 for Mon-Fri).
lta_excluded_dates_jsonarg_cauescltextNO''::textDate associated with lta excluded dates json.
lta_workflow_doc_idarg_mwe_doc_idintegerNO0Identifier of the related lta workflow doc.
lta_document_idarg_doc_idintegerYES0Identifier of the related lta document.
lta_hr_notesarg_note_hrtextYESInternal notes entered by the HR department.
lta_employee_notesarg_note_diptextYESNotes or justifications entered by the employee.
lta_parent_event_idarg_giuma_idintegerYESIdentifier of the related lta parent event.
lta_validity_rangearg_periododaterangeYESGENERATED: daterange(lta_start_date, lta_end_date, '[]'::text)Native daterange for optimized overlap and exclusion queries.

Relationships

Outgoing foreign keys

ConstraintLocal columnsReferencesReferenced columnsOn updateOn delete
fk_giustif_arg_doc_id_to_documentitenant_id, lta_document_idhr.documentstenant_id, doc_idRESTRICTCASCADE
fk_giustif_arg_rap_id_to_rapportitenant_id, lta_employment_idhr.employment_relationshipstenant_id, er_idRESTRICTCASCADE
fk_lta_reason_definitiontenant_id, lta_reason_codepres.attendance_reasonstenant_id, ar_codeCASCADERESTRICT
fk_lta_tenanttenant_idcloud.tenantsten_internal_idCASCADECASCADE

Referenced by

No incoming foreign keys found.

Constraints

  • Primary key: pk_long_term_absencesid
  • Unique: c_uk_lta_id_tenanttenant_id, lta_id

Indexes

NameUniqueMethodColumns / expression
idx_giustif_arg_doc_idNObtreetenant_id, lta_document_id
idx_lta_employment_reason_lookupNObtreetenant_id, lta_employment_id, lta_reason_code
idx_lta_range_gistNOgistlta_validity_range