class DailyStats {
  final int wordsLearned;
  final int studyTimeMinutes;

  DailyStats({
    required this.wordsLearned,
    required this.studyTimeMinutes,
  });

  factory DailyStats.fromJson(Map<String, dynamic> json) {
    return DailyStats(
      wordsLearned: (json['wordsLearned'] as num?)?.toInt() ?? 0,
      studyTimeMinutes: (json['studyTimeMinutes'] as num?)?.toInt() ?? 0,
    );
  }
}