class FeedbackModel {
  final String idStudentLearning;
  final String id;
  final String idLevel;
  final DateTime studentStart;
  final DateTime studentFinish;
  final int score;
  final bool isPass;
  final String nextLearning;
  final String feedbackStudent;
  final DateTime timeLearning;

  FeedbackModel({
    required this.idStudentLearning,
    required this.id,
    required this.idLevel,
    required this.studentStart,
    required this.studentFinish,
    required this.score,
    required this.isPass,
    required this.nextLearning,
    required this.feedbackStudent,
    required this.timeLearning,
  });

  factory FeedbackModel.fromJson(Map<String, dynamic> json) {
    return FeedbackModel(
      idStudentLearning: json['ID_STUDENT_LEARNING'],
      id: json['ID'],
      idLevel: json['ID_LEVEL'],
      studentStart: DateTime.parse(json['STUDENT_START']),
      studentFinish: DateTime.parse(json['STUDENT_FINISH']),
      score: json['SCORE'],
      isPass: json['IS_PASS'] == 1,
      nextLearning: json['NEXT_LEARNING'],
      feedbackStudent: json['FEEDBACK_STUDENT'],
      timeLearning: DateTime.parse(json['TIME_LEARNING']),
    );
  }
}
