// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'tender_approvals_stats_data.dart';

// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************

_TenderApprovalsStatsData _$TenderApprovalsStatsDataFromJson(
  Map<String, dynamic> json,
) => _TenderApprovalsStatsData(
  companyId: json['company_id'] as String?,
  totalApprovals: (json['total_approvals'] as num?)?.toInt(),
  submittedTenders: (json['submitted_tenders'] as num?)?.toInt(),
  rejectedTenders: (json['rejected_tenders'] as num?)?.toInt(),
  selfApplyCount: (json['self_apply_count'] as num?)?.toInt(),
  partnershipCount: (json['partnership_count'] as num?)?.toInt(),
  approvalsByStatus:
      json['approvals_by_status'] == null
          ? null
          : ApprovalsByStatus.fromJson(
            json['approvals_by_status'] as Map<String, dynamic>,
          ),
  approvalsBySubmission:
      json['approvals_by_submission'] == null
          ? null
          : ApprovalsBySubmission.fromJson(
            json['approvals_by_submission'] as Map<String, dynamic>,
          ),
  lastUpdated: (json['last_updated'] as num?)?.toInt(),
);

Map<String, dynamic> _$TenderApprovalsStatsDataToJson(
  _TenderApprovalsStatsData instance,
) => <String, dynamic>{
  'company_id': instance.companyId,
  'total_approvals': instance.totalApprovals,
  'submitted_tenders': instance.submittedTenders,
  'rejected_tenders': instance.rejectedTenders,
  'self_apply_count': instance.selfApplyCount,
  'partnership_count': instance.partnershipCount,
  'approvals_by_status': instance.approvalsByStatus?.toJson(),
  'approvals_by_submission': instance.approvalsBySubmission?.toJson(),
  'last_updated': instance.lastUpdated,
};

_ApprovalsByStatus _$ApprovalsByStatusFromJson(Map<String, dynamic> json) =>
    _ApprovalsByStatus(
      submitted: (json['submitted'] as num?)?.toInt(),
      rejected: (json['rejected'] as num?)?.toInt(),
    );

Map<String, dynamic> _$ApprovalsByStatusToJson(_ApprovalsByStatus instance) =>
    <String, dynamic>{
      'submitted': instance.submitted,
      'rejected': instance.rejected,
    };

_ApprovalsBySubmission _$ApprovalsBySubmissionFromJson(
  Map<String, dynamic> json,
) => _ApprovalsBySubmission(
  partnership: (json['partnership'] as num?)?.toInt(),
  selfApply: (json['self-apply'] as num?)?.toInt(),
);

Map<String, dynamic> _$ApprovalsBySubmissionToJson(
  _ApprovalsBySubmission instance,
) => <String, dynamic>{
  'partnership': instance.partnership,
  'self-apply': instance.selfApply,
};
