import 'package:json_annotation/json_annotation.dart';

part 'do_paper_details_param.g.dart';

@JsonSerializable(includeIfNull: false)
class DoPaperDetailsParam extends Object {
  // 作业ID
  @JsonKey(name: 'homeworkId')
  String homeworkId;

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

  // 班级ID
  @JsonKey(name: 'classId')
  String classId;

  // 0 作业 1 考试
  @JsonKey(name: 'assessType', defaultValue: 0)
  int? assessType;

  // 科目
  @JsonKey(name: 'subject')
  int subject;

  // 题型ID
  @JsonKey(name: 'templateId')
  int? templateId;

  // 学生ID
  @JsonKey(name: 'studentId')
  int? studentId;

  DoPaperDetailsParam({
    required this.homeworkId,
    required this.homeworkName,
    required this.classId,
    required this.subject,
    this.assessType,
    this.templateId,
    this.studentId,
  });

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

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