// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'hatching_report.dart';

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

_HatchingReport _$HatchingReportFromJson(Map<String, dynamic> json) =>
    _HatchingReport(
      id: (json['id'] as num?)?.toInt(),
      poultryScience: json['poultry_science'] == null
          ? null
          : PoultryScience.fromJson(
              json['poultry_science'] as Map<String, dynamic>,
            ),
      hatching: json['hatching'] == null
          ? null
          : Hatching.fromJson(json['hatching'] as Map<String, dynamic>),
      key: json['key'] as String?,
      createDate: json['create_date'] as String?,
      modifyDate: json['modify_date'] as String?,
      trash: json['trash'] as bool?,
      date: json['date'] as String?,
      image: (json['image'] as List<dynamic>?)
          ?.map((e) => e as String)
          .toList(),
      lat: (json['lat'] as num?)?.toDouble(),
      log: (json['log'] as num?)?.toDouble(),
      reporterFullname: json['reporter_fullname'] as String?,
      reporterMobile: json['reporter_mobile'] as String?,
      createdBy: json['created_by'] as String?,
      modifiedBy: json['modified_by'] as String?,
      messageRegistererRole: json['message_registerer_role'] as String?,
      messageRegistererMobile: json['message_registerer_mobile'] as String?,
      messageRegistererFullname: json['message_registerer_fullname'] as String?,
      message: json['message'] as String?,
      messageAi: json['message_ai'] as String?,
      realQuantity: (json['real_quantity'] as num?)?.toInt(),
      realQuantityAi: (json['real_quantity_ai'] as num?)?.toInt(),
      state: json['state'] as String?,
    );

Map<String, dynamic> _$HatchingReportToJson(_HatchingReport instance) =>
    <String, dynamic>{
      'id': instance.id,
      'poultry_science': instance.poultryScience,
      'hatching': instance.hatching,
      'key': instance.key,
      'create_date': instance.createDate,
      'modify_date': instance.modifyDate,
      'trash': instance.trash,
      'date': instance.date,
      'image': instance.image,
      'lat': instance.lat,
      'log': instance.log,
      'reporter_fullname': instance.reporterFullname,
      'reporter_mobile': instance.reporterMobile,
      'created_by': instance.createdBy,
      'modified_by': instance.modifiedBy,
      'message_registerer_role': instance.messageRegistererRole,
      'message_registerer_mobile': instance.messageRegistererMobile,
      'message_registerer_fullname': instance.messageRegistererFullname,
      'message': instance.message,
      'message_ai': instance.messageAi,
      'real_quantity': instance.realQuantity,
      'real_quantity_ai': instance.realQuantityAi,
      'state': instance.state,
    };

_PoultryScience _$PoultryScienceFromJson(Map<String, dynamic> json) =>
    _PoultryScience(
      id: (json['id'] as num?)?.toInt(),
      user: json['user'] == null
          ? null
          : User.fromJson(json['user'] as Map<String, dynamic>),
      key: json['key'] as String?,
      createDate: json['create_date'] as String?,
      modifyDate: json['modify_date'] as String?,
      trash: json['trash'] as bool?,
      createdBy: json['created_by'] as String?,
      modifiedBy: json['modified_by'] as String?,
      poultry: (json['poultry'] as List<dynamic>?)
          ?.map((e) => (e as num).toInt())
          .toList(),
    );

Map<String, dynamic> _$PoultryScienceToJson(_PoultryScience instance) =>
    <String, dynamic>{
      'id': instance.id,
      'user': instance.user,
      'key': instance.key,
      'create_date': instance.createDate,
      'modify_date': instance.modifyDate,
      'trash': instance.trash,
      'created_by': instance.createdBy,
      'modified_by': instance.modifiedBy,
      'poultry': instance.poultry,
    };

_User _$UserFromJson(Map<String, dynamic> json) => _User(
  fullname: json['fullname'] as String?,
  mobile: json['mobile'] as String?,
);

Map<String, dynamic> _$UserToJson(_User instance) => <String, dynamic>{
  'fullname': instance.fullname,
  'mobile': instance.mobile,
};

_Hatching _$HatchingFromJson(Map<String, dynamic> json) => _Hatching(
  poultry: json['poultry'] == null
      ? null
      : Poultry.fromJson(json['poultry'] as Map<String, dynamic>),
  generalInfo: json['general_info'] == null
      ? null
      : GeneralInfo.fromJson(json['general_info'] as Map<String, dynamic>),
  chickenBreed: json['chicken_breed'] as String?,
  date: json['date'] as String?,
  quantity: (json['quantity'] as num?)?.toInt(),
  leftOver: (json['left_over'] as num?)?.toInt(),
  period: (json['period'] as num?)?.toInt(),
  losses: (json['losses'] as num?)?.toInt(),
  violation: json['violation'] as bool?,
  licenceNumber: json['licence_number'] as String?,
  chickenAge: (json['chicken_age'] as num?)?.toInt(),
  vetFarm: json['vet_farm'] == null
      ? null
      : VetFarm.fromJson(json['vet_farm'] as Map<String, dynamic>),
);

Map<String, dynamic> _$HatchingToJson(_Hatching instance) => <String, dynamic>{
  'poultry': instance.poultry,
  'general_info': instance.generalInfo,
  'chicken_breed': instance.chickenBreed,
  'date': instance.date,
  'quantity': instance.quantity,
  'left_over': instance.leftOver,
  'period': instance.period,
  'losses': instance.losses,
  'violation': instance.violation,
  'licence_number': instance.licenceNumber,
  'chicken_age': instance.chickenAge,
  'vet_farm': instance.vetFarm,
};

_VetFarm _$VetFarmFromJson(Map<String, dynamic> json) => _VetFarm(
  vetFarmFullname: json['vet_farm_fullname'] as String?,
  vetFarmMobile: json['vet_farm_mobile'] as String?,
);

Map<String, dynamic> _$VetFarmToJson(_VetFarm instance) => <String, dynamic>{
  'vet_farm_fullname': instance.vetFarmFullname,
  'vet_farm_mobile': instance.vetFarmMobile,
};

_Poultry _$PoultryFromJson(Map<String, dynamic> json) => _Poultry(
  key: json['key'] as String?,
  fullname: json['fullname'] as String?,
  mobile: json['mobile'] as String?,
  city: json['city'] as String?,
  unitName: json['unit_name'] as String?,
  killingAveAge: (json['killing_ave_age'] as num?)?.toInt(),
  activeLeftOver: (json['active_left_over'] as num?)?.toInt(),
  killingAveCount: (json['killing_ave_count'] as num?)?.toInt(),
  realKillingAveWeight: (json['real_killing_ave_weight'] as num?)?.toDouble(),
  realKillingLiveWeight: (json['real_killing_live_weight'] as num?)?.toDouble(),
  realKillingCarcassesWeight: (json['real_killing_carcasses_weight'] as num?)
      ?.toDouble(),
  realKillingLossWeightPercent:
      (json['real_killing_loss_weight_percent'] as num?)?.toDouble(),
);

Map<String, dynamic> _$PoultryToJson(_Poultry instance) => <String, dynamic>{
  'key': instance.key,
  'fullname': instance.fullname,
  'mobile': instance.mobile,
  'city': instance.city,
  'unit_name': instance.unitName,
  'killing_ave_age': instance.killingAveAge,
  'active_left_over': instance.activeLeftOver,
  'killing_ave_count': instance.killingAveCount,
  'real_killing_ave_weight': instance.realKillingAveWeight,
  'real_killing_live_weight': instance.realKillingLiveWeight,
  'real_killing_carcasses_weight': instance.realKillingCarcassesWeight,
  'real_killing_loss_weight_percent': instance.realKillingLossWeightPercent,
};

_GeneralInfo _$GeneralInfoFromJson(Map<String, dynamic> json) => _GeneralInfo(
  aveAge: (json['ave_age'] as num?)?.toInt(),
  age: (json['age'] as num?)?.toInt(),
  aveWeight: (json['ave_weight'] as num?)?.toDouble(),
  provinceKillRequests: (json['province_kill_requests'] as num?)?.toInt(),
  provinceKillRequestsQuantity:
      (json['province_kill_requests_quantity'] as num?)?.toInt(),
  provinceKillRequestsWeight: (json['province_kill_requests_weight'] as num?)
      ?.toDouble(),
  killHouseRequestsQuantity: (json['kill_house_requests_quantity'] as num?)
      ?.toInt(),
  killHouseRequests: (json['kill_house_requests'] as num?)?.toInt(),
  killHouseRequestsWeight: (json['kill_house_requests_weight'] as num?)
      ?.toDouble(),
  totalQuantity: (json['total_quantity'] as num?)?.toInt(),
  totalWeight: (json['total_weight'] as num?)?.toDouble(),
);

Map<String, dynamic> _$GeneralInfoToJson(_GeneralInfo instance) =>
    <String, dynamic>{
      'ave_age': instance.aveAge,
      'age': instance.age,
      'ave_weight': instance.aveWeight,
      'province_kill_requests': instance.provinceKillRequests,
      'province_kill_requests_quantity': instance.provinceKillRequestsQuantity,
      'province_kill_requests_weight': instance.provinceKillRequestsWeight,
      'kill_house_requests_quantity': instance.killHouseRequestsQuantity,
      'kill_house_requests': instance.killHouseRequests,
      'kill_house_requests_weight': instance.killHouseRequestsWeight,
      'total_quantity': instance.totalQuantity,
      'total_weight': instance.totalWeight,
    };
