class FavoriteEmployee {
  const FavoriteEmployee({required this.employeeId, required this.createdAt});

  final String employeeId;
  final DateTime createdAt;

  factory FavoriteEmployee.fromJson(Map<String, dynamic> json) {
    return FavoriteEmployee(
      employeeId: json['employeeId'] as String? ?? '',
      createdAt: DateTime.parse(json['createdAt'] as String),
    );
  }

  Map<String, dynamic> toJson() {
    return {
      'employeeId': employeeId,
      'createdAt': createdAt.toUtc().toIso8601String(),
    };
  }
}
