import 'package:json_annotation/json_annotation.dart';

part 'report_marking_detail.g.dart';


@JsonSerializable()
class ReportMarkingDetail extends Object {

  @JsonKey(name: 'MarkingPagerImgs')
  List<String> markingPagerImgs;

  @JsonKey(name: 'ExamOriginPapers')
  List<ExamOriginPapers> examOriginPapers;

  @JsonKey(name: 'QuestionAnswers')
  List<QuestionAnswers> questionAnswers;

  ReportMarkingDetail(this.markingPagerImgs,this.examOriginPapers,this.questionAnswers,);

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

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

}


@JsonSerializable()
class ExamOriginPapers extends Object {

  @JsonKey(name: 'PageIndex')
  int pageIndex;

  @JsonKey(name: 'ImageUrl')
  String imageUrl;

  @JsonKey(name: 'Width')
  double width;

  @JsonKey(name: 'Height')
  double height;

  @JsonKey(name: 'PaperType')
  int paperType;

  @JsonKey(name: 'Question')
  List<Question> question;

  ExamOriginPapers(this.pageIndex,this.imageUrl,this.width,this.height,this.paperType,this.question,);

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

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

}


@JsonSerializable()
class Question extends Object {

  @JsonKey(name: 'QuestionNum')
  String questionNum;

  @JsonKey(name: 'isObj')
  bool isObj;

  @JsonKey(name: 'X')
  double x;

  @JsonKey(name: 'Y')
  double y;

  @JsonKey(name: 'Width')
  double width;

  @JsonKey(name: 'Height')
  double height;

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

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

  Question(this.questionNum,this.isObj,this.x,this.y,this.width,this.height,this.score,this.totalScore,);

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

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

}


@JsonSerializable()
class QuestionAnswers extends Object {

  @JsonKey(name: 'QuestionNum')
  String questionNum;

  @JsonKey(name: 'Answer')
  String answer;

  @JsonKey(name: 'YourAnswer')
  String yourAnswer;

  @JsonKey(name: 'AnswerType')
  int answerType;

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

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

  QuestionAnswers(this.questionNum,this.answer,this.yourAnswer,this.answerType,this.totalScore,this.score,);

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

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

}


