Attendance
Purpose
The Attendance domain manages student attendance tracking and attendance event processing.
Attendance is modeled using two layers:
- Attendance Event
- Attendance
Attendance Events represent raw attendance signals.
Attendance represents the official attendance record used for academic and administrative purposes.
This design supports:
- Manual Attendance
- NFC Attendance
- RFID Attendance
- QR Attendance
- Biometric Attendance
- Attendance Imports
without changing the Attendance model.
Business Context
Schools may capture attendance through different mechanisms.
Examples:
- Teacher marking attendance manually
- Student NFC card scans
- RFID gate readers
- QR code scans
- Biometric devices
- Bulk imports
All attendance sources generate Attendance Events.
Attendance Events are processed into official Attendance records.
Attendance Event
Purpose
Attendance Event represents a raw attendance observation.
Examples:
- Student enters campus
- Student exits campus
- NFC card tap
- QR scan
- RFID scan
- Biometric punch
Attendance Events are immutable records used for auditing and attendance processing.
Relationships
Attendance Event to Student
- Each Attendance Event belongs to exactly one Student.
Attendance Event to Attendance
- Attendance Events may contribute to an Attendance record.
- Multiple Attendance Events may contribute to a single Attendance record.
Key Design Decisions
Event Driven Model
Attendance Events represent facts.
Examples:
08:05 AM
- NFC Scan
12:35 PM
- Check Out
01:15 PM
- Check In
04:10 PM
- Check Out
The presence of multiple events does not create multiple attendance records.
Source Independent
All attendance sources generate Attendance Events.
Supported sources include:
- Manual
- NFC
- RFID
- QR
- Biometric
- Import
Future attendance sources should not require redesign of the Attendance model.
Immutable Records
Attendance Events should not be modified after creation.
Corrections should occur at the Attendance layer.
This preserves auditability.
Attributes
Identity
- AttendanceEventId
- StudentId
Event Information
- EventType
- EventTimestamp
Source
- Source
Supported values include:
- Manual
- NFC
- RFID
- QR
- Biometric
- Import
Device Information
- DeviceId
- DeviceName
Location Information
- LocationId
- LocationName
Raw Payload
- EventPayload
Example:
- NFC Card Identifier
- QR Payload
- Device Generated Data
Audit
- CreatedAt
Event Types
Supported values include:
- CheckIn
- CheckOut
Additional event types may be introduced in the future.
Constraints
Event Preservation
Attendance Events must never be deleted as part of normal attendance processing.
Auditability
Attendance Events act as evidence supporting attendance decisions.
Attendance
Purpose
Attendance represents the official attendance status of a Student for a specific date.
Attendance is the record used for:
- Academic Reporting
- Attendance Reports
- Attendance Analysis
- Attendance Percentage Calculations
- School Administration
Attendance may be:
- Manually Recorded
- Automatically Generated from Attendance Events
Relationships
Attendance to Student Enrollment
- Each Attendance record belongs to exactly one Student Enrollment.
Attendance to Academic Year
- Attendance belongs to the Academic Year associated with the Student Enrollment.
Attendance to Section
- Attendance is recorded within the context of a Section.
Attendance to Attendance Events
- Attendance may be generated from one or more Attendance Events.
Key Design Decisions
Daily Attendance
Attendance is modeled at a daily level.
Attendance is not period-based in V1.
Future period-level attendance should not require redesign of the model.
Multiple Attendance Sources
Attendance may originate from:
- Manual Marking
- NFC Processing
- RFID Processing
- QR Processing
- Biometric Processing
- Imports
The source must be recorded.
Automatic Attendance Generation
Official Attendance may be generated automatically from Attendance Events.
Example:
Valid NFC Check-In
↓
Attendance Created
↓
Status = Present
Manual Override
School users may override automatically generated Attendance.
Example:
NFC Event:
- Student Present
Later:
- Medical Leave Submitted
Attendance updated to:
- Leave
Attendance Events remain unchanged.
Attendance represents the official academic outcome.
Processing Based Architecture
Attendance is derived using processing rules.
Examples:
- Valid Check-In → Present
- Missing Check-In → Absent
- Manual Override → Leave
Processing logic may evolve without changing attendance records.
Attributes
Identity
- AttendanceId
- StudentEnrollmentId
Date
- AttendanceDate
Status
Possible values include:
- Present
- Absent
- HalfDay
- Leave
Source
Possible values include:
- Manual
- NFC
- RFID
- QR
- Biometric
- Import
Processing
- GeneratedFromEvents
Audit
- MarkedBy
- MarkedAt
- LastModifiedBy
- LastModifiedAt
Status Definitions
Present
Student attended school.
Absent
Student did not attend school.
HalfDay
Student attended school for part of the day.
Leave
Student was granted approved leave.
Constraints
One Attendance Record Per Day
A Student Enrollment may have only one Attendance record per date.
Valid:
- Rahul → 15-Jul-2027 → Present
Invalid:
- Rahul → 15-Jul-2027 → Present
- Rahul → 15-Jul-2027 → Absent
Enrollment Requirement
Attendance may only exist for active Student Enrollments.
Event Independence
Attendance may be modified without changing historical Attendance Events.
Administrative Ownership
School Administrators
May:
- View Attendance
- Correct Attendance
- Generate Attendance Reports
Teachers
May:
- Record Attendance
- Update Attendance
- Review Attendance
Permissions are controlled through School Membership roles.
Exclusions
The following capabilities are excluded from V1:
- Period-wise Attendance
- Teacher Attendance
- Attendance Locking
- Leave Approval Workflows
- Holiday Calendars
- Attendance Notifications
These capabilities may be introduced later.
Future Considerations
The following capabilities may be introduced later:
- Period Attendance
- Teacher Attendance
- Attendance Analytics
- Leave Approval Workflows
- Holiday Calendars
- Geofencing
- Real-Time Attendance Monitoring
- Automated Parent Notifications
These capabilities should not require redesign of the Attendance model.
Summary
Core decisions:
- Attendance is modeled using Attendance Events and Attendance records.
- Attendance Events represent raw attendance observations.
- Attendance represents the official daily attendance record.
- NFC attendance is supported through Attendance Events.
- Multiple attendance sources are supported.
- Attendance Events are immutable.
- Attendance may be generated automatically from Attendance Events.
- Manual attendance can override automatically generated Attendance.
- Attendance is daily in V1.
- One attendance record is allowed per Student Enrollment per day.