import 'package:json_annotation/json_annotation.dart';
import 'package:marking_app/common/model/report/report_for_subject_teacher_model.dart';
import 'package:marking_app/common/model/report/report_histogram_model.dart'; 
  
part 'report_for_class_teacher_model.g.dart';


@JsonSerializable(checked: true)
  class ReportForClassTeacherModel extends Object {

  @JsonKey(name: 'BaseInfo')
  BaseInfo baseInfo;

  @JsonKey(name: 'ExamTagDistributionList')
  List<ExamTagDistributionList> examTagDistributionList;

  @JsonKey(name: 'AvgComparison')
  AvgComparison avgComparison;

  @JsonKey(name: 'YearLevel')
  YearLevel yearLevel;

  @JsonKey(name: 'OverallLevel')
  OverallLevel overallLevel;

  @JsonKey(name: 'StudentInfo')
  StudentInfo studentInfo;

  @JsonKey(name: 'SubjectRadarMap')
  SubjectRadarMap subjectRadarMap;

  List<ReportHistogramModel> averageModels;

  ReportForClassTeacherModel(this.baseInfo,this.examTagDistributionList,this.avgComparison,this.yearLevel,this.overallLevel,this.studentInfo,this.subjectRadarMap,{this.averageModels=const []});

  factory ReportForClassTeacherModel.fromJson(Map<String, dynamic> srcJson) => _$ReportForClassTeacherModelFromJson(srcJson);

  Map<String, dynamic> toJson() => _$ReportForClassTeacherModelToJson(this);

}

  
@JsonSerializable(checked: true)
  class BaseInfo extends Object {

  @JsonKey(name: 'ExamName')
  String examName;

  @JsonKey(name: 'ExamType')
  String examType;

  @JsonKey(name: 'Grade')
  String grade;

  @JsonKey(name: 'Subjects')
  List<Subjects> subjects;

  @JsonKey(name: 'TotalScore')
  double totalScore;

  @JsonKey(name: 'Average')
  double average;

  @JsonKey(name: 'MaxScore')
  double maxScore;

  @JsonKey(name: 'Excellent')
  String excellent;

  @JsonKey(name: 'Qualified')
  String qualified;

  @JsonKey(name: 'ExamTime')
  String examTime;

  BaseInfo(this.examName,this.examType,this.grade,this.subjects,this.totalScore,this.average,this.maxScore,this.excellent,this.qualified,this.examTime,);

  factory BaseInfo.fromJson(Map<String, dynamic> srcJson) => _$BaseInfoFromJson(srcJson);

  Map<String, dynamic> toJson() => _$BaseInfoToJson(this);

}

  
@JsonSerializable(checked: true)
  class Subjects extends Object {

  @JsonKey(name: 'SubjectId')
  int subjectId;

  @JsonKey(name: 'SubjectName')
  String subjectName;

  Subjects(this.subjectId,this.subjectName,);

  factory Subjects.fromJson(Map<String, dynamic> srcJson) => _$SubjectsFromJson(srcJson);

  Map<String, dynamic> toJson() => _$SubjectsToJson(this);

}

  


@JsonSerializable(checked: true)
  class ExamTagDistributionList extends Object {

  @JsonKey(name: 'TagId')
  int tagId;

  @JsonKey(name: 'TagName')
  String tagName;

  @JsonKey(name: 'Number')
  int number;

  @JsonKey(name: 'NumberRate')
  String numberRate;

  ExamTagDistributionList(this.tagId,this.tagName,this.number,this.numberRate,);

  factory ExamTagDistributionList.fromJson(Map<String, dynamic> srcJson) => _$ExamTagDistributionListFromJson(srcJson);

  Map<String, dynamic> toJson() => _$ExamTagDistributionListToJson(this);

}

  
@JsonSerializable(checked: true)
  class AvgComparison extends Object {

  @JsonKey(name: 'AvgScore')
  double avgScore;

  @JsonKey(name: 'AvgComparisonList')
  List<AvgComparisonList> avgComparisonList;

  AvgComparison(this.avgScore,this.avgComparisonList,);

  factory AvgComparison.fromJson(Map<String, dynamic> srcJson) => _$AvgComparisonFromJson(srcJson);

  Map<String, dynamic> toJson() => _$AvgComparisonToJson(this);

}

  
@JsonSerializable(checked: true)
  class AvgComparisonList extends Object {

  @JsonKey(name: 'Id')
  int id;

  @JsonKey(name: 'Name')
  String name;

  @JsonKey(name: 'Score')
  double score;

  AvgComparisonList(this.id,this.name,this.score,);

  factory AvgComparisonList.fromJson(Map<String, dynamic> srcJson) => _$AvgComparisonListFromJson(srcJson);

  Map<String, dynamic> toJson() => _$AvgComparisonListToJson(this);

}

  
@JsonSerializable(checked: true)
  class YearLevel extends Object {

  @JsonKey(name: 'Actor')
  int actor;

  @JsonKey(name: 'Ranking')
  int ranking;

  YearLevel(this.actor,this.ranking,);

  factory YearLevel.fromJson(Map<String, dynamic> srcJson) => _$YearLevelFromJson(srcJson);

  Map<String, dynamic> toJson() => _$YearLevelToJson(this);

}

  
@JsonSerializable(checked: true)
  class OverallLevel extends Object {

  @JsonKey(name: 'Actor')
  int actor;

  @JsonKey(name: 'Ranking')
  int ranking;

  OverallLevel(this.actor,this.ranking,);

  factory OverallLevel.fromJson(Map<String, dynamic> srcJson) => _$OverallLevelFromJson(srcJson);

  Map<String, dynamic> toJson() => _$OverallLevelToJson(this);

}

  
@JsonSerializable(checked: true)
  class StudentInfo extends Object {

  @JsonKey(name: 'Heads')
  List<String> heads;

  @JsonKey(name: 'Data')
  List<List<String>> data;

  StudentInfo(this.heads,this.data,);

  factory StudentInfo.fromJson(Map<String, dynamic> srcJson) => _$StudentInfoFromJson(srcJson);

  Map<String, dynamic> toJson() => _$StudentInfoToJson(this);

}

  
@JsonSerializable(checked: true)
  class SubjectRadarMap extends Object {

  @JsonKey(name: 'Id')
  int id;

  @JsonKey(name: 'Name')
  String name;

  @JsonKey(name: 'ExamSubjects')
  List<ExamSubjects> examSubjects;

  SubjectRadarMap(this.id,this.name,this.examSubjects,);

  factory SubjectRadarMap.fromJson(Map<String, dynamic> srcJson) => _$SubjectRadarMapFromJson(srcJson);

  Map<String, dynamic> toJson() => _$SubjectRadarMapToJson(this);

}

  
@JsonSerializable(checked: true)
  class ExamSubjects extends Object {

  @JsonKey(name: 'Subject')
  String subject;

  @JsonKey(name: 'Score')
  double score;

  @JsonKey(name: 'TotalScore')
  double totalScore;

  ExamSubjects(this.subject,this.score,this.totalScore,);

  factory ExamSubjects.fromJson(Map<String, dynamic> srcJson) => _$ExamSubjectsFromJson(srcJson);

  Map<String, dynamic> toJson() => _$ExamSubjectsToJson(this);

}

  
