import 'package:json_annotation/json_annotation.dart';

part 'work_student.g.dart';


@JsonSerializable()
class WorkStudent extends Object {

  @JsonKey(name: 'items')
  List<Items> items;

  @JsonKey(name: 'totalCount')
  int totalCount;

  WorkStudent(this.items,this.totalCount,);

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

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

}


@JsonSerializable()
class Items extends Object {

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

  @JsonKey(name: 'assessType')
  int assessType;

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

  @JsonKey(name: 'grade')
  int grade;

  @JsonKey(name: 'subject')
  int subject;

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

  @JsonKey(name: 'state')
  int? state;

  @JsonKey(name: 'collectRate')
  int? collectRate;

  @JsonKey(name: 'questionCount')
  int? questionCount;

  @JsonKey(name: 'annotateCount')
  int? annotateCount;

  @JsonKey(name: 'annotateRate')
  double? annotateRate;

  @JsonKey(name: 'classes')
  List<Classes>? classes;

  @JsonKey(name: 'creatorName')
  String? creatorName;

  @JsonKey(name: 'creationTime')
  String? creationTime;

  @JsonKey(name: 'classCount')
  int? classCount;

  @JsonKey(name: 'isFixed')
  bool? isFixed;

  Items(this.id,this.assessType,this.name,this.grade,this.subject,this.publishTime,this.state,this.collectRate,this.questionCount,this.annotateCount,this.annotateRate,this.classes,this.creatorName,this.creationTime,this.classCount);

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

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

}


@JsonSerializable()
class Classes extends Object {

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

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

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

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

  @JsonKey(name: 'finishTime')
  String? finishTime;

  Classes(this.schoolId,this.schoolName,this.classId,this.className,this.finishTime,);

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

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

}


