Skip to main content

Attendance Punch Storage

Summary

Punches are independent tenant-scoped aggregates that contribute to an employee’s daily Attendance calculation.

Audience

  • Backend developers, QA engineers, Time Office implementers, and support engineers

Reference Content

Storage behavior

AttendancePunchRecord persists employee reference, punch type, timestamp, capture mode, note, computed work/overtime/deduction values, late minutes, approval flag, and workflow status. Type is free text; current workflow logic interprets values containing in/out semantics. Capture mode is also stored as text.

The tenant/employee/time index supports chronological lookup. Repository reads order punches by timestamp. There is no database foreign key to the daily record, no sequence column, and no unique constraint preventing duplicate timestamps or repeated types. Consequently:

  • chronological query order is confirmed;
  • uniqueness and multi-punch ordering beyond timestamp are Not implemented as database constraints;
  • correction replaces no stored punch: approval and rejection change state;
  • cascade behavior does not apply because no relationship is modeled.

Detailed device or biometric capture is outside the confirmed model.

Source References

  • microservices/src/attendance-service/Domain/Attendance/AttendancePunchRecord.cs
  • microservices/src/attendance-service/Infrastructure/AttendanceDbContext.cs
  • microservices/src/attendance-service/Infrastructure/Persistence.cs
  • microservices/src/attendance-service/Application/Services/PunchWorkflow.cs

See Also

Keywords

  • Attendance persistence
  • EF Core
  • PostgreSQL

Revision Information

  • Status: Draft
  • Last reviewed: 2026-07-15
  • Review cycle: Quarterly