import 'package:json_annotation/json_annotation.dart';

part 'favor_param.g.dart';

@JsonSerializable()
class FavorParam extends Object {
  @JsonKey(name: 'homeworkId')
  String homeworkId;

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

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

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

  @JsonKey(name: 'isFav')
  bool isFav;

  FavorParam({
    required this.homeworkId,
    required this.studentId,
    required this.templateId,
    required this.questionNo,
    required this.isFav,
  });

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

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