import 'package:json_annotation/json_annotation.dart';

part 'detail_base_info.g.dart';


@JsonSerializable()
class DetailBaseInfo extends Object {

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

  @JsonKey(name: 'Module1_CJZL')
  Module1_CJZL module1CJZL;

  @JsonKey(name: 'Module2_ZDGZ')
  Module2_ZDGZ module2ZDGZ;

  DetailBaseInfo(this.baseInfo,this.module1CJZL,this.module2ZDGZ,);

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

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

}


@JsonSerializable()
class BaseInfo extends Object {

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

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

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

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

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

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

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

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

  @JsonKey(name: 'RateGood')
  String rateGood;

  @JsonKey(name: 'RatePass')
  String ratePass;

  @JsonKey(name: 'TotalRank')
  int? totalRank;

  @JsonKey(name: 'JoinCount')
  int? joinCount;

  BaseInfo(this.examName,this.examType,this.grade,this.subject,this.examTime,this.totalScore,this.avgScore,this.maxScore,this.rateGood,this.ratePass,this.totalRank,this.joinCount,);

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

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

}


@JsonSerializable()
class Module1_CJZL extends Object {

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

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

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

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

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

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

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

}


@JsonSerializable()
class Sheets extends Object {

  @JsonKey(name: 'SheetName')
  String? sheetName;

  @JsonKey(name: 'HeadData')
  List<HeadData> headData;

  @JsonKey(name: 'BodyData')
  List<List> bodyData;

  @JsonKey(name: 'BodyRowHeightPx')
  double bodyRowHeightPx;

  @JsonKey(name: 'HeadsRowHeightPx')
  double headsRowHeightPx;

  Sheets(this.sheetName,this.headData,this.bodyData,this.bodyRowHeightPx,this.headsRowHeightPx,);

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

  Map<String, dynamic> toJson() => _$SheetsToJson(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')
  double 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 Module2_ZDGZ extends Object {

  @JsonKey(name: 'TopExcelData')
  TopExcelData? topExcelData;

  @JsonKey(name: 'BottomExcelData')
  BottomExcelData? bottomExcelData;

  Module2_ZDGZ(this.topExcelData,this.bottomExcelData,);

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

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

}


@JsonSerializable()
class TopExcelData extends Object {

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

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

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

  TopExcelData(this.headStartRowIndex,this.bodyStartRowIndex,this.sheets,);

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

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

}



@JsonSerializable()
class BottomExcelData extends Object {

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

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

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

  BottomExcelData(this.headStartRowIndex,this.bodyStartRowIndex,this.sheets,);

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

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

}


