Skip to main content

pres.employee_clockings

Schema: pres
English table: pres.employee_clockings
Italian original table: pres.timbra
Description: Raw and processed employee clock-in/out events from hardware terminals or mobile apps.

Overview

  • Columns: 26
  • Primary key: id
  • Outgoing foreign keys: 3
  • Incoming foreign keys: 0
  • Indexes: 6

Columns

English columnItalian original columnTypeNullDefault / GeneratedDescription
ididintegerNOInternal surrogate primary key.
ec_clocking_idtim_idintegerNOUnique business identifier for the clocking event.
tenant_idtenant_idintegerNOTenant identifier for data isolation.
ec_terminal_codetim_terminalecharacter(4)NO''::bpcharIdentifier of the physical or virtual terminal used.
ec_badge_numbertim_badgecharacter(6)NO''::bpcharThe badge or RF-ID code of the employee.
ec_clocking_datetim_datadateNOActual date of the event as reported by the device.
ec_clocking_time_hhmmtim_oranumeric(4,0)NO0Actual time of the event (format HHMM).
ec_reason_codetim_causalecharacter(4)NO''::bpcharReason code entered during clocking (e.g., business trip, medical).
ec_directiontim_versocharacter(2)NO''::bpcharOriginal direction typed or sensed: E=Entry, U=Exit.
ec_processed_datetim_data_elabdateNOThe date assigned to this clocking by the calculation engine (handling overnight shifts).
ec_processed_directiontim_verso_elabcharacter(2)YES''::bpcharDirection determined by the engine (E=Entry, U=Exit) after shift analysis.
ec_is_excludedtim_esclusabooleanYESfalseIf true, this clocking is bypassed by the calculation engine.
ec_is_manual_correctiontim_correzionebooleanYESfalseTrue if the clocking was manually added or modified by an admin.
ec_source_position_typetim_posiznumeric(1,0)YES0Metadata on how the position was acquired (e.g., 0=GPS, 1=Beacon, etc.).
ec_mobile_app_notetim_app_textcharacter varying(200)YES''::character varyingTextual notes attached to the clocking via the mobile application.
ec_longitudetim_longitudinenumeric(10,8)YES0GPS Longitude coordinate of the event.
ec_latitudetim_latitudinenumeric(10,8)YES0GPS Latitude captured from mobile app.
ec_is_time_confirmedtim_ora_confermatanumeric(1,0)YES0Flag indicating if the time has been validated against a trusted NTP source.
ec_address_confirmed_flagtim_conferma_indirizzonumeric(1,0)YES0Confirmation that the GPS coordinates match a known company address.
ec_document_idtim_doc_idintegerYESOptional reference to a linked document or justification request.
ec_employment_contract_idtim_rap_idintegerNO0Internal reference to the specific employment relationship ID.
ec_point_of_interest_confirmed_flagtim_conferma_puntotimnumeric(1,0)YES0Confirmation that the clocking occurred within a Geofence area.
ec_reference_table_nametim_tab_riferimentocharacter varying(20)YESName of the source table if the clocking was imported.
ec_reference_table_idtim_id_tab_riferimentointegerYESPrimary key value in the reference source table.
ec_requires_verificationtim_da_verificarenumeric(1,0)YES0Flag for clockings that trigger an anomaly or need manager approval.
ec_has_gps_errortim_errore_geolocalizzazionenumeric(1,0)YES0Flag indicating a low-accuracy or spoofed GPS signal.

Relationships

Outgoing foreign keys

ConstraintLocal columnsReferencesReferenced columnsOn updateOn delete
fk_ec_tenanttenant_idcloud.tenantsten_internal_idCASCADERESTRICT
fk_timbra_tim_doc_id_to_documentstenant_id, ec_document_idhr.documentstenant_id, doc_idRESTRICTRESTRICT
fk_timbra_tim_rap_id_to_rapportitenant_id, ec_employment_contract_idhr.employment_relationshipstenant_id, er_idRESTRICTSET DEFAULT

Referenced by

No incoming foreign keys found.

Constraints

  • Primary key: pk_employee_clockingsid
  • Unique: c_uk_ec_clocking_unique_signaturetenant_id, ec_terminal_code, ec_badge_number, ec_clocking_date, ec_clocking_time_hhmm, ec_reason_code, ec_direction
  • Unique: c_uk_ec_tenant_clocking_idtenant_id, ec_clocking_id

Indexes

NameUniqueMethodColumns / expression
idx_ec_tenant_badgeNObtreetenant_id, ec_badge_number
idx_ec_tenant_contract_idNObtreetenant_id, ec_employment_contract_id
idx_ec_tenant_dateNObtreetenant_id, ec_clocking_date
idx_ec_tenant_processed_dateNObtreetenant_id, ec_processed_date
idx_ec_tenant_verification_neededNObtreetenant_id, ec_requires_verification
idx_timbra_tim_doc_idNObtreetenant_id, ec_document_id