import 'package:json_annotation/json_annotation.dart';

part 'job_do_marking_status_info.g.dart';

@JsonSerializable()
class JobDoMarkingStatusInfo extends Object {
  @JsonKey(name: 'pageIndex')
  int pageIndex;

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

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

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

  JobDoMarkingStatusInfo(this.pageIndex, this.total, this.finishCount, [this.surplusNo = 0]) {
    this.surplusNo = total - finishCount;
  }

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

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