Skip to main content

pres.shift_flexibility_rules

Schema: pres
English table: pres.shift_flexibility_rules
Italian original table: pres.orari_flex
Description: Extension table for shifts defining flexibility windows and mandatory presence slots.

Overview

  • Columns: 19
  • Primary key: id
  • Outgoing foreign keys: 2
  • Incoming foreign keys: 0
  • Indexes: 1

Columns

English columnItalian original columnTypeNullDefault / GeneratedDescription
ididintegerNOPrimary Key.
sfr_flex_idoraf_idintegerNOInternal flexibility configuration identifier.
tenant_idtenant_idintegerNOTenant identifier for data isolation.
sfr_is_enabledoraf_enabledbooleanYESfalseFlag to activate the flexibility rules for the shift.
sfr_shift_idoraf_ora_idintegerYES0Reference to the parent shift definition.
sfr_mandatory_start_p1oraf_t1_obnumeric(4,0)YES0Start time of the mandatory presence window for period 1 (HHMM).
sfr_mandatory_end_p1oraf_t2_obnumeric(4,0)YES0End time of the mandatory presence window for period 1 (HHMM).
sfr_mandatory_start_p2oraf_t3_obnumeric(4,0)YES0Start time of the mandatory presence window for period 2 (HHMM).
sfr_mandatory_end_p2oraf_t4_obnumeric(4,0)YES0End time of the mandatory presence window for period 2 (HHMM).
sfr_min_ordinary_minutesoraf_min_ordinnumeric(3,0)YES0Minimum minutes to be considered as an ordinary workday.
sfr_max_ordinary_minutesoraf_max_ordinnumeric(3,0)YES0Maximum minutes to be considered as an ordinary workday.
sfr_is_flexibility_enabledoraf_flex_enabledbooleanYESfalseGeneral toggle for flexibility management.
sfr_flex_justification_code_1oraf_flex_caus1character varying(4)YES''::character varyingPrimary justification code used for flexible time entries.
sfr_flex_justification_code_2oraf_flex_caus2character varying(4)YES''::character varyingSecondary justification code used for flexible time entries.
sfr_enable_flex_anomaly_checkoraf_flex_anabooleanYESfalseIf true, triggers anomalies when flexibility limits are exceeded.
sfr_max_flex_minutesoraf_flex_minutinumeric(4,0)YES0Maximum allowed minutes for flexible entry/exit.
sfr_absence_calculation_modeoraf_modo_assenzanumeric(1,0)YES0Logic for calculating absence hours (e.g., based on theoretical vs mandatory).
sfr_slot_type_control_modeoraf_ctrl_tipo_fascianumeric(1,0)NO1Control mode for time slot classification (Standard, Special, etc.).
sfr_mandatory_from_first_punchoraf_obb_dalla_primabooleanNOfalseIf true, the mandatory window is calculated relative to the first actual punch of the day.

Relationships

Outgoing foreign keys

ConstraintLocal columnsReferencesReferenced columnsOn updateOn delete
fk_sfr_shift_definitionstenant_id, sfr_shift_idpres.shift_definitionstenant_id, shd_idCASCADECASCADE
fk_sfr_tenanttenant_idcloud.tenantsten_internal_idCASCADECASCADE

Referenced by

No incoming foreign keys found.

Constraints

  • Primary key: pk_shift_flexibility_rulesid
  • Unique: c_uk_sfr_tenant_flex_idtenant_id, sfr_flex_id
  • Unique: c_uk_sfr_tenant_shift_idtenant_id, sfr_shift_id

Indexes

NameUniqueMethodColumns / expression
idx_orari_flex_tenant_oraNObtreetenant_id, sfr_shift_id