import 'package:json_annotation/json_annotation.dart';
import 'package:marking_app/common/model/report/detail_base_info.dart';

part 'question_know_point.g.dart';


@JsonSerializable()
class QuestionKnowPoint extends Object {

  @JsonKey(name: 'QuestionList')
  List<dynamic> questionList;

  @JsonKey(name: 'UserQuestion')
  UserQuestion userQuestion;

  @JsonKey(name: 'KnowPointList')
  List<KnowPointList> knowPointList;

  QuestionKnowPoint(this.questionList,this.userQuestion,this.knowPointList,);

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

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

}


@JsonSerializable()
class UserQuestion extends Object {

  @JsonKey(name: 'BatchNO')
  String batchNO;

  @JsonKey(name: 'HeadStartRowIndex')
  int headStartRowIndex;

  @JsonKey(name: 'BodyStartRowIndex')
  int bodyStartRowIndex;

  @JsonKey(name: 'Sheets')
  List<Sheets> sheets;

  UserQuestion(this.batchNO,this.headStartRowIndex,this.bodyStartRowIndex,this.sheets,);

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

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

}


@JsonSerializable()
class HeadData extends Object {

  @JsonKey(name: 'RowData')
  List<List<String>> rowData;

  @JsonKey(name: 'AutoMerge')
  bool autoMerge;

  @JsonKey(name: 'TotalMerge')
  bool totalMerge;

  @JsonKey(name: 'ColumnWidthPx')
  int columnWidthPx;

  HeadData(this.rowData,this.autoMerge,this.totalMerge,this.columnWidthPx,);

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

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

}


@JsonSerializable()
class KnowPointList extends Object {

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

  @JsonKey(name: 'QuestionNums')
  String questionNums;

  @JsonKey(name: 'CorrectRate')
  String correctRate;

  @JsonKey(name: 'GradeCorrectRate')
  String gradeCorrectRate;

  KnowPointList(this.name,this.questionNums,this.correctRate,this.gradeCorrectRate,);

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

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

}
