// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'poultry_order.dart';

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

_PoultryOrder _$PoultryOrderFromJson(Map<String, dynamic> json) =>
    _PoultryOrder(
      key: json['key'] as String?,
      id: (json['id'] as num?)?.toInt(),
      poultry: json['poultry'] == null
          ? null
          : Poultry.fromJson(json['poultry'] as Map<String, dynamic>),
      orderCode: (json['order_code'] as num?)?.toInt(),
      createDate: json['create_date'] as String?,
      sendDate: json['send_date'] as String?,
      killHouseList: (json['kill_house_list'] as List<dynamic>?)
          ?.map((e) => e as String)
          .toList(),
      firstQuantity: (json['first_quantity'] as num?)?.toInt(),
      quantity: (json['quantity'] as num?)?.toInt(),
      directBuying: json['direct_buying'] as bool?,
      union: json['union'] as bool?,
      amount: (json['amount'] as num?)?.toDouble(),
      financialOperation: json['financial_operation'] as String?,
      remainQuantity: (json['remain_quantity'] as num?)?.toInt(),
      indexWeight: (json['Index_weight'] as num?)?.toDouble(),
      hatching: json['hatching'] == null
          ? null
          : Hatching.fromJson(json['hatching'] as Map<String, dynamic>),
      finalState: json['final_state'] as String?,
      losses: (json['losses'] as num?)?.toInt(),
      provinceState: json['province_state'] as String?,
      stateProcess: json['state_process'] as String?,
      registrar: json['registrar'] == null
          ? null
          : Registrar.fromJson(json['registrar'] as Map<String, dynamic>),
      vetFarm: json['vet_farm'] == null
          ? null
          : VetFarm.fromJson(json['vet_farm'] as Map<String, dynamic>),
      freeSaleInProvince: json['free_sale_in_province'] as bool?,
      freezing: json['freezing'] as bool?,
      export: json['export'] as bool?,
      cityCheckRequest: json['city_check_request'] as String?,
      market: json['market'] as bool?,
    );

Map<String, dynamic> _$PoultryOrderToJson(_PoultryOrder instance) =>
    <String, dynamic>{
      'key': instance.key,
      'id': instance.id,
      'poultry': instance.poultry,
      'order_code': instance.orderCode,
      'create_date': instance.createDate,
      'send_date': instance.sendDate,
      'kill_house_list': instance.killHouseList,
      'first_quantity': instance.firstQuantity,
      'quantity': instance.quantity,
      'direct_buying': instance.directBuying,
      'union': instance.union,
      'amount': instance.amount,
      'financial_operation': instance.financialOperation,
      'remain_quantity': instance.remainQuantity,
      'Index_weight': instance.indexWeight,
      'hatching': instance.hatching,
      'final_state': instance.finalState,
      'losses': instance.losses,
      'province_state': instance.provinceState,
      'state_process': instance.stateProcess,
      'registrar': instance.registrar,
      'vet_farm': instance.vetFarm,
      'free_sale_in_province': instance.freeSaleInProvince,
      'freezing': instance.freezing,
      'export': instance.export,
      'city_check_request': instance.cityCheckRequest,
      'market': instance.market,
    };

_Poultry _$PoultryFromJson(Map<String, dynamic> json) => _Poultry(
  unitName: json['unit_name'] as String?,
  cityOperator: json['city_operator'] as String?,
  user: json['user'] == null
      ? null
      : User.fromJson(json['user'] as Map<String, dynamic>),
  totalCapacity: (json['total_capacity'] as num?)?.toInt(),
  address: json['address'] == null
      ? null
      : Address.fromJson(json['address'] as Map<String, dynamic>),
  breedingUniqueId: json['breeding_unique_id'] as String?,
  systemCode: json['system_code'] as String?,
);

Map<String, dynamic> _$PoultryToJson(_Poultry instance) => <String, dynamic>{
  'unit_name': instance.unitName,
  'city_operator': instance.cityOperator,
  'user': instance.user,
  'total_capacity': instance.totalCapacity,
  'address': instance.address,
  'breeding_unique_id': instance.breedingUniqueId,
  'system_code': instance.systemCode,
};

_User _$UserFromJson(Map<String, dynamic> json) => _User(
  fullName: json['full_name'] as String?,
  firstName: json['first_name'] as String?,
  lastName: json['last_name'] as String?,
  baseOrder: (json['base_order'] as num?)?.toInt(),
  mobile: json['mobile'] as String?,
  nationalId: json['national_id'] as String?,
  nationalCode: json['national_code'] as String?,
  key: json['key'] as String?,
  city: json['city'] == null
      ? null
      : City.fromJson(json['city'] as Map<String, dynamic>),
  unitName: json['unit_name'] as String?,
  unitNationalId: json['unit_national_id'] as String?,
  unitRegistrationNumber: json['unit_registration_number'] as String?,
  unitEconomicalNumber: json['unit_economical_number'] as String?,
  unitProvince: json['unit_province'] as String?,
  unitCity: json['unit_city'] as String?,
  unitPostalCode: json['unit_postal_code'] as String?,
  unitAddress: json['unit_address'] as String?,
);

Map<String, dynamic> _$UserToJson(_User instance) => <String, dynamic>{
  'full_name': instance.fullName,
  'first_name': instance.firstName,
  'last_name': instance.lastName,
  'base_order': instance.baseOrder,
  'mobile': instance.mobile,
  'national_id': instance.nationalId,
  'national_code': instance.nationalCode,
  'key': instance.key,
  'city': instance.city,
  'unit_name': instance.unitName,
  'unit_national_id': instance.unitNationalId,
  'unit_registration_number': instance.unitRegistrationNumber,
  'unit_economical_number': instance.unitEconomicalNumber,
  'unit_province': instance.unitProvince,
  'unit_city': instance.unitCity,
  'unit_postal_code': instance.unitPostalCode,
  'unit_address': instance.unitAddress,
};

_City _$CityFromJson(Map<String, dynamic> json) => _City(
  id: (json['id'] as num?)?.toInt(),
  key: json['key'] as String?,
  createDate: json['create_date'] as String?,
  modifyDate: json['modify_date'] as String?,
  trash: json['trash'] as bool?,
  provinceIdForeignKey: (json['province_id_foreign_key'] as num?)?.toInt(),
  cityIdKey: (json['city_id_key'] as num?)?.toInt(),
  name: json['name'] as String?,
  productPrice: (json['product_price'] as num?)?.toDouble(),
  provinceCenter: json['province_center'] as bool?,
  cityNumber: (json['city_number'] as num?)?.toInt(),
  cityName: json['city_name'] as String?,
  provinceNumber: (json['province_number'] as num?)?.toInt(),
  provinceName: json['province_name'] as String?,
  createdBy: json['created_by'],
  modifiedBy: json['modified_by'],
  province: (json['province'] as num?)?.toInt(),
);

Map<String, dynamic> _$CityToJson(_City instance) => <String, dynamic>{
  'id': instance.id,
  'key': instance.key,
  'create_date': instance.createDate,
  'modify_date': instance.modifyDate,
  'trash': instance.trash,
  'province_id_foreign_key': instance.provinceIdForeignKey,
  'city_id_key': instance.cityIdKey,
  'name': instance.name,
  'product_price': instance.productPrice,
  'province_center': instance.provinceCenter,
  'city_number': instance.cityNumber,
  'city_name': instance.cityName,
  'province_number': instance.provinceNumber,
  'province_name': instance.provinceName,
  'created_by': instance.createdBy,
  'modified_by': instance.modifiedBy,
  'province': instance.province,
};

_Address _$AddressFromJson(Map<String, dynamic> json) => _Address(
  province: json['province'] == null
      ? null
      : Province.fromJson(json['province'] as Map<String, dynamic>),
  city: json['city'] == null
      ? null
      : City.fromJson(json['city'] as Map<String, dynamic>),
  address: json['address'] as String?,
  postalCode: json['postal_code'] as String?,
);

Map<String, dynamic> _$AddressToJson(_Address instance) => <String, dynamic>{
  'province': instance.province,
  'city': instance.city,
  'address': instance.address,
  'postal_code': instance.postalCode,
};

_Province _$ProvinceFromJson(Map<String, dynamic> json) =>
    _Province(key: json['key'] as String?, name: json['name'] as String?);

Map<String, dynamic> _$ProvinceToJson(_Province instance) => <String, dynamic>{
  'key': instance.key,
  'name': instance.name,
};

_Hatching _$HatchingFromJson(Map<String, dynamic> json) => _Hatching(
  age: (json['age'] as num?)?.toInt(),
  leftOver: (json['left_over'] as num?)?.toInt(),
  fileState: json['file_state'] as String?,
  hatchingDate: json['hatching_date'] as String?,
  allowHatching: json['allow_hatching'] as String?,
  inspectionLosses: (json['inspection_losses'] as num?)?.toInt(),
  inspectionLossesPercent: (json['inspection_losses_percent'] as num?)
      ?.toDouble(),
  totalLossesPercent: (json['total_losses_percent'] as num?)?.toDouble(),
  poultryLossesPercent: (json['poultry_losses_percent'] as num?)?.toDouble(),
  totalWeight: (json['total_weight'] as num?)?.toDouble(),
);

Map<String, dynamic> _$HatchingToJson(_Hatching instance) => <String, dynamic>{
  'age': instance.age,
  'left_over': instance.leftOver,
  'file_state': instance.fileState,
  'hatching_date': instance.hatchingDate,
  'allow_hatching': instance.allowHatching,
  'inspection_losses': instance.inspectionLosses,
  'inspection_losses_percent': instance.inspectionLossesPercent,
  'total_losses_percent': instance.totalLossesPercent,
  'poultry_losses_percent': instance.poultryLossesPercent,
  'total_weight': instance.totalWeight,
};

_Registrar _$RegistrarFromJson(Map<String, dynamic> json) => _Registrar(
  date: json['date'] as String?,
  role: json['role'] as String?,
  fullName: json['full_name'] as String?,
);

Map<String, dynamic> _$RegistrarToJson(_Registrar instance) =>
    <String, dynamic>{
      'date': instance.date,
      'role': instance.role,
      'full_name': instance.fullName,
    };

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

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