class AttendanceLog {
  final DateTime date;
  final String status;
  final String description; // Akan diisi dengan nama Mapel
  final String className;

  AttendanceLog({
    required this.date,
    required this.status,
    required this.description,
    required this.className,
  });

  factory AttendanceLog.fromFirestore(Map<String, dynamic> data, String tanggal) {
    return AttendanceLog(
      date: DateTime.parse(tanggal),
      status: data['status'] ?? 'Tanpa Keterangan',
      description: data['mapel'] ?? '-',
      className: data['kelas'] ?? '-',
    );
  }
}