class Pointage {
  final int? id;
  final String userName;
  final String date;
  final String heureArrivee;
  final String heureDepart;

  Pointage({
    this.id,
    required this.userName,
    required this.date,
    required this.heureArrivee,
    required this.heureDepart,
  });

  // Pour SQLite
  factory Pointage.fromMap(Map<String, dynamic> map) {
    return Pointage(
      id: map['id'],
      userName: map['userName'] ?? '',
      date: map['date'],
      heureArrivee: map['heureArrivee'],
      heureDepart: map['heureDepart'],
    );
  }

  Map<String, dynamic> toMap() {
    return {
      'id': id,
      'userName': userName,
      'date': date,
      'heureArrivee': heureArrivee,
      'heureDepart': heureDepart,
    };
  }
}
