diff --git a/creche_app/lib/models/attendance.dart b/creche_app/lib/models/attendance.dart deleted file mode 100644 index d8fe7b4..0000000 --- a/creche_app/lib/models/attendance.dart +++ /dev/null @@ -1,42 +0,0 @@ -class Attendance { - final String id; - final String childId; - final DateTime date; - final String? status; // present | absent | late - final String? timeIn; - final String? timeOut; - final String? notes; - - Attendance({ - required this.id, - required this.childId, - required this.date, - this.status, - this.timeIn, - this.timeOut, - this.notes, - }); - - factory Attendance.fromMap(Map map) { - return Attendance( - id: map['id'] ?? '', - childId: map['child_id'] ?? '', - date: DateTime.tryParse(map['date'] ?? '') ?? DateTime.now(), - status: map['status'], - timeIn: map['time_in'], - timeOut: map['time_out'], - notes: map['notes'], - ); - } - - Map toMap() { - return { - 'child_id': childId, - 'date': date.toIso8601String().split('T')[0], - 'status': status, - 'time_in': timeIn, - 'time_out': timeOut, - 'notes': notes, - }; - } -}