import 'package:json_annotation/json_annotation.dart';

part 'report_student_info.g.dart';


@JsonSerializable()
class ReportStudentInfo extends Object {

  @JsonKey(name: 'ExamId')
  int examId;

  @JsonKey(name: 'UserId')
  int userId;

  @JsonKey(name: 'ClassId')
  int classId;

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

  @JsonKey(name: 'ExamNo')
  String examNo;

  @JsonKey(name: 'UserName')
  String userName;

  @JsonKey(name: 'ScoreInfo')
  List<ScoreInfo> scoreInfo;

  @JsonKey(name: 'Subject')
  List<Subject> subject;

  ReportStudentInfo(this.examId,this.userId,this.classId,this.examName,this.examNo,this.userName,this.scoreInfo,this.subject,);

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

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

}


@JsonSerializable()
class ScoreInfo extends Object {

  @JsonKey(name: 'Value')
  double value;

  @JsonKey(name: 'Text')
  String text;

  ScoreInfo(this.value,this.text,);

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

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

}


@JsonSerializable()
class Subject extends Object {

  @JsonKey(name: 'Value')
  int value;

  @JsonKey(name: 'Text')
  String text;

  Subject(this.value,this.text,);

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

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

}


