diff --git a/packages/chicken/lib/data/data_source/remote/poultry_science/poultry_science_remote.dart b/packages/chicken/lib/data/data_source/remote/poultry_science/poultry_science_remote.dart index 86a9bdd..30afb6b 100644 --- a/packages/chicken/lib/data/data_source/remote/poultry_science/poultry_science_remote.dart +++ b/packages/chicken/lib/data/data_source/remote/poultry_science/poultry_science_remote.dart @@ -1,5 +1,6 @@ import 'package:rasadyar_chicken/data/models/response/hatching/hatching_models.dart'; import 'package:rasadyar_chicken/data/models/response/hatching_report/hatching_report.dart'; +import 'package:rasadyar_chicken/data/models/response/poultry/poultry_farm.dart'; import 'package:rasadyar_chicken/data/models/response/poultry_science/home_poultry_science/home_poultry_science_model.dart'; import 'package:rasadyar_core/core.dart'; @@ -20,9 +21,13 @@ abstract class PoultryScienceRemoteDatasource { ProgressCallback? onSendProgress, }); - Future?> getPoultryScienceReport({ required String token, Map? queryParameters, }); + + Future?> getPoultryScienceFarmList({ + required String token, + Map? queryParameters, + }); } diff --git a/packages/chicken/lib/data/data_source/remote/poultry_science/poultry_science_remote_imp.dart b/packages/chicken/lib/data/data_source/remote/poultry_science/poultry_science_remote_imp.dart index cdde99d..f21ce58 100644 --- a/packages/chicken/lib/data/data_source/remote/poultry_science/poultry_science_remote_imp.dart +++ b/packages/chicken/lib/data/data_source/remote/poultry_science/poultry_science_remote_imp.dart @@ -1,5 +1,6 @@ import 'package:rasadyar_chicken/data/models/response/hatching/hatching_models.dart'; import 'package:rasadyar_chicken/data/models/response/hatching_report/hatching_report.dart'; +import 'package:rasadyar_chicken/data/models/response/poultry/poultry_farm.dart'; import 'package:rasadyar_chicken/data/models/response/poultry_science/home_poultry_science/home_poultry_science_model.dart'; import 'package:rasadyar_core/core.dart'; @@ -72,4 +73,21 @@ class PoultryScienceRemoteDatasourceImp implements PoultryScienceRemoteDatasourc ); return res.data; } + + @override + Future?> getPoultryScienceFarmList({ + required String token, + Map? queryParameters, + }) async{ + var res = await _httpClient.get( + '/poultry_and_hatching_for_poultry_science/', + headers: {'Authorization': 'Bearer $token'}, + queryParameters: queryParameters, + fromJson: (json) => PaginationModel.fromJson( + json, + (json) => PoultryFarm.fromJson(json as Map), + ), + ); + return res.data; + } } diff --git a/packages/chicken/lib/data/models/response/poultry/poultry_farm.dart b/packages/chicken/lib/data/models/response/poultry/poultry_farm.dart new file mode 100644 index 0000000..99669e1 --- /dev/null +++ b/packages/chicken/lib/data/models/response/poultry/poultry_farm.dart @@ -0,0 +1,151 @@ +import 'package:freezed_annotation/freezed_annotation.dart'; + +part 'poultry_farm.freezed.dart'; +part 'poultry_farm.g.dart'; + +@freezed +abstract class PoultryFarm with _$PoultryFarm { + const factory PoultryFarm({ + int? id, + User? user, + Address? address, + List? hatching, + VetFarm? vetFarm, + String? key, + bool? trash, + int? ownerIdForeignKey, + int? userIdForeignKey, + int? addressIdForeignKey, + bool? hasChainCompany, + int? userBankIdForeignKey, + dynamic cityOperator, + String? unitName, + String? gisCode, + int? operatingLicenceCapacity, + int? numberOfHalls, + bool? tenant, + bool? hasTenant, + dynamic personType, + dynamic economicCode, + String? systemCode, + String? epidemiologicalCode, + String? breedingUniqueId, + int? totalCapacity, + String? licenceNumber, + String? healthCertificateNumber, + int? numberOfRequests, + String? hatchingDate, + String? lastPartyDate, + int? numberOfIncubators, + int? herdAgeByDay, + int? herdAgeByWeek, + int? numberOfParty, + dynamic communicationType, + dynamic cooperative, + String? dateOfRegister, + dynamic unitStatus, + bool? active, + dynamic identityDocuments, + dynamic samasatUserCode, + dynamic baseOrder, + String? incubationDate, + int? walletAmount, + int? city, + int? cityNumber, + String? cityName, + int? provinceNumber, + String? provinceName, + int? walletIdForeignKey, + int? poultryIdKey, + double? lat, + double? long, + dynamic date, + int? killingAveAge, + int? activeLeftOver, + int? killingAveCount, + int? killingAveWeight, + int? killingLiveWeight, + int? killingCarcassesWeight, + int? killingLossWeightPercent, + double? realKillingAveWeight, + double? realKillingLiveWeight, + double? realKillingCarcassesWeight, + double? realKillingLossWeightPercent, + dynamic interestLicenseId, + bool? orderLimit, + dynamic owner, + dynamic userBankInfo, + int? wallet, + HatchingInfo? hatchingInfo, + }) = _PoultryFarm; + + factory PoultryFarm.fromJson(Map json) => + _$PoultryFarmFromJson(json); +} + +@freezed +abstract class User with _$User { + const factory User({ + String? fullname, + String? mobile, + }) = _User; + + factory User.fromJson(Map json) => _$UserFromJson(json); +} + +@freezed +abstract class Address with _$Address { + const factory Address({ + Province? province, + City? city, + String? address, + String? postalCode, + }) = _Address; + + factory Address.fromJson(Map json) => + _$AddressFromJson(json); +} + +@freezed +abstract class Province with _$Province { + const factory Province({ + String? key, + String? name, + }) = _Province; + + factory Province.fromJson(Map json) => + _$ProvinceFromJson(json); +} + +@freezed +abstract class City with _$City { + const factory City({ + String? key, + String? name, + }) = _City; + + factory City.fromJson(Map json) => _$CityFromJson(json); +} + + +@freezed +abstract class VetFarm with _$VetFarm{ + const factory VetFarm({ + String? fullName, + String? mobile, + String? city, + String? province, + }) = _VetFarm; + + factory VetFarm.fromJson(Map json) => _$VetFarmFromJson(json); +} + +@freezed +abstract class HatchingInfo with _$HatchingInfo{ + const factory HatchingInfo({ + int? period, + bool? activeHatching, + }) = _HatchingInfo; + + factory HatchingInfo.fromJson(Map json) => _$HatchingInfoFromJson(json); +} diff --git a/packages/chicken/lib/data/models/response/poultry/poultry_farm.freezed.dart b/packages/chicken/lib/data/models/response/poultry/poultry_farm.freezed.dart new file mode 100644 index 0000000..be9a8e8 --- /dev/null +++ b/packages/chicken/lib/data/models/response/poultry/poultry_farm.freezed.dart @@ -0,0 +1,2247 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'poultry_farm.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; + +/// @nodoc +mixin _$PoultryFarm { + + int? get id; User? get user; Address? get address; List? get hatching; VetFarm? get vetFarm; String? get key; bool? get trash; int? get ownerIdForeignKey; int? get userIdForeignKey; int? get addressIdForeignKey; bool? get hasChainCompany; int? get userBankIdForeignKey; dynamic get cityOperator; String? get unitName; String? get gisCode; int? get operatingLicenceCapacity; int? get numberOfHalls; bool? get tenant; bool? get hasTenant; dynamic get personType; dynamic get economicCode; String? get systemCode; String? get epidemiologicalCode; String? get breedingUniqueId; int? get totalCapacity; String? get licenceNumber; String? get healthCertificateNumber; int? get numberOfRequests; String? get hatchingDate; String? get lastPartyDate; int? get numberOfIncubators; int? get herdAgeByDay; int? get herdAgeByWeek; int? get numberOfParty; dynamic get communicationType; dynamic get cooperative; String? get dateOfRegister; dynamic get unitStatus; bool? get active; dynamic get identityDocuments; dynamic get samasatUserCode; dynamic get baseOrder; String? get incubationDate; int? get walletAmount; int? get city; int? get cityNumber; String? get cityName; int? get provinceNumber; String? get provinceName; int? get walletIdForeignKey; int? get poultryIdKey; double? get lat; double? get long; dynamic get date; int? get killingAveAge; int? get activeLeftOver; int? get killingAveCount; int? get killingAveWeight; int? get killingLiveWeight; int? get killingCarcassesWeight; int? get killingLossWeightPercent; double? get realKillingAveWeight; double? get realKillingLiveWeight; double? get realKillingCarcassesWeight; double? get realKillingLossWeightPercent; dynamic get interestLicenseId; bool? get orderLimit; dynamic get owner; dynamic get userBankInfo; int? get wallet; HatchingInfo? get hatchingInfo; +/// Create a copy of PoultryFarm +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$PoultryFarmCopyWith get copyWith => _$PoultryFarmCopyWithImpl(this as PoultryFarm, _$identity); + + /// Serializes this PoultryFarm to a JSON map. + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is PoultryFarm&&(identical(other.id, id) || other.id == id)&&(identical(other.user, user) || other.user == user)&&(identical(other.address, address) || other.address == address)&&const DeepCollectionEquality().equals(other.hatching, hatching)&&(identical(other.vetFarm, vetFarm) || other.vetFarm == vetFarm)&&(identical(other.key, key) || other.key == key)&&(identical(other.trash, trash) || other.trash == trash)&&(identical(other.ownerIdForeignKey, ownerIdForeignKey) || other.ownerIdForeignKey == ownerIdForeignKey)&&(identical(other.userIdForeignKey, userIdForeignKey) || other.userIdForeignKey == userIdForeignKey)&&(identical(other.addressIdForeignKey, addressIdForeignKey) || other.addressIdForeignKey == addressIdForeignKey)&&(identical(other.hasChainCompany, hasChainCompany) || other.hasChainCompany == hasChainCompany)&&(identical(other.userBankIdForeignKey, userBankIdForeignKey) || other.userBankIdForeignKey == userBankIdForeignKey)&&const DeepCollectionEquality().equals(other.cityOperator, cityOperator)&&(identical(other.unitName, unitName) || other.unitName == unitName)&&(identical(other.gisCode, gisCode) || other.gisCode == gisCode)&&(identical(other.operatingLicenceCapacity, operatingLicenceCapacity) || other.operatingLicenceCapacity == operatingLicenceCapacity)&&(identical(other.numberOfHalls, numberOfHalls) || other.numberOfHalls == numberOfHalls)&&(identical(other.tenant, tenant) || other.tenant == tenant)&&(identical(other.hasTenant, hasTenant) || other.hasTenant == hasTenant)&&const DeepCollectionEquality().equals(other.personType, personType)&&const DeepCollectionEquality().equals(other.economicCode, economicCode)&&(identical(other.systemCode, systemCode) || other.systemCode == systemCode)&&(identical(other.epidemiologicalCode, epidemiologicalCode) || other.epidemiologicalCode == epidemiologicalCode)&&(identical(other.breedingUniqueId, breedingUniqueId) || other.breedingUniqueId == breedingUniqueId)&&(identical(other.totalCapacity, totalCapacity) || other.totalCapacity == totalCapacity)&&(identical(other.licenceNumber, licenceNumber) || other.licenceNumber == licenceNumber)&&(identical(other.healthCertificateNumber, healthCertificateNumber) || other.healthCertificateNumber == healthCertificateNumber)&&(identical(other.numberOfRequests, numberOfRequests) || other.numberOfRequests == numberOfRequests)&&(identical(other.hatchingDate, hatchingDate) || other.hatchingDate == hatchingDate)&&(identical(other.lastPartyDate, lastPartyDate) || other.lastPartyDate == lastPartyDate)&&(identical(other.numberOfIncubators, numberOfIncubators) || other.numberOfIncubators == numberOfIncubators)&&(identical(other.herdAgeByDay, herdAgeByDay) || other.herdAgeByDay == herdAgeByDay)&&(identical(other.herdAgeByWeek, herdAgeByWeek) || other.herdAgeByWeek == herdAgeByWeek)&&(identical(other.numberOfParty, numberOfParty) || other.numberOfParty == numberOfParty)&&const DeepCollectionEquality().equals(other.communicationType, communicationType)&&const DeepCollectionEquality().equals(other.cooperative, cooperative)&&(identical(other.dateOfRegister, dateOfRegister) || other.dateOfRegister == dateOfRegister)&&const DeepCollectionEquality().equals(other.unitStatus, unitStatus)&&(identical(other.active, active) || other.active == active)&&const DeepCollectionEquality().equals(other.identityDocuments, identityDocuments)&&const DeepCollectionEquality().equals(other.samasatUserCode, samasatUserCode)&&const DeepCollectionEquality().equals(other.baseOrder, baseOrder)&&(identical(other.incubationDate, incubationDate) || other.incubationDate == incubationDate)&&(identical(other.walletAmount, walletAmount) || other.walletAmount == walletAmount)&&(identical(other.city, city) || other.city == city)&&(identical(other.cityNumber, cityNumber) || other.cityNumber == cityNumber)&&(identical(other.cityName, cityName) || other.cityName == cityName)&&(identical(other.provinceNumber, provinceNumber) || other.provinceNumber == provinceNumber)&&(identical(other.provinceName, provinceName) || other.provinceName == provinceName)&&(identical(other.walletIdForeignKey, walletIdForeignKey) || other.walletIdForeignKey == walletIdForeignKey)&&(identical(other.poultryIdKey, poultryIdKey) || other.poultryIdKey == poultryIdKey)&&(identical(other.lat, lat) || other.lat == lat)&&(identical(other.long, long) || other.long == long)&&const DeepCollectionEquality().equals(other.date, date)&&(identical(other.killingAveAge, killingAveAge) || other.killingAveAge == killingAveAge)&&(identical(other.activeLeftOver, activeLeftOver) || other.activeLeftOver == activeLeftOver)&&(identical(other.killingAveCount, killingAveCount) || other.killingAveCount == killingAveCount)&&(identical(other.killingAveWeight, killingAveWeight) || other.killingAveWeight == killingAveWeight)&&(identical(other.killingLiveWeight, killingLiveWeight) || other.killingLiveWeight == killingLiveWeight)&&(identical(other.killingCarcassesWeight, killingCarcassesWeight) || other.killingCarcassesWeight == killingCarcassesWeight)&&(identical(other.killingLossWeightPercent, killingLossWeightPercent) || other.killingLossWeightPercent == killingLossWeightPercent)&&(identical(other.realKillingAveWeight, realKillingAveWeight) || other.realKillingAveWeight == realKillingAveWeight)&&(identical(other.realKillingLiveWeight, realKillingLiveWeight) || other.realKillingLiveWeight == realKillingLiveWeight)&&(identical(other.realKillingCarcassesWeight, realKillingCarcassesWeight) || other.realKillingCarcassesWeight == realKillingCarcassesWeight)&&(identical(other.realKillingLossWeightPercent, realKillingLossWeightPercent) || other.realKillingLossWeightPercent == realKillingLossWeightPercent)&&const DeepCollectionEquality().equals(other.interestLicenseId, interestLicenseId)&&(identical(other.orderLimit, orderLimit) || other.orderLimit == orderLimit)&&const DeepCollectionEquality().equals(other.owner, owner)&&const DeepCollectionEquality().equals(other.userBankInfo, userBankInfo)&&(identical(other.wallet, wallet) || other.wallet == wallet)&&(identical(other.hatchingInfo, hatchingInfo) || other.hatchingInfo == hatchingInfo)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hashAll([runtimeType,id,user,address,const DeepCollectionEquality().hash(hatching),vetFarm,key,trash,ownerIdForeignKey,userIdForeignKey,addressIdForeignKey,hasChainCompany,userBankIdForeignKey,const DeepCollectionEquality().hash(cityOperator),unitName,gisCode,operatingLicenceCapacity,numberOfHalls,tenant,hasTenant,const DeepCollectionEquality().hash(personType),const DeepCollectionEquality().hash(economicCode),systemCode,epidemiologicalCode,breedingUniqueId,totalCapacity,licenceNumber,healthCertificateNumber,numberOfRequests,hatchingDate,lastPartyDate,numberOfIncubators,herdAgeByDay,herdAgeByWeek,numberOfParty,const DeepCollectionEquality().hash(communicationType),const DeepCollectionEquality().hash(cooperative),dateOfRegister,const DeepCollectionEquality().hash(unitStatus),active,const DeepCollectionEquality().hash(identityDocuments),const DeepCollectionEquality().hash(samasatUserCode),const DeepCollectionEquality().hash(baseOrder),incubationDate,walletAmount,city,cityNumber,cityName,provinceNumber,provinceName,walletIdForeignKey,poultryIdKey,lat,long,const DeepCollectionEquality().hash(date),killingAveAge,activeLeftOver,killingAveCount,killingAveWeight,killingLiveWeight,killingCarcassesWeight,killingLossWeightPercent,realKillingAveWeight,realKillingLiveWeight,realKillingCarcassesWeight,realKillingLossWeightPercent,const DeepCollectionEquality().hash(interestLicenseId),orderLimit,const DeepCollectionEquality().hash(owner),const DeepCollectionEquality().hash(userBankInfo),wallet,hatchingInfo]); + +@override +String toString() { + return 'PoultryFarm(id: $id, user: $user, address: $address, hatching: $hatching, vetFarm: $vetFarm, key: $key, trash: $trash, ownerIdForeignKey: $ownerIdForeignKey, userIdForeignKey: $userIdForeignKey, addressIdForeignKey: $addressIdForeignKey, hasChainCompany: $hasChainCompany, userBankIdForeignKey: $userBankIdForeignKey, cityOperator: $cityOperator, unitName: $unitName, gisCode: $gisCode, operatingLicenceCapacity: $operatingLicenceCapacity, numberOfHalls: $numberOfHalls, tenant: $tenant, hasTenant: $hasTenant, personType: $personType, economicCode: $economicCode, systemCode: $systemCode, epidemiologicalCode: $epidemiologicalCode, breedingUniqueId: $breedingUniqueId, totalCapacity: $totalCapacity, licenceNumber: $licenceNumber, healthCertificateNumber: $healthCertificateNumber, numberOfRequests: $numberOfRequests, hatchingDate: $hatchingDate, lastPartyDate: $lastPartyDate, numberOfIncubators: $numberOfIncubators, herdAgeByDay: $herdAgeByDay, herdAgeByWeek: $herdAgeByWeek, numberOfParty: $numberOfParty, communicationType: $communicationType, cooperative: $cooperative, dateOfRegister: $dateOfRegister, unitStatus: $unitStatus, active: $active, identityDocuments: $identityDocuments, samasatUserCode: $samasatUserCode, baseOrder: $baseOrder, incubationDate: $incubationDate, walletAmount: $walletAmount, city: $city, cityNumber: $cityNumber, cityName: $cityName, provinceNumber: $provinceNumber, provinceName: $provinceName, walletIdForeignKey: $walletIdForeignKey, poultryIdKey: $poultryIdKey, lat: $lat, long: $long, date: $date, killingAveAge: $killingAveAge, activeLeftOver: $activeLeftOver, killingAveCount: $killingAveCount, killingAveWeight: $killingAveWeight, killingLiveWeight: $killingLiveWeight, killingCarcassesWeight: $killingCarcassesWeight, killingLossWeightPercent: $killingLossWeightPercent, realKillingAveWeight: $realKillingAveWeight, realKillingLiveWeight: $realKillingLiveWeight, realKillingCarcassesWeight: $realKillingCarcassesWeight, realKillingLossWeightPercent: $realKillingLossWeightPercent, interestLicenseId: $interestLicenseId, orderLimit: $orderLimit, owner: $owner, userBankInfo: $userBankInfo, wallet: $wallet, hatchingInfo: $hatchingInfo)'; +} + + +} + +/// @nodoc +abstract mixin class $PoultryFarmCopyWith<$Res> { + factory $PoultryFarmCopyWith(PoultryFarm value, $Res Function(PoultryFarm) _then) = _$PoultryFarmCopyWithImpl; +@useResult +$Res call({ + int? id, User? user, Address? address, List? hatching, VetFarm? vetFarm, String? key, bool? trash, int? ownerIdForeignKey, int? userIdForeignKey, int? addressIdForeignKey, bool? hasChainCompany, int? userBankIdForeignKey, dynamic cityOperator, String? unitName, String? gisCode, int? operatingLicenceCapacity, int? numberOfHalls, bool? tenant, bool? hasTenant, dynamic personType, dynamic economicCode, String? systemCode, String? epidemiologicalCode, String? breedingUniqueId, int? totalCapacity, String? licenceNumber, String? healthCertificateNumber, int? numberOfRequests, String? hatchingDate, String? lastPartyDate, int? numberOfIncubators, int? herdAgeByDay, int? herdAgeByWeek, int? numberOfParty, dynamic communicationType, dynamic cooperative, String? dateOfRegister, dynamic unitStatus, bool? active, dynamic identityDocuments, dynamic samasatUserCode, dynamic baseOrder, String? incubationDate, int? walletAmount, int? city, int? cityNumber, String? cityName, int? provinceNumber, String? provinceName, int? walletIdForeignKey, int? poultryIdKey, double? lat, double? long, dynamic date, int? killingAveAge, int? activeLeftOver, int? killingAveCount, int? killingAveWeight, int? killingLiveWeight, int? killingCarcassesWeight, int? killingLossWeightPercent, double? realKillingAveWeight, double? realKillingLiveWeight, double? realKillingCarcassesWeight, double? realKillingLossWeightPercent, dynamic interestLicenseId, bool? orderLimit, dynamic owner, dynamic userBankInfo, int? wallet, HatchingInfo? hatchingInfo +}); + + +$UserCopyWith<$Res>? get user;$AddressCopyWith<$Res>? get address;$VetFarmCopyWith<$Res>? get vetFarm;$HatchingInfoCopyWith<$Res>? get hatchingInfo; + +} +/// @nodoc +class _$PoultryFarmCopyWithImpl<$Res> + implements $PoultryFarmCopyWith<$Res> { + _$PoultryFarmCopyWithImpl(this._self, this._then); + + final PoultryFarm _self; + final $Res Function(PoultryFarm) _then; + +/// Create a copy of PoultryFarm +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? id = freezed,Object? user = freezed,Object? address = freezed,Object? hatching = freezed,Object? vetFarm = freezed,Object? key = freezed,Object? trash = freezed,Object? ownerIdForeignKey = freezed,Object? userIdForeignKey = freezed,Object? addressIdForeignKey = freezed,Object? hasChainCompany = freezed,Object? userBankIdForeignKey = freezed,Object? cityOperator = freezed,Object? unitName = freezed,Object? gisCode = freezed,Object? operatingLicenceCapacity = freezed,Object? numberOfHalls = freezed,Object? tenant = freezed,Object? hasTenant = freezed,Object? personType = freezed,Object? economicCode = freezed,Object? systemCode = freezed,Object? epidemiologicalCode = freezed,Object? breedingUniqueId = freezed,Object? totalCapacity = freezed,Object? licenceNumber = freezed,Object? healthCertificateNumber = freezed,Object? numberOfRequests = freezed,Object? hatchingDate = freezed,Object? lastPartyDate = freezed,Object? numberOfIncubators = freezed,Object? herdAgeByDay = freezed,Object? herdAgeByWeek = freezed,Object? numberOfParty = freezed,Object? communicationType = freezed,Object? cooperative = freezed,Object? dateOfRegister = freezed,Object? unitStatus = freezed,Object? active = freezed,Object? identityDocuments = freezed,Object? samasatUserCode = freezed,Object? baseOrder = freezed,Object? incubationDate = freezed,Object? walletAmount = freezed,Object? city = freezed,Object? cityNumber = freezed,Object? cityName = freezed,Object? provinceNumber = freezed,Object? provinceName = freezed,Object? walletIdForeignKey = freezed,Object? poultryIdKey = freezed,Object? lat = freezed,Object? long = freezed,Object? date = freezed,Object? killingAveAge = freezed,Object? activeLeftOver = freezed,Object? killingAveCount = freezed,Object? killingAveWeight = freezed,Object? killingLiveWeight = freezed,Object? killingCarcassesWeight = freezed,Object? killingLossWeightPercent = freezed,Object? realKillingAveWeight = freezed,Object? realKillingLiveWeight = freezed,Object? realKillingCarcassesWeight = freezed,Object? realKillingLossWeightPercent = freezed,Object? interestLicenseId = freezed,Object? orderLimit = freezed,Object? owner = freezed,Object? userBankInfo = freezed,Object? wallet = freezed,Object? hatchingInfo = freezed,}) { + return _then(_self.copyWith( +id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable +as int?,user: freezed == user ? _self.user : user // ignore: cast_nullable_to_non_nullable +as User?,address: freezed == address ? _self.address : address // ignore: cast_nullable_to_non_nullable +as Address?,hatching: freezed == hatching ? _self.hatching : hatching // ignore: cast_nullable_to_non_nullable +as List?,vetFarm: freezed == vetFarm ? _self.vetFarm : vetFarm // ignore: cast_nullable_to_non_nullable +as VetFarm?,key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable +as String?,trash: freezed == trash ? _self.trash : trash // ignore: cast_nullable_to_non_nullable +as bool?,ownerIdForeignKey: freezed == ownerIdForeignKey ? _self.ownerIdForeignKey : ownerIdForeignKey // ignore: cast_nullable_to_non_nullable +as int?,userIdForeignKey: freezed == userIdForeignKey ? _self.userIdForeignKey : userIdForeignKey // ignore: cast_nullable_to_non_nullable +as int?,addressIdForeignKey: freezed == addressIdForeignKey ? _self.addressIdForeignKey : addressIdForeignKey // ignore: cast_nullable_to_non_nullable +as int?,hasChainCompany: freezed == hasChainCompany ? _self.hasChainCompany : hasChainCompany // ignore: cast_nullable_to_non_nullable +as bool?,userBankIdForeignKey: freezed == userBankIdForeignKey ? _self.userBankIdForeignKey : userBankIdForeignKey // ignore: cast_nullable_to_non_nullable +as int?,cityOperator: freezed == cityOperator ? _self.cityOperator : cityOperator // ignore: cast_nullable_to_non_nullable +as dynamic,unitName: freezed == unitName ? _self.unitName : unitName // ignore: cast_nullable_to_non_nullable +as String?,gisCode: freezed == gisCode ? _self.gisCode : gisCode // ignore: cast_nullable_to_non_nullable +as String?,operatingLicenceCapacity: freezed == operatingLicenceCapacity ? _self.operatingLicenceCapacity : operatingLicenceCapacity // ignore: cast_nullable_to_non_nullable +as int?,numberOfHalls: freezed == numberOfHalls ? _self.numberOfHalls : numberOfHalls // ignore: cast_nullable_to_non_nullable +as int?,tenant: freezed == tenant ? _self.tenant : tenant // ignore: cast_nullable_to_non_nullable +as bool?,hasTenant: freezed == hasTenant ? _self.hasTenant : hasTenant // ignore: cast_nullable_to_non_nullable +as bool?,personType: freezed == personType ? _self.personType : personType // ignore: cast_nullable_to_non_nullable +as dynamic,economicCode: freezed == economicCode ? _self.economicCode : economicCode // ignore: cast_nullable_to_non_nullable +as dynamic,systemCode: freezed == systemCode ? _self.systemCode : systemCode // ignore: cast_nullable_to_non_nullable +as String?,epidemiologicalCode: freezed == epidemiologicalCode ? _self.epidemiologicalCode : epidemiologicalCode // ignore: cast_nullable_to_non_nullable +as String?,breedingUniqueId: freezed == breedingUniqueId ? _self.breedingUniqueId : breedingUniqueId // ignore: cast_nullable_to_non_nullable +as String?,totalCapacity: freezed == totalCapacity ? _self.totalCapacity : totalCapacity // ignore: cast_nullable_to_non_nullable +as int?,licenceNumber: freezed == licenceNumber ? _self.licenceNumber : licenceNumber // ignore: cast_nullable_to_non_nullable +as String?,healthCertificateNumber: freezed == healthCertificateNumber ? _self.healthCertificateNumber : healthCertificateNumber // ignore: cast_nullable_to_non_nullable +as String?,numberOfRequests: freezed == numberOfRequests ? _self.numberOfRequests : numberOfRequests // ignore: cast_nullable_to_non_nullable +as int?,hatchingDate: freezed == hatchingDate ? _self.hatchingDate : hatchingDate // ignore: cast_nullable_to_non_nullable +as String?,lastPartyDate: freezed == lastPartyDate ? _self.lastPartyDate : lastPartyDate // ignore: cast_nullable_to_non_nullable +as String?,numberOfIncubators: freezed == numberOfIncubators ? _self.numberOfIncubators : numberOfIncubators // ignore: cast_nullable_to_non_nullable +as int?,herdAgeByDay: freezed == herdAgeByDay ? _self.herdAgeByDay : herdAgeByDay // ignore: cast_nullable_to_non_nullable +as int?,herdAgeByWeek: freezed == herdAgeByWeek ? _self.herdAgeByWeek : herdAgeByWeek // ignore: cast_nullable_to_non_nullable +as int?,numberOfParty: freezed == numberOfParty ? _self.numberOfParty : numberOfParty // ignore: cast_nullable_to_non_nullable +as int?,communicationType: freezed == communicationType ? _self.communicationType : communicationType // ignore: cast_nullable_to_non_nullable +as dynamic,cooperative: freezed == cooperative ? _self.cooperative : cooperative // ignore: cast_nullable_to_non_nullable +as dynamic,dateOfRegister: freezed == dateOfRegister ? _self.dateOfRegister : dateOfRegister // ignore: cast_nullable_to_non_nullable +as String?,unitStatus: freezed == unitStatus ? _self.unitStatus : unitStatus // ignore: cast_nullable_to_non_nullable +as dynamic,active: freezed == active ? _self.active : active // ignore: cast_nullable_to_non_nullable +as bool?,identityDocuments: freezed == identityDocuments ? _self.identityDocuments : identityDocuments // ignore: cast_nullable_to_non_nullable +as dynamic,samasatUserCode: freezed == samasatUserCode ? _self.samasatUserCode : samasatUserCode // ignore: cast_nullable_to_non_nullable +as dynamic,baseOrder: freezed == baseOrder ? _self.baseOrder : baseOrder // ignore: cast_nullable_to_non_nullable +as dynamic,incubationDate: freezed == incubationDate ? _self.incubationDate : incubationDate // ignore: cast_nullable_to_non_nullable +as String?,walletAmount: freezed == walletAmount ? _self.walletAmount : walletAmount // ignore: cast_nullable_to_non_nullable +as int?,city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable +as int?,cityNumber: freezed == cityNumber ? _self.cityNumber : cityNumber // ignore: cast_nullable_to_non_nullable +as int?,cityName: freezed == cityName ? _self.cityName : cityName // ignore: cast_nullable_to_non_nullable +as String?,provinceNumber: freezed == provinceNumber ? _self.provinceNumber : provinceNumber // ignore: cast_nullable_to_non_nullable +as int?,provinceName: freezed == provinceName ? _self.provinceName : provinceName // ignore: cast_nullable_to_non_nullable +as String?,walletIdForeignKey: freezed == walletIdForeignKey ? _self.walletIdForeignKey : walletIdForeignKey // ignore: cast_nullable_to_non_nullable +as int?,poultryIdKey: freezed == poultryIdKey ? _self.poultryIdKey : poultryIdKey // ignore: cast_nullable_to_non_nullable +as int?,lat: freezed == lat ? _self.lat : lat // ignore: cast_nullable_to_non_nullable +as double?,long: freezed == long ? _self.long : long // ignore: cast_nullable_to_non_nullable +as double?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable +as dynamic,killingAveAge: freezed == killingAveAge ? _self.killingAveAge : killingAveAge // ignore: cast_nullable_to_non_nullable +as int?,activeLeftOver: freezed == activeLeftOver ? _self.activeLeftOver : activeLeftOver // ignore: cast_nullable_to_non_nullable +as int?,killingAveCount: freezed == killingAveCount ? _self.killingAveCount : killingAveCount // ignore: cast_nullable_to_non_nullable +as int?,killingAveWeight: freezed == killingAveWeight ? _self.killingAveWeight : killingAveWeight // ignore: cast_nullable_to_non_nullable +as int?,killingLiveWeight: freezed == killingLiveWeight ? _self.killingLiveWeight : killingLiveWeight // ignore: cast_nullable_to_non_nullable +as int?,killingCarcassesWeight: freezed == killingCarcassesWeight ? _self.killingCarcassesWeight : killingCarcassesWeight // ignore: cast_nullable_to_non_nullable +as int?,killingLossWeightPercent: freezed == killingLossWeightPercent ? _self.killingLossWeightPercent : killingLossWeightPercent // ignore: cast_nullable_to_non_nullable +as int?,realKillingAveWeight: freezed == realKillingAveWeight ? _self.realKillingAveWeight : realKillingAveWeight // ignore: cast_nullable_to_non_nullable +as double?,realKillingLiveWeight: freezed == realKillingLiveWeight ? _self.realKillingLiveWeight : realKillingLiveWeight // ignore: cast_nullable_to_non_nullable +as double?,realKillingCarcassesWeight: freezed == realKillingCarcassesWeight ? _self.realKillingCarcassesWeight : realKillingCarcassesWeight // ignore: cast_nullable_to_non_nullable +as double?,realKillingLossWeightPercent: freezed == realKillingLossWeightPercent ? _self.realKillingLossWeightPercent : realKillingLossWeightPercent // ignore: cast_nullable_to_non_nullable +as double?,interestLicenseId: freezed == interestLicenseId ? _self.interestLicenseId : interestLicenseId // ignore: cast_nullable_to_non_nullable +as dynamic,orderLimit: freezed == orderLimit ? _self.orderLimit : orderLimit // ignore: cast_nullable_to_non_nullable +as bool?,owner: freezed == owner ? _self.owner : owner // ignore: cast_nullable_to_non_nullable +as dynamic,userBankInfo: freezed == userBankInfo ? _self.userBankInfo : userBankInfo // ignore: cast_nullable_to_non_nullable +as dynamic,wallet: freezed == wallet ? _self.wallet : wallet // ignore: cast_nullable_to_non_nullable +as int?,hatchingInfo: freezed == hatchingInfo ? _self.hatchingInfo : hatchingInfo // ignore: cast_nullable_to_non_nullable +as HatchingInfo?, + )); +} +/// Create a copy of PoultryFarm +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$UserCopyWith<$Res>? get user { + if (_self.user == null) { + return null; + } + + return $UserCopyWith<$Res>(_self.user!, (value) { + return _then(_self.copyWith(user: value)); + }); +}/// Create a copy of PoultryFarm +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res>? get address { + if (_self.address == null) { + return null; + } + + return $AddressCopyWith<$Res>(_self.address!, (value) { + return _then(_self.copyWith(address: value)); + }); +}/// Create a copy of PoultryFarm +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VetFarmCopyWith<$Res>? get vetFarm { + if (_self.vetFarm == null) { + return null; + } + + return $VetFarmCopyWith<$Res>(_self.vetFarm!, (value) { + return _then(_self.copyWith(vetFarm: value)); + }); +}/// Create a copy of PoultryFarm +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$HatchingInfoCopyWith<$Res>? get hatchingInfo { + if (_self.hatchingInfo == null) { + return null; + } + + return $HatchingInfoCopyWith<$Res>(_self.hatchingInfo!, (value) { + return _then(_self.copyWith(hatchingInfo: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [PoultryFarm]. +extension PoultryFarmPatterns on PoultryFarm { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _PoultryFarm value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _PoultryFarm() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _PoultryFarm value) $default,){ +final _that = this; +switch (_that) { +case _PoultryFarm(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _PoultryFarm value)? $default,){ +final _that = this; +switch (_that) { +case _PoultryFarm() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( int? id, User? user, Address? address, List? hatching, VetFarm? vetFarm, String? key, bool? trash, int? ownerIdForeignKey, int? userIdForeignKey, int? addressIdForeignKey, bool? hasChainCompany, int? userBankIdForeignKey, dynamic cityOperator, String? unitName, String? gisCode, int? operatingLicenceCapacity, int? numberOfHalls, bool? tenant, bool? hasTenant, dynamic personType, dynamic economicCode, String? systemCode, String? epidemiologicalCode, String? breedingUniqueId, int? totalCapacity, String? licenceNumber, String? healthCertificateNumber, int? numberOfRequests, String? hatchingDate, String? lastPartyDate, int? numberOfIncubators, int? herdAgeByDay, int? herdAgeByWeek, int? numberOfParty, dynamic communicationType, dynamic cooperative, String? dateOfRegister, dynamic unitStatus, bool? active, dynamic identityDocuments, dynamic samasatUserCode, dynamic baseOrder, String? incubationDate, int? walletAmount, int? city, int? cityNumber, String? cityName, int? provinceNumber, String? provinceName, int? walletIdForeignKey, int? poultryIdKey, double? lat, double? long, dynamic date, int? killingAveAge, int? activeLeftOver, int? killingAveCount, int? killingAveWeight, int? killingLiveWeight, int? killingCarcassesWeight, int? killingLossWeightPercent, double? realKillingAveWeight, double? realKillingLiveWeight, double? realKillingCarcassesWeight, double? realKillingLossWeightPercent, dynamic interestLicenseId, bool? orderLimit, dynamic owner, dynamic userBankInfo, int? wallet, HatchingInfo? hatchingInfo)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _PoultryFarm() when $default != null: +return $default(_that.id,_that.user,_that.address,_that.hatching,_that.vetFarm,_that.key,_that.trash,_that.ownerIdForeignKey,_that.userIdForeignKey,_that.addressIdForeignKey,_that.hasChainCompany,_that.userBankIdForeignKey,_that.cityOperator,_that.unitName,_that.gisCode,_that.operatingLicenceCapacity,_that.numberOfHalls,_that.tenant,_that.hasTenant,_that.personType,_that.economicCode,_that.systemCode,_that.epidemiologicalCode,_that.breedingUniqueId,_that.totalCapacity,_that.licenceNumber,_that.healthCertificateNumber,_that.numberOfRequests,_that.hatchingDate,_that.lastPartyDate,_that.numberOfIncubators,_that.herdAgeByDay,_that.herdAgeByWeek,_that.numberOfParty,_that.communicationType,_that.cooperative,_that.dateOfRegister,_that.unitStatus,_that.active,_that.identityDocuments,_that.samasatUserCode,_that.baseOrder,_that.incubationDate,_that.walletAmount,_that.city,_that.cityNumber,_that.cityName,_that.provinceNumber,_that.provinceName,_that.walletIdForeignKey,_that.poultryIdKey,_that.lat,_that.long,_that.date,_that.killingAveAge,_that.activeLeftOver,_that.killingAveCount,_that.killingAveWeight,_that.killingLiveWeight,_that.killingCarcassesWeight,_that.killingLossWeightPercent,_that.realKillingAveWeight,_that.realKillingLiveWeight,_that.realKillingCarcassesWeight,_that.realKillingLossWeightPercent,_that.interestLicenseId,_that.orderLimit,_that.owner,_that.userBankInfo,_that.wallet,_that.hatchingInfo);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( int? id, User? user, Address? address, List? hatching, VetFarm? vetFarm, String? key, bool? trash, int? ownerIdForeignKey, int? userIdForeignKey, int? addressIdForeignKey, bool? hasChainCompany, int? userBankIdForeignKey, dynamic cityOperator, String? unitName, String? gisCode, int? operatingLicenceCapacity, int? numberOfHalls, bool? tenant, bool? hasTenant, dynamic personType, dynamic economicCode, String? systemCode, String? epidemiologicalCode, String? breedingUniqueId, int? totalCapacity, String? licenceNumber, String? healthCertificateNumber, int? numberOfRequests, String? hatchingDate, String? lastPartyDate, int? numberOfIncubators, int? herdAgeByDay, int? herdAgeByWeek, int? numberOfParty, dynamic communicationType, dynamic cooperative, String? dateOfRegister, dynamic unitStatus, bool? active, dynamic identityDocuments, dynamic samasatUserCode, dynamic baseOrder, String? incubationDate, int? walletAmount, int? city, int? cityNumber, String? cityName, int? provinceNumber, String? provinceName, int? walletIdForeignKey, int? poultryIdKey, double? lat, double? long, dynamic date, int? killingAveAge, int? activeLeftOver, int? killingAveCount, int? killingAveWeight, int? killingLiveWeight, int? killingCarcassesWeight, int? killingLossWeightPercent, double? realKillingAveWeight, double? realKillingLiveWeight, double? realKillingCarcassesWeight, double? realKillingLossWeightPercent, dynamic interestLicenseId, bool? orderLimit, dynamic owner, dynamic userBankInfo, int? wallet, HatchingInfo? hatchingInfo) $default,) {final _that = this; +switch (_that) { +case _PoultryFarm(): +return $default(_that.id,_that.user,_that.address,_that.hatching,_that.vetFarm,_that.key,_that.trash,_that.ownerIdForeignKey,_that.userIdForeignKey,_that.addressIdForeignKey,_that.hasChainCompany,_that.userBankIdForeignKey,_that.cityOperator,_that.unitName,_that.gisCode,_that.operatingLicenceCapacity,_that.numberOfHalls,_that.tenant,_that.hasTenant,_that.personType,_that.economicCode,_that.systemCode,_that.epidemiologicalCode,_that.breedingUniqueId,_that.totalCapacity,_that.licenceNumber,_that.healthCertificateNumber,_that.numberOfRequests,_that.hatchingDate,_that.lastPartyDate,_that.numberOfIncubators,_that.herdAgeByDay,_that.herdAgeByWeek,_that.numberOfParty,_that.communicationType,_that.cooperative,_that.dateOfRegister,_that.unitStatus,_that.active,_that.identityDocuments,_that.samasatUserCode,_that.baseOrder,_that.incubationDate,_that.walletAmount,_that.city,_that.cityNumber,_that.cityName,_that.provinceNumber,_that.provinceName,_that.walletIdForeignKey,_that.poultryIdKey,_that.lat,_that.long,_that.date,_that.killingAveAge,_that.activeLeftOver,_that.killingAveCount,_that.killingAveWeight,_that.killingLiveWeight,_that.killingCarcassesWeight,_that.killingLossWeightPercent,_that.realKillingAveWeight,_that.realKillingLiveWeight,_that.realKillingCarcassesWeight,_that.realKillingLossWeightPercent,_that.interestLicenseId,_that.orderLimit,_that.owner,_that.userBankInfo,_that.wallet,_that.hatchingInfo);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( int? id, User? user, Address? address, List? hatching, VetFarm? vetFarm, String? key, bool? trash, int? ownerIdForeignKey, int? userIdForeignKey, int? addressIdForeignKey, bool? hasChainCompany, int? userBankIdForeignKey, dynamic cityOperator, String? unitName, String? gisCode, int? operatingLicenceCapacity, int? numberOfHalls, bool? tenant, bool? hasTenant, dynamic personType, dynamic economicCode, String? systemCode, String? epidemiologicalCode, String? breedingUniqueId, int? totalCapacity, String? licenceNumber, String? healthCertificateNumber, int? numberOfRequests, String? hatchingDate, String? lastPartyDate, int? numberOfIncubators, int? herdAgeByDay, int? herdAgeByWeek, int? numberOfParty, dynamic communicationType, dynamic cooperative, String? dateOfRegister, dynamic unitStatus, bool? active, dynamic identityDocuments, dynamic samasatUserCode, dynamic baseOrder, String? incubationDate, int? walletAmount, int? city, int? cityNumber, String? cityName, int? provinceNumber, String? provinceName, int? walletIdForeignKey, int? poultryIdKey, double? lat, double? long, dynamic date, int? killingAveAge, int? activeLeftOver, int? killingAveCount, int? killingAveWeight, int? killingLiveWeight, int? killingCarcassesWeight, int? killingLossWeightPercent, double? realKillingAveWeight, double? realKillingLiveWeight, double? realKillingCarcassesWeight, double? realKillingLossWeightPercent, dynamic interestLicenseId, bool? orderLimit, dynamic owner, dynamic userBankInfo, int? wallet, HatchingInfo? hatchingInfo)? $default,) {final _that = this; +switch (_that) { +case _PoultryFarm() when $default != null: +return $default(_that.id,_that.user,_that.address,_that.hatching,_that.vetFarm,_that.key,_that.trash,_that.ownerIdForeignKey,_that.userIdForeignKey,_that.addressIdForeignKey,_that.hasChainCompany,_that.userBankIdForeignKey,_that.cityOperator,_that.unitName,_that.gisCode,_that.operatingLicenceCapacity,_that.numberOfHalls,_that.tenant,_that.hasTenant,_that.personType,_that.economicCode,_that.systemCode,_that.epidemiologicalCode,_that.breedingUniqueId,_that.totalCapacity,_that.licenceNumber,_that.healthCertificateNumber,_that.numberOfRequests,_that.hatchingDate,_that.lastPartyDate,_that.numberOfIncubators,_that.herdAgeByDay,_that.herdAgeByWeek,_that.numberOfParty,_that.communicationType,_that.cooperative,_that.dateOfRegister,_that.unitStatus,_that.active,_that.identityDocuments,_that.samasatUserCode,_that.baseOrder,_that.incubationDate,_that.walletAmount,_that.city,_that.cityNumber,_that.cityName,_that.provinceNumber,_that.provinceName,_that.walletIdForeignKey,_that.poultryIdKey,_that.lat,_that.long,_that.date,_that.killingAveAge,_that.activeLeftOver,_that.killingAveCount,_that.killingAveWeight,_that.killingLiveWeight,_that.killingCarcassesWeight,_that.killingLossWeightPercent,_that.realKillingAveWeight,_that.realKillingLiveWeight,_that.realKillingCarcassesWeight,_that.realKillingLossWeightPercent,_that.interestLicenseId,_that.orderLimit,_that.owner,_that.userBankInfo,_that.wallet,_that.hatchingInfo);case _: + return null; + +} +} + +} + +/// @nodoc +@JsonSerializable() + +class _PoultryFarm implements PoultryFarm { + const _PoultryFarm({this.id, this.user, this.address, final List? hatching, this.vetFarm, this.key, this.trash, this.ownerIdForeignKey, this.userIdForeignKey, this.addressIdForeignKey, this.hasChainCompany, this.userBankIdForeignKey, this.cityOperator, this.unitName, this.gisCode, this.operatingLicenceCapacity, this.numberOfHalls, this.tenant, this.hasTenant, this.personType, this.economicCode, this.systemCode, this.epidemiologicalCode, this.breedingUniqueId, this.totalCapacity, this.licenceNumber, this.healthCertificateNumber, this.numberOfRequests, this.hatchingDate, this.lastPartyDate, this.numberOfIncubators, this.herdAgeByDay, this.herdAgeByWeek, this.numberOfParty, this.communicationType, this.cooperative, this.dateOfRegister, this.unitStatus, this.active, this.identityDocuments, this.samasatUserCode, this.baseOrder, this.incubationDate, this.walletAmount, this.city, this.cityNumber, this.cityName, this.provinceNumber, this.provinceName, this.walletIdForeignKey, this.poultryIdKey, this.lat, this.long, this.date, this.killingAveAge, this.activeLeftOver, this.killingAveCount, this.killingAveWeight, this.killingLiveWeight, this.killingCarcassesWeight, this.killingLossWeightPercent, this.realKillingAveWeight, this.realKillingLiveWeight, this.realKillingCarcassesWeight, this.realKillingLossWeightPercent, this.interestLicenseId, this.orderLimit, this.owner, this.userBankInfo, this.wallet, this.hatchingInfo}): _hatching = hatching; + factory _PoultryFarm.fromJson(Map json) => _$PoultryFarmFromJson(json); + +@override final int? id; +@override final User? user; +@override final Address? address; + final List? _hatching; +@override List? get hatching { + final value = _hatching; + if (value == null) return null; + if (_hatching is EqualUnmodifiableListView) return _hatching; + // ignore: implicit_dynamic_type + return EqualUnmodifiableListView(value); +} + +@override final VetFarm? vetFarm; +@override final String? key; +@override final bool? trash; +@override final int? ownerIdForeignKey; +@override final int? userIdForeignKey; +@override final int? addressIdForeignKey; +@override final bool? hasChainCompany; +@override final int? userBankIdForeignKey; +@override final dynamic cityOperator; +@override final String? unitName; +@override final String? gisCode; +@override final int? operatingLicenceCapacity; +@override final int? numberOfHalls; +@override final bool? tenant; +@override final bool? hasTenant; +@override final dynamic personType; +@override final dynamic economicCode; +@override final String? systemCode; +@override final String? epidemiologicalCode; +@override final String? breedingUniqueId; +@override final int? totalCapacity; +@override final String? licenceNumber; +@override final String? healthCertificateNumber; +@override final int? numberOfRequests; +@override final String? hatchingDate; +@override final String? lastPartyDate; +@override final int? numberOfIncubators; +@override final int? herdAgeByDay; +@override final int? herdAgeByWeek; +@override final int? numberOfParty; +@override final dynamic communicationType; +@override final dynamic cooperative; +@override final String? dateOfRegister; +@override final dynamic unitStatus; +@override final bool? active; +@override final dynamic identityDocuments; +@override final dynamic samasatUserCode; +@override final dynamic baseOrder; +@override final String? incubationDate; +@override final int? walletAmount; +@override final int? city; +@override final int? cityNumber; +@override final String? cityName; +@override final int? provinceNumber; +@override final String? provinceName; +@override final int? walletIdForeignKey; +@override final int? poultryIdKey; +@override final double? lat; +@override final double? long; +@override final dynamic date; +@override final int? killingAveAge; +@override final int? activeLeftOver; +@override final int? killingAveCount; +@override final int? killingAveWeight; +@override final int? killingLiveWeight; +@override final int? killingCarcassesWeight; +@override final int? killingLossWeightPercent; +@override final double? realKillingAveWeight; +@override final double? realKillingLiveWeight; +@override final double? realKillingCarcassesWeight; +@override final double? realKillingLossWeightPercent; +@override final dynamic interestLicenseId; +@override final bool? orderLimit; +@override final dynamic owner; +@override final dynamic userBankInfo; +@override final int? wallet; +@override final HatchingInfo? hatchingInfo; + +/// Create a copy of PoultryFarm +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$PoultryFarmCopyWith<_PoultryFarm> get copyWith => __$PoultryFarmCopyWithImpl<_PoultryFarm>(this, _$identity); + +@override +Map toJson() { + return _$PoultryFarmToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _PoultryFarm&&(identical(other.id, id) || other.id == id)&&(identical(other.user, user) || other.user == user)&&(identical(other.address, address) || other.address == address)&&const DeepCollectionEquality().equals(other._hatching, _hatching)&&(identical(other.vetFarm, vetFarm) || other.vetFarm == vetFarm)&&(identical(other.key, key) || other.key == key)&&(identical(other.trash, trash) || other.trash == trash)&&(identical(other.ownerIdForeignKey, ownerIdForeignKey) || other.ownerIdForeignKey == ownerIdForeignKey)&&(identical(other.userIdForeignKey, userIdForeignKey) || other.userIdForeignKey == userIdForeignKey)&&(identical(other.addressIdForeignKey, addressIdForeignKey) || other.addressIdForeignKey == addressIdForeignKey)&&(identical(other.hasChainCompany, hasChainCompany) || other.hasChainCompany == hasChainCompany)&&(identical(other.userBankIdForeignKey, userBankIdForeignKey) || other.userBankIdForeignKey == userBankIdForeignKey)&&const DeepCollectionEquality().equals(other.cityOperator, cityOperator)&&(identical(other.unitName, unitName) || other.unitName == unitName)&&(identical(other.gisCode, gisCode) || other.gisCode == gisCode)&&(identical(other.operatingLicenceCapacity, operatingLicenceCapacity) || other.operatingLicenceCapacity == operatingLicenceCapacity)&&(identical(other.numberOfHalls, numberOfHalls) || other.numberOfHalls == numberOfHalls)&&(identical(other.tenant, tenant) || other.tenant == tenant)&&(identical(other.hasTenant, hasTenant) || other.hasTenant == hasTenant)&&const DeepCollectionEquality().equals(other.personType, personType)&&const DeepCollectionEquality().equals(other.economicCode, economicCode)&&(identical(other.systemCode, systemCode) || other.systemCode == systemCode)&&(identical(other.epidemiologicalCode, epidemiologicalCode) || other.epidemiologicalCode == epidemiologicalCode)&&(identical(other.breedingUniqueId, breedingUniqueId) || other.breedingUniqueId == breedingUniqueId)&&(identical(other.totalCapacity, totalCapacity) || other.totalCapacity == totalCapacity)&&(identical(other.licenceNumber, licenceNumber) || other.licenceNumber == licenceNumber)&&(identical(other.healthCertificateNumber, healthCertificateNumber) || other.healthCertificateNumber == healthCertificateNumber)&&(identical(other.numberOfRequests, numberOfRequests) || other.numberOfRequests == numberOfRequests)&&(identical(other.hatchingDate, hatchingDate) || other.hatchingDate == hatchingDate)&&(identical(other.lastPartyDate, lastPartyDate) || other.lastPartyDate == lastPartyDate)&&(identical(other.numberOfIncubators, numberOfIncubators) || other.numberOfIncubators == numberOfIncubators)&&(identical(other.herdAgeByDay, herdAgeByDay) || other.herdAgeByDay == herdAgeByDay)&&(identical(other.herdAgeByWeek, herdAgeByWeek) || other.herdAgeByWeek == herdAgeByWeek)&&(identical(other.numberOfParty, numberOfParty) || other.numberOfParty == numberOfParty)&&const DeepCollectionEquality().equals(other.communicationType, communicationType)&&const DeepCollectionEquality().equals(other.cooperative, cooperative)&&(identical(other.dateOfRegister, dateOfRegister) || other.dateOfRegister == dateOfRegister)&&const DeepCollectionEquality().equals(other.unitStatus, unitStatus)&&(identical(other.active, active) || other.active == active)&&const DeepCollectionEquality().equals(other.identityDocuments, identityDocuments)&&const DeepCollectionEquality().equals(other.samasatUserCode, samasatUserCode)&&const DeepCollectionEquality().equals(other.baseOrder, baseOrder)&&(identical(other.incubationDate, incubationDate) || other.incubationDate == incubationDate)&&(identical(other.walletAmount, walletAmount) || other.walletAmount == walletAmount)&&(identical(other.city, city) || other.city == city)&&(identical(other.cityNumber, cityNumber) || other.cityNumber == cityNumber)&&(identical(other.cityName, cityName) || other.cityName == cityName)&&(identical(other.provinceNumber, provinceNumber) || other.provinceNumber == provinceNumber)&&(identical(other.provinceName, provinceName) || other.provinceName == provinceName)&&(identical(other.walletIdForeignKey, walletIdForeignKey) || other.walletIdForeignKey == walletIdForeignKey)&&(identical(other.poultryIdKey, poultryIdKey) || other.poultryIdKey == poultryIdKey)&&(identical(other.lat, lat) || other.lat == lat)&&(identical(other.long, long) || other.long == long)&&const DeepCollectionEquality().equals(other.date, date)&&(identical(other.killingAveAge, killingAveAge) || other.killingAveAge == killingAveAge)&&(identical(other.activeLeftOver, activeLeftOver) || other.activeLeftOver == activeLeftOver)&&(identical(other.killingAveCount, killingAveCount) || other.killingAveCount == killingAveCount)&&(identical(other.killingAveWeight, killingAveWeight) || other.killingAveWeight == killingAveWeight)&&(identical(other.killingLiveWeight, killingLiveWeight) || other.killingLiveWeight == killingLiveWeight)&&(identical(other.killingCarcassesWeight, killingCarcassesWeight) || other.killingCarcassesWeight == killingCarcassesWeight)&&(identical(other.killingLossWeightPercent, killingLossWeightPercent) || other.killingLossWeightPercent == killingLossWeightPercent)&&(identical(other.realKillingAveWeight, realKillingAveWeight) || other.realKillingAveWeight == realKillingAveWeight)&&(identical(other.realKillingLiveWeight, realKillingLiveWeight) || other.realKillingLiveWeight == realKillingLiveWeight)&&(identical(other.realKillingCarcassesWeight, realKillingCarcassesWeight) || other.realKillingCarcassesWeight == realKillingCarcassesWeight)&&(identical(other.realKillingLossWeightPercent, realKillingLossWeightPercent) || other.realKillingLossWeightPercent == realKillingLossWeightPercent)&&const DeepCollectionEquality().equals(other.interestLicenseId, interestLicenseId)&&(identical(other.orderLimit, orderLimit) || other.orderLimit == orderLimit)&&const DeepCollectionEquality().equals(other.owner, owner)&&const DeepCollectionEquality().equals(other.userBankInfo, userBankInfo)&&(identical(other.wallet, wallet) || other.wallet == wallet)&&(identical(other.hatchingInfo, hatchingInfo) || other.hatchingInfo == hatchingInfo)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hashAll([runtimeType,id,user,address,const DeepCollectionEquality().hash(_hatching),vetFarm,key,trash,ownerIdForeignKey,userIdForeignKey,addressIdForeignKey,hasChainCompany,userBankIdForeignKey,const DeepCollectionEquality().hash(cityOperator),unitName,gisCode,operatingLicenceCapacity,numberOfHalls,tenant,hasTenant,const DeepCollectionEquality().hash(personType),const DeepCollectionEquality().hash(economicCode),systemCode,epidemiologicalCode,breedingUniqueId,totalCapacity,licenceNumber,healthCertificateNumber,numberOfRequests,hatchingDate,lastPartyDate,numberOfIncubators,herdAgeByDay,herdAgeByWeek,numberOfParty,const DeepCollectionEquality().hash(communicationType),const DeepCollectionEquality().hash(cooperative),dateOfRegister,const DeepCollectionEquality().hash(unitStatus),active,const DeepCollectionEquality().hash(identityDocuments),const DeepCollectionEquality().hash(samasatUserCode),const DeepCollectionEquality().hash(baseOrder),incubationDate,walletAmount,city,cityNumber,cityName,provinceNumber,provinceName,walletIdForeignKey,poultryIdKey,lat,long,const DeepCollectionEquality().hash(date),killingAveAge,activeLeftOver,killingAveCount,killingAveWeight,killingLiveWeight,killingCarcassesWeight,killingLossWeightPercent,realKillingAveWeight,realKillingLiveWeight,realKillingCarcassesWeight,realKillingLossWeightPercent,const DeepCollectionEquality().hash(interestLicenseId),orderLimit,const DeepCollectionEquality().hash(owner),const DeepCollectionEquality().hash(userBankInfo),wallet,hatchingInfo]); + +@override +String toString() { + return 'PoultryFarm(id: $id, user: $user, address: $address, hatching: $hatching, vetFarm: $vetFarm, key: $key, trash: $trash, ownerIdForeignKey: $ownerIdForeignKey, userIdForeignKey: $userIdForeignKey, addressIdForeignKey: $addressIdForeignKey, hasChainCompany: $hasChainCompany, userBankIdForeignKey: $userBankIdForeignKey, cityOperator: $cityOperator, unitName: $unitName, gisCode: $gisCode, operatingLicenceCapacity: $operatingLicenceCapacity, numberOfHalls: $numberOfHalls, tenant: $tenant, hasTenant: $hasTenant, personType: $personType, economicCode: $economicCode, systemCode: $systemCode, epidemiologicalCode: $epidemiologicalCode, breedingUniqueId: $breedingUniqueId, totalCapacity: $totalCapacity, licenceNumber: $licenceNumber, healthCertificateNumber: $healthCertificateNumber, numberOfRequests: $numberOfRequests, hatchingDate: $hatchingDate, lastPartyDate: $lastPartyDate, numberOfIncubators: $numberOfIncubators, herdAgeByDay: $herdAgeByDay, herdAgeByWeek: $herdAgeByWeek, numberOfParty: $numberOfParty, communicationType: $communicationType, cooperative: $cooperative, dateOfRegister: $dateOfRegister, unitStatus: $unitStatus, active: $active, identityDocuments: $identityDocuments, samasatUserCode: $samasatUserCode, baseOrder: $baseOrder, incubationDate: $incubationDate, walletAmount: $walletAmount, city: $city, cityNumber: $cityNumber, cityName: $cityName, provinceNumber: $provinceNumber, provinceName: $provinceName, walletIdForeignKey: $walletIdForeignKey, poultryIdKey: $poultryIdKey, lat: $lat, long: $long, date: $date, killingAveAge: $killingAveAge, activeLeftOver: $activeLeftOver, killingAveCount: $killingAveCount, killingAveWeight: $killingAveWeight, killingLiveWeight: $killingLiveWeight, killingCarcassesWeight: $killingCarcassesWeight, killingLossWeightPercent: $killingLossWeightPercent, realKillingAveWeight: $realKillingAveWeight, realKillingLiveWeight: $realKillingLiveWeight, realKillingCarcassesWeight: $realKillingCarcassesWeight, realKillingLossWeightPercent: $realKillingLossWeightPercent, interestLicenseId: $interestLicenseId, orderLimit: $orderLimit, owner: $owner, userBankInfo: $userBankInfo, wallet: $wallet, hatchingInfo: $hatchingInfo)'; +} + + +} + +/// @nodoc +abstract mixin class _$PoultryFarmCopyWith<$Res> implements $PoultryFarmCopyWith<$Res> { + factory _$PoultryFarmCopyWith(_PoultryFarm value, $Res Function(_PoultryFarm) _then) = __$PoultryFarmCopyWithImpl; +@override @useResult +$Res call({ + int? id, User? user, Address? address, List? hatching, VetFarm? vetFarm, String? key, bool? trash, int? ownerIdForeignKey, int? userIdForeignKey, int? addressIdForeignKey, bool? hasChainCompany, int? userBankIdForeignKey, dynamic cityOperator, String? unitName, String? gisCode, int? operatingLicenceCapacity, int? numberOfHalls, bool? tenant, bool? hasTenant, dynamic personType, dynamic economicCode, String? systemCode, String? epidemiologicalCode, String? breedingUniqueId, int? totalCapacity, String? licenceNumber, String? healthCertificateNumber, int? numberOfRequests, String? hatchingDate, String? lastPartyDate, int? numberOfIncubators, int? herdAgeByDay, int? herdAgeByWeek, int? numberOfParty, dynamic communicationType, dynamic cooperative, String? dateOfRegister, dynamic unitStatus, bool? active, dynamic identityDocuments, dynamic samasatUserCode, dynamic baseOrder, String? incubationDate, int? walletAmount, int? city, int? cityNumber, String? cityName, int? provinceNumber, String? provinceName, int? walletIdForeignKey, int? poultryIdKey, double? lat, double? long, dynamic date, int? killingAveAge, int? activeLeftOver, int? killingAveCount, int? killingAveWeight, int? killingLiveWeight, int? killingCarcassesWeight, int? killingLossWeightPercent, double? realKillingAveWeight, double? realKillingLiveWeight, double? realKillingCarcassesWeight, double? realKillingLossWeightPercent, dynamic interestLicenseId, bool? orderLimit, dynamic owner, dynamic userBankInfo, int? wallet, HatchingInfo? hatchingInfo +}); + + +@override $UserCopyWith<$Res>? get user;@override $AddressCopyWith<$Res>? get address;@override $VetFarmCopyWith<$Res>? get vetFarm;@override $HatchingInfoCopyWith<$Res>? get hatchingInfo; + +} +/// @nodoc +class __$PoultryFarmCopyWithImpl<$Res> + implements _$PoultryFarmCopyWith<$Res> { + __$PoultryFarmCopyWithImpl(this._self, this._then); + + final _PoultryFarm _self; + final $Res Function(_PoultryFarm) _then; + +/// Create a copy of PoultryFarm +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? id = freezed,Object? user = freezed,Object? address = freezed,Object? hatching = freezed,Object? vetFarm = freezed,Object? key = freezed,Object? trash = freezed,Object? ownerIdForeignKey = freezed,Object? userIdForeignKey = freezed,Object? addressIdForeignKey = freezed,Object? hasChainCompany = freezed,Object? userBankIdForeignKey = freezed,Object? cityOperator = freezed,Object? unitName = freezed,Object? gisCode = freezed,Object? operatingLicenceCapacity = freezed,Object? numberOfHalls = freezed,Object? tenant = freezed,Object? hasTenant = freezed,Object? personType = freezed,Object? economicCode = freezed,Object? systemCode = freezed,Object? epidemiologicalCode = freezed,Object? breedingUniqueId = freezed,Object? totalCapacity = freezed,Object? licenceNumber = freezed,Object? healthCertificateNumber = freezed,Object? numberOfRequests = freezed,Object? hatchingDate = freezed,Object? lastPartyDate = freezed,Object? numberOfIncubators = freezed,Object? herdAgeByDay = freezed,Object? herdAgeByWeek = freezed,Object? numberOfParty = freezed,Object? communicationType = freezed,Object? cooperative = freezed,Object? dateOfRegister = freezed,Object? unitStatus = freezed,Object? active = freezed,Object? identityDocuments = freezed,Object? samasatUserCode = freezed,Object? baseOrder = freezed,Object? incubationDate = freezed,Object? walletAmount = freezed,Object? city = freezed,Object? cityNumber = freezed,Object? cityName = freezed,Object? provinceNumber = freezed,Object? provinceName = freezed,Object? walletIdForeignKey = freezed,Object? poultryIdKey = freezed,Object? lat = freezed,Object? long = freezed,Object? date = freezed,Object? killingAveAge = freezed,Object? activeLeftOver = freezed,Object? killingAveCount = freezed,Object? killingAveWeight = freezed,Object? killingLiveWeight = freezed,Object? killingCarcassesWeight = freezed,Object? killingLossWeightPercent = freezed,Object? realKillingAveWeight = freezed,Object? realKillingLiveWeight = freezed,Object? realKillingCarcassesWeight = freezed,Object? realKillingLossWeightPercent = freezed,Object? interestLicenseId = freezed,Object? orderLimit = freezed,Object? owner = freezed,Object? userBankInfo = freezed,Object? wallet = freezed,Object? hatchingInfo = freezed,}) { + return _then(_PoultryFarm( +id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable +as int?,user: freezed == user ? _self.user : user // ignore: cast_nullable_to_non_nullable +as User?,address: freezed == address ? _self.address : address // ignore: cast_nullable_to_non_nullable +as Address?,hatching: freezed == hatching ? _self._hatching : hatching // ignore: cast_nullable_to_non_nullable +as List?,vetFarm: freezed == vetFarm ? _self.vetFarm : vetFarm // ignore: cast_nullable_to_non_nullable +as VetFarm?,key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable +as String?,trash: freezed == trash ? _self.trash : trash // ignore: cast_nullable_to_non_nullable +as bool?,ownerIdForeignKey: freezed == ownerIdForeignKey ? _self.ownerIdForeignKey : ownerIdForeignKey // ignore: cast_nullable_to_non_nullable +as int?,userIdForeignKey: freezed == userIdForeignKey ? _self.userIdForeignKey : userIdForeignKey // ignore: cast_nullable_to_non_nullable +as int?,addressIdForeignKey: freezed == addressIdForeignKey ? _self.addressIdForeignKey : addressIdForeignKey // ignore: cast_nullable_to_non_nullable +as int?,hasChainCompany: freezed == hasChainCompany ? _self.hasChainCompany : hasChainCompany // ignore: cast_nullable_to_non_nullable +as bool?,userBankIdForeignKey: freezed == userBankIdForeignKey ? _self.userBankIdForeignKey : userBankIdForeignKey // ignore: cast_nullable_to_non_nullable +as int?,cityOperator: freezed == cityOperator ? _self.cityOperator : cityOperator // ignore: cast_nullable_to_non_nullable +as dynamic,unitName: freezed == unitName ? _self.unitName : unitName // ignore: cast_nullable_to_non_nullable +as String?,gisCode: freezed == gisCode ? _self.gisCode : gisCode // ignore: cast_nullable_to_non_nullable +as String?,operatingLicenceCapacity: freezed == operatingLicenceCapacity ? _self.operatingLicenceCapacity : operatingLicenceCapacity // ignore: cast_nullable_to_non_nullable +as int?,numberOfHalls: freezed == numberOfHalls ? _self.numberOfHalls : numberOfHalls // ignore: cast_nullable_to_non_nullable +as int?,tenant: freezed == tenant ? _self.tenant : tenant // ignore: cast_nullable_to_non_nullable +as bool?,hasTenant: freezed == hasTenant ? _self.hasTenant : hasTenant // ignore: cast_nullable_to_non_nullable +as bool?,personType: freezed == personType ? _self.personType : personType // ignore: cast_nullable_to_non_nullable +as dynamic,economicCode: freezed == economicCode ? _self.economicCode : economicCode // ignore: cast_nullable_to_non_nullable +as dynamic,systemCode: freezed == systemCode ? _self.systemCode : systemCode // ignore: cast_nullable_to_non_nullable +as String?,epidemiologicalCode: freezed == epidemiologicalCode ? _self.epidemiologicalCode : epidemiologicalCode // ignore: cast_nullable_to_non_nullable +as String?,breedingUniqueId: freezed == breedingUniqueId ? _self.breedingUniqueId : breedingUniqueId // ignore: cast_nullable_to_non_nullable +as String?,totalCapacity: freezed == totalCapacity ? _self.totalCapacity : totalCapacity // ignore: cast_nullable_to_non_nullable +as int?,licenceNumber: freezed == licenceNumber ? _self.licenceNumber : licenceNumber // ignore: cast_nullable_to_non_nullable +as String?,healthCertificateNumber: freezed == healthCertificateNumber ? _self.healthCertificateNumber : healthCertificateNumber // ignore: cast_nullable_to_non_nullable +as String?,numberOfRequests: freezed == numberOfRequests ? _self.numberOfRequests : numberOfRequests // ignore: cast_nullable_to_non_nullable +as int?,hatchingDate: freezed == hatchingDate ? _self.hatchingDate : hatchingDate // ignore: cast_nullable_to_non_nullable +as String?,lastPartyDate: freezed == lastPartyDate ? _self.lastPartyDate : lastPartyDate // ignore: cast_nullable_to_non_nullable +as String?,numberOfIncubators: freezed == numberOfIncubators ? _self.numberOfIncubators : numberOfIncubators // ignore: cast_nullable_to_non_nullable +as int?,herdAgeByDay: freezed == herdAgeByDay ? _self.herdAgeByDay : herdAgeByDay // ignore: cast_nullable_to_non_nullable +as int?,herdAgeByWeek: freezed == herdAgeByWeek ? _self.herdAgeByWeek : herdAgeByWeek // ignore: cast_nullable_to_non_nullable +as int?,numberOfParty: freezed == numberOfParty ? _self.numberOfParty : numberOfParty // ignore: cast_nullable_to_non_nullable +as int?,communicationType: freezed == communicationType ? _self.communicationType : communicationType // ignore: cast_nullable_to_non_nullable +as dynamic,cooperative: freezed == cooperative ? _self.cooperative : cooperative // ignore: cast_nullable_to_non_nullable +as dynamic,dateOfRegister: freezed == dateOfRegister ? _self.dateOfRegister : dateOfRegister // ignore: cast_nullable_to_non_nullable +as String?,unitStatus: freezed == unitStatus ? _self.unitStatus : unitStatus // ignore: cast_nullable_to_non_nullable +as dynamic,active: freezed == active ? _self.active : active // ignore: cast_nullable_to_non_nullable +as bool?,identityDocuments: freezed == identityDocuments ? _self.identityDocuments : identityDocuments // ignore: cast_nullable_to_non_nullable +as dynamic,samasatUserCode: freezed == samasatUserCode ? _self.samasatUserCode : samasatUserCode // ignore: cast_nullable_to_non_nullable +as dynamic,baseOrder: freezed == baseOrder ? _self.baseOrder : baseOrder // ignore: cast_nullable_to_non_nullable +as dynamic,incubationDate: freezed == incubationDate ? _self.incubationDate : incubationDate // ignore: cast_nullable_to_non_nullable +as String?,walletAmount: freezed == walletAmount ? _self.walletAmount : walletAmount // ignore: cast_nullable_to_non_nullable +as int?,city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable +as int?,cityNumber: freezed == cityNumber ? _self.cityNumber : cityNumber // ignore: cast_nullable_to_non_nullable +as int?,cityName: freezed == cityName ? _self.cityName : cityName // ignore: cast_nullable_to_non_nullable +as String?,provinceNumber: freezed == provinceNumber ? _self.provinceNumber : provinceNumber // ignore: cast_nullable_to_non_nullable +as int?,provinceName: freezed == provinceName ? _self.provinceName : provinceName // ignore: cast_nullable_to_non_nullable +as String?,walletIdForeignKey: freezed == walletIdForeignKey ? _self.walletIdForeignKey : walletIdForeignKey // ignore: cast_nullable_to_non_nullable +as int?,poultryIdKey: freezed == poultryIdKey ? _self.poultryIdKey : poultryIdKey // ignore: cast_nullable_to_non_nullable +as int?,lat: freezed == lat ? _self.lat : lat // ignore: cast_nullable_to_non_nullable +as double?,long: freezed == long ? _self.long : long // ignore: cast_nullable_to_non_nullable +as double?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable +as dynamic,killingAveAge: freezed == killingAveAge ? _self.killingAveAge : killingAveAge // ignore: cast_nullable_to_non_nullable +as int?,activeLeftOver: freezed == activeLeftOver ? _self.activeLeftOver : activeLeftOver // ignore: cast_nullable_to_non_nullable +as int?,killingAveCount: freezed == killingAveCount ? _self.killingAveCount : killingAveCount // ignore: cast_nullable_to_non_nullable +as int?,killingAveWeight: freezed == killingAveWeight ? _self.killingAveWeight : killingAveWeight // ignore: cast_nullable_to_non_nullable +as int?,killingLiveWeight: freezed == killingLiveWeight ? _self.killingLiveWeight : killingLiveWeight // ignore: cast_nullable_to_non_nullable +as int?,killingCarcassesWeight: freezed == killingCarcassesWeight ? _self.killingCarcassesWeight : killingCarcassesWeight // ignore: cast_nullable_to_non_nullable +as int?,killingLossWeightPercent: freezed == killingLossWeightPercent ? _self.killingLossWeightPercent : killingLossWeightPercent // ignore: cast_nullable_to_non_nullable +as int?,realKillingAveWeight: freezed == realKillingAveWeight ? _self.realKillingAveWeight : realKillingAveWeight // ignore: cast_nullable_to_non_nullable +as double?,realKillingLiveWeight: freezed == realKillingLiveWeight ? _self.realKillingLiveWeight : realKillingLiveWeight // ignore: cast_nullable_to_non_nullable +as double?,realKillingCarcassesWeight: freezed == realKillingCarcassesWeight ? _self.realKillingCarcassesWeight : realKillingCarcassesWeight // ignore: cast_nullable_to_non_nullable +as double?,realKillingLossWeightPercent: freezed == realKillingLossWeightPercent ? _self.realKillingLossWeightPercent : realKillingLossWeightPercent // ignore: cast_nullable_to_non_nullable +as double?,interestLicenseId: freezed == interestLicenseId ? _self.interestLicenseId : interestLicenseId // ignore: cast_nullable_to_non_nullable +as dynamic,orderLimit: freezed == orderLimit ? _self.orderLimit : orderLimit // ignore: cast_nullable_to_non_nullable +as bool?,owner: freezed == owner ? _self.owner : owner // ignore: cast_nullable_to_non_nullable +as dynamic,userBankInfo: freezed == userBankInfo ? _self.userBankInfo : userBankInfo // ignore: cast_nullable_to_non_nullable +as dynamic,wallet: freezed == wallet ? _self.wallet : wallet // ignore: cast_nullable_to_non_nullable +as int?,hatchingInfo: freezed == hatchingInfo ? _self.hatchingInfo : hatchingInfo // ignore: cast_nullable_to_non_nullable +as HatchingInfo?, + )); +} + +/// Create a copy of PoultryFarm +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$UserCopyWith<$Res>? get user { + if (_self.user == null) { + return null; + } + + return $UserCopyWith<$Res>(_self.user!, (value) { + return _then(_self.copyWith(user: value)); + }); +}/// Create a copy of PoultryFarm +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$AddressCopyWith<$Res>? get address { + if (_self.address == null) { + return null; + } + + return $AddressCopyWith<$Res>(_self.address!, (value) { + return _then(_self.copyWith(address: value)); + }); +}/// Create a copy of PoultryFarm +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$VetFarmCopyWith<$Res>? get vetFarm { + if (_self.vetFarm == null) { + return null; + } + + return $VetFarmCopyWith<$Res>(_self.vetFarm!, (value) { + return _then(_self.copyWith(vetFarm: value)); + }); +}/// Create a copy of PoultryFarm +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$HatchingInfoCopyWith<$Res>? get hatchingInfo { + if (_self.hatchingInfo == null) { + return null; + } + + return $HatchingInfoCopyWith<$Res>(_self.hatchingInfo!, (value) { + return _then(_self.copyWith(hatchingInfo: value)); + }); +} +} + + +/// @nodoc +mixin _$User { + + String? get fullname; String? get mobile; +/// Create a copy of User +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$UserCopyWith get copyWith => _$UserCopyWithImpl(this as User, _$identity); + + /// Serializes this User to a JSON map. + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is User&&(identical(other.fullname, fullname) || other.fullname == fullname)&&(identical(other.mobile, mobile) || other.mobile == mobile)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,fullname,mobile); + +@override +String toString() { + return 'User(fullname: $fullname, mobile: $mobile)'; +} + + +} + +/// @nodoc +abstract mixin class $UserCopyWith<$Res> { + factory $UserCopyWith(User value, $Res Function(User) _then) = _$UserCopyWithImpl; +@useResult +$Res call({ + String? fullname, String? mobile +}); + + + + +} +/// @nodoc +class _$UserCopyWithImpl<$Res> + implements $UserCopyWith<$Res> { + _$UserCopyWithImpl(this._self, this._then); + + final User _self; + final $Res Function(User) _then; + +/// Create a copy of User +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? fullname = freezed,Object? mobile = freezed,}) { + return _then(_self.copyWith( +fullname: freezed == fullname ? _self.fullname : fullname // ignore: cast_nullable_to_non_nullable +as String?,mobile: freezed == mobile ? _self.mobile : mobile // ignore: cast_nullable_to_non_nullable +as String?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [User]. +extension UserPatterns on User { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _User value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _User() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _User value) $default,){ +final _that = this; +switch (_that) { +case _User(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _User value)? $default,){ +final _that = this; +switch (_that) { +case _User() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String? fullname, String? mobile)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _User() when $default != null: +return $default(_that.fullname,_that.mobile);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String? fullname, String? mobile) $default,) {final _that = this; +switch (_that) { +case _User(): +return $default(_that.fullname,_that.mobile);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String? fullname, String? mobile)? $default,) {final _that = this; +switch (_that) { +case _User() when $default != null: +return $default(_that.fullname,_that.mobile);case _: + return null; + +} +} + +} + +/// @nodoc +@JsonSerializable() + +class _User implements User { + const _User({this.fullname, this.mobile}); + factory _User.fromJson(Map json) => _$UserFromJson(json); + +@override final String? fullname; +@override final String? mobile; + +/// Create a copy of User +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$UserCopyWith<_User> get copyWith => __$UserCopyWithImpl<_User>(this, _$identity); + +@override +Map toJson() { + return _$UserToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _User&&(identical(other.fullname, fullname) || other.fullname == fullname)&&(identical(other.mobile, mobile) || other.mobile == mobile)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,fullname,mobile); + +@override +String toString() { + return 'User(fullname: $fullname, mobile: $mobile)'; +} + + +} + +/// @nodoc +abstract mixin class _$UserCopyWith<$Res> implements $UserCopyWith<$Res> { + factory _$UserCopyWith(_User value, $Res Function(_User) _then) = __$UserCopyWithImpl; +@override @useResult +$Res call({ + String? fullname, String? mobile +}); + + + + +} +/// @nodoc +class __$UserCopyWithImpl<$Res> + implements _$UserCopyWith<$Res> { + __$UserCopyWithImpl(this._self, this._then); + + final _User _self; + final $Res Function(_User) _then; + +/// Create a copy of User +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? fullname = freezed,Object? mobile = freezed,}) { + return _then(_User( +fullname: freezed == fullname ? _self.fullname : fullname // ignore: cast_nullable_to_non_nullable +as String?,mobile: freezed == mobile ? _self.mobile : mobile // ignore: cast_nullable_to_non_nullable +as String?, + )); +} + + +} + + +/// @nodoc +mixin _$Address { + + Province? get province; City? get city; String? get address; String? get postalCode; +/// Create a copy of Address +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$AddressCopyWith
get copyWith => _$AddressCopyWithImpl
(this as Address, _$identity); + + /// Serializes this Address to a JSON map. + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is Address&&(identical(other.province, province) || other.province == province)&&(identical(other.city, city) || other.city == city)&&(identical(other.address, address) || other.address == address)&&(identical(other.postalCode, postalCode) || other.postalCode == postalCode)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,province,city,address,postalCode); + +@override +String toString() { + return 'Address(province: $province, city: $city, address: $address, postalCode: $postalCode)'; +} + + +} + +/// @nodoc +abstract mixin class $AddressCopyWith<$Res> { + factory $AddressCopyWith(Address value, $Res Function(Address) _then) = _$AddressCopyWithImpl; +@useResult +$Res call({ + Province? province, City? city, String? address, String? postalCode +}); + + +$ProvinceCopyWith<$Res>? get province;$CityCopyWith<$Res>? get city; + +} +/// @nodoc +class _$AddressCopyWithImpl<$Res> + implements $AddressCopyWith<$Res> { + _$AddressCopyWithImpl(this._self, this._then); + + final Address _self; + final $Res Function(Address) _then; + +/// Create a copy of Address +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? province = freezed,Object? city = freezed,Object? address = freezed,Object? postalCode = freezed,}) { + return _then(_self.copyWith( +province: freezed == province ? _self.province : province // ignore: cast_nullable_to_non_nullable +as Province?,city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable +as City?,address: freezed == address ? _self.address : address // ignore: cast_nullable_to_non_nullable +as String?,postalCode: freezed == postalCode ? _self.postalCode : postalCode // ignore: cast_nullable_to_non_nullable +as String?, + )); +} +/// Create a copy of Address +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$ProvinceCopyWith<$Res>? get province { + if (_self.province == null) { + return null; + } + + return $ProvinceCopyWith<$Res>(_self.province!, (value) { + return _then(_self.copyWith(province: value)); + }); +}/// Create a copy of Address +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$CityCopyWith<$Res>? get city { + if (_self.city == null) { + return null; + } + + return $CityCopyWith<$Res>(_self.city!, (value) { + return _then(_self.copyWith(city: value)); + }); +} +} + + +/// Adds pattern-matching-related methods to [Address]. +extension AddressPatterns on Address { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _Address value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _Address() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _Address value) $default,){ +final _that = this; +switch (_that) { +case _Address(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _Address value)? $default,){ +final _that = this; +switch (_that) { +case _Address() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( Province? province, City? city, String? address, String? postalCode)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _Address() when $default != null: +return $default(_that.province,_that.city,_that.address,_that.postalCode);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( Province? province, City? city, String? address, String? postalCode) $default,) {final _that = this; +switch (_that) { +case _Address(): +return $default(_that.province,_that.city,_that.address,_that.postalCode);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( Province? province, City? city, String? address, String? postalCode)? $default,) {final _that = this; +switch (_that) { +case _Address() when $default != null: +return $default(_that.province,_that.city,_that.address,_that.postalCode);case _: + return null; + +} +} + +} + +/// @nodoc +@JsonSerializable() + +class _Address implements Address { + const _Address({this.province, this.city, this.address, this.postalCode}); + factory _Address.fromJson(Map json) => _$AddressFromJson(json); + +@override final Province? province; +@override final City? city; +@override final String? address; +@override final String? postalCode; + +/// Create a copy of Address +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$AddressCopyWith<_Address> get copyWith => __$AddressCopyWithImpl<_Address>(this, _$identity); + +@override +Map toJson() { + return _$AddressToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _Address&&(identical(other.province, province) || other.province == province)&&(identical(other.city, city) || other.city == city)&&(identical(other.address, address) || other.address == address)&&(identical(other.postalCode, postalCode) || other.postalCode == postalCode)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,province,city,address,postalCode); + +@override +String toString() { + return 'Address(province: $province, city: $city, address: $address, postalCode: $postalCode)'; +} + + +} + +/// @nodoc +abstract mixin class _$AddressCopyWith<$Res> implements $AddressCopyWith<$Res> { + factory _$AddressCopyWith(_Address value, $Res Function(_Address) _then) = __$AddressCopyWithImpl; +@override @useResult +$Res call({ + Province? province, City? city, String? address, String? postalCode +}); + + +@override $ProvinceCopyWith<$Res>? get province;@override $CityCopyWith<$Res>? get city; + +} +/// @nodoc +class __$AddressCopyWithImpl<$Res> + implements _$AddressCopyWith<$Res> { + __$AddressCopyWithImpl(this._self, this._then); + + final _Address _self; + final $Res Function(_Address) _then; + +/// Create a copy of Address +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? province = freezed,Object? city = freezed,Object? address = freezed,Object? postalCode = freezed,}) { + return _then(_Address( +province: freezed == province ? _self.province : province // ignore: cast_nullable_to_non_nullable +as Province?,city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable +as City?,address: freezed == address ? _self.address : address // ignore: cast_nullable_to_non_nullable +as String?,postalCode: freezed == postalCode ? _self.postalCode : postalCode // ignore: cast_nullable_to_non_nullable +as String?, + )); +} + +/// Create a copy of Address +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$ProvinceCopyWith<$Res>? get province { + if (_self.province == null) { + return null; + } + + return $ProvinceCopyWith<$Res>(_self.province!, (value) { + return _then(_self.copyWith(province: value)); + }); +}/// Create a copy of Address +/// with the given fields replaced by the non-null parameter values. +@override +@pragma('vm:prefer-inline') +$CityCopyWith<$Res>? get city { + if (_self.city == null) { + return null; + } + + return $CityCopyWith<$Res>(_self.city!, (value) { + return _then(_self.copyWith(city: value)); + }); +} +} + + +/// @nodoc +mixin _$Province { + + String? get key; String? get name; +/// Create a copy of Province +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$ProvinceCopyWith get copyWith => _$ProvinceCopyWithImpl(this as Province, _$identity); + + /// Serializes this Province to a JSON map. + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is Province&&(identical(other.key, key) || other.key == key)&&(identical(other.name, name) || other.name == name)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,key,name); + +@override +String toString() { + return 'Province(key: $key, name: $name)'; +} + + +} + +/// @nodoc +abstract mixin class $ProvinceCopyWith<$Res> { + factory $ProvinceCopyWith(Province value, $Res Function(Province) _then) = _$ProvinceCopyWithImpl; +@useResult +$Res call({ + String? key, String? name +}); + + + + +} +/// @nodoc +class _$ProvinceCopyWithImpl<$Res> + implements $ProvinceCopyWith<$Res> { + _$ProvinceCopyWithImpl(this._self, this._then); + + final Province _self; + final $Res Function(Province) _then; + +/// Create a copy of Province +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? key = freezed,Object? name = freezed,}) { + return _then(_self.copyWith( +key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable +as String?,name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [Province]. +extension ProvincePatterns on Province { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _Province value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _Province() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _Province value) $default,){ +final _that = this; +switch (_that) { +case _Province(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _Province value)? $default,){ +final _that = this; +switch (_that) { +case _Province() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String? key, String? name)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _Province() when $default != null: +return $default(_that.key,_that.name);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String? key, String? name) $default,) {final _that = this; +switch (_that) { +case _Province(): +return $default(_that.key,_that.name);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String? key, String? name)? $default,) {final _that = this; +switch (_that) { +case _Province() when $default != null: +return $default(_that.key,_that.name);case _: + return null; + +} +} + +} + +/// @nodoc +@JsonSerializable() + +class _Province implements Province { + const _Province({this.key, this.name}); + factory _Province.fromJson(Map json) => _$ProvinceFromJson(json); + +@override final String? key; +@override final String? name; + +/// Create a copy of Province +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$ProvinceCopyWith<_Province> get copyWith => __$ProvinceCopyWithImpl<_Province>(this, _$identity); + +@override +Map toJson() { + return _$ProvinceToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _Province&&(identical(other.key, key) || other.key == key)&&(identical(other.name, name) || other.name == name)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,key,name); + +@override +String toString() { + return 'Province(key: $key, name: $name)'; +} + + +} + +/// @nodoc +abstract mixin class _$ProvinceCopyWith<$Res> implements $ProvinceCopyWith<$Res> { + factory _$ProvinceCopyWith(_Province value, $Res Function(_Province) _then) = __$ProvinceCopyWithImpl; +@override @useResult +$Res call({ + String? key, String? name +}); + + + + +} +/// @nodoc +class __$ProvinceCopyWithImpl<$Res> + implements _$ProvinceCopyWith<$Res> { + __$ProvinceCopyWithImpl(this._self, this._then); + + final _Province _self; + final $Res Function(_Province) _then; + +/// Create a copy of Province +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? key = freezed,Object? name = freezed,}) { + return _then(_Province( +key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable +as String?,name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String?, + )); +} + + +} + + +/// @nodoc +mixin _$City { + + String? get key; String? get name; +/// Create a copy of City +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$CityCopyWith get copyWith => _$CityCopyWithImpl(this as City, _$identity); + + /// Serializes this City to a JSON map. + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is City&&(identical(other.key, key) || other.key == key)&&(identical(other.name, name) || other.name == name)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,key,name); + +@override +String toString() { + return 'City(key: $key, name: $name)'; +} + + +} + +/// @nodoc +abstract mixin class $CityCopyWith<$Res> { + factory $CityCopyWith(City value, $Res Function(City) _then) = _$CityCopyWithImpl; +@useResult +$Res call({ + String? key, String? name +}); + + + + +} +/// @nodoc +class _$CityCopyWithImpl<$Res> + implements $CityCopyWith<$Res> { + _$CityCopyWithImpl(this._self, this._then); + + final City _self; + final $Res Function(City) _then; + +/// Create a copy of City +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? key = freezed,Object? name = freezed,}) { + return _then(_self.copyWith( +key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable +as String?,name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [City]. +extension CityPatterns on City { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _City value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _City() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _City value) $default,){ +final _that = this; +switch (_that) { +case _City(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _City value)? $default,){ +final _that = this; +switch (_that) { +case _City() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String? key, String? name)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _City() when $default != null: +return $default(_that.key,_that.name);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String? key, String? name) $default,) {final _that = this; +switch (_that) { +case _City(): +return $default(_that.key,_that.name);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String? key, String? name)? $default,) {final _that = this; +switch (_that) { +case _City() when $default != null: +return $default(_that.key,_that.name);case _: + return null; + +} +} + +} + +/// @nodoc +@JsonSerializable() + +class _City implements City { + const _City({this.key, this.name}); + factory _City.fromJson(Map json) => _$CityFromJson(json); + +@override final String? key; +@override final String? name; + +/// Create a copy of City +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$CityCopyWith<_City> get copyWith => __$CityCopyWithImpl<_City>(this, _$identity); + +@override +Map toJson() { + return _$CityToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _City&&(identical(other.key, key) || other.key == key)&&(identical(other.name, name) || other.name == name)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,key,name); + +@override +String toString() { + return 'City(key: $key, name: $name)'; +} + + +} + +/// @nodoc +abstract mixin class _$CityCopyWith<$Res> implements $CityCopyWith<$Res> { + factory _$CityCopyWith(_City value, $Res Function(_City) _then) = __$CityCopyWithImpl; +@override @useResult +$Res call({ + String? key, String? name +}); + + + + +} +/// @nodoc +class __$CityCopyWithImpl<$Res> + implements _$CityCopyWith<$Res> { + __$CityCopyWithImpl(this._self, this._then); + + final _City _self; + final $Res Function(_City) _then; + +/// Create a copy of City +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? key = freezed,Object? name = freezed,}) { + return _then(_City( +key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable +as String?,name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable +as String?, + )); +} + + +} + + +/// @nodoc +mixin _$VetFarm { + + String? get fullName; String? get mobile; String? get city; String? get province; +/// Create a copy of VetFarm +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$VetFarmCopyWith get copyWith => _$VetFarmCopyWithImpl(this as VetFarm, _$identity); + + /// Serializes this VetFarm to a JSON map. + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is VetFarm&&(identical(other.fullName, fullName) || other.fullName == fullName)&&(identical(other.mobile, mobile) || other.mobile == mobile)&&(identical(other.city, city) || other.city == city)&&(identical(other.province, province) || other.province == province)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,fullName,mobile,city,province); + +@override +String toString() { + return 'VetFarm(fullName: $fullName, mobile: $mobile, city: $city, province: $province)'; +} + + +} + +/// @nodoc +abstract mixin class $VetFarmCopyWith<$Res> { + factory $VetFarmCopyWith(VetFarm value, $Res Function(VetFarm) _then) = _$VetFarmCopyWithImpl; +@useResult +$Res call({ + String? fullName, String? mobile, String? city, String? province +}); + + + + +} +/// @nodoc +class _$VetFarmCopyWithImpl<$Res> + implements $VetFarmCopyWith<$Res> { + _$VetFarmCopyWithImpl(this._self, this._then); + + final VetFarm _self; + final $Res Function(VetFarm) _then; + +/// Create a copy of VetFarm +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? fullName = freezed,Object? mobile = freezed,Object? city = freezed,Object? province = freezed,}) { + return _then(_self.copyWith( +fullName: freezed == fullName ? _self.fullName : fullName // ignore: cast_nullable_to_non_nullable +as String?,mobile: freezed == mobile ? _self.mobile : mobile // ignore: cast_nullable_to_non_nullable +as String?,city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable +as String?,province: freezed == province ? _self.province : province // ignore: cast_nullable_to_non_nullable +as String?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [VetFarm]. +extension VetFarmPatterns on VetFarm { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _VetFarm value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _VetFarm() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _VetFarm value) $default,){ +final _that = this; +switch (_that) { +case _VetFarm(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _VetFarm value)? $default,){ +final _that = this; +switch (_that) { +case _VetFarm() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( String? fullName, String? mobile, String? city, String? province)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _VetFarm() when $default != null: +return $default(_that.fullName,_that.mobile,_that.city,_that.province);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( String? fullName, String? mobile, String? city, String? province) $default,) {final _that = this; +switch (_that) { +case _VetFarm(): +return $default(_that.fullName,_that.mobile,_that.city,_that.province);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( String? fullName, String? mobile, String? city, String? province)? $default,) {final _that = this; +switch (_that) { +case _VetFarm() when $default != null: +return $default(_that.fullName,_that.mobile,_that.city,_that.province);case _: + return null; + +} +} + +} + +/// @nodoc +@JsonSerializable() + +class _VetFarm implements VetFarm { + const _VetFarm({this.fullName, this.mobile, this.city, this.province}); + factory _VetFarm.fromJson(Map json) => _$VetFarmFromJson(json); + +@override final String? fullName; +@override final String? mobile; +@override final String? city; +@override final String? province; + +/// Create a copy of VetFarm +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$VetFarmCopyWith<_VetFarm> get copyWith => __$VetFarmCopyWithImpl<_VetFarm>(this, _$identity); + +@override +Map toJson() { + return _$VetFarmToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _VetFarm&&(identical(other.fullName, fullName) || other.fullName == fullName)&&(identical(other.mobile, mobile) || other.mobile == mobile)&&(identical(other.city, city) || other.city == city)&&(identical(other.province, province) || other.province == province)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,fullName,mobile,city,province); + +@override +String toString() { + return 'VetFarm(fullName: $fullName, mobile: $mobile, city: $city, province: $province)'; +} + + +} + +/// @nodoc +abstract mixin class _$VetFarmCopyWith<$Res> implements $VetFarmCopyWith<$Res> { + factory _$VetFarmCopyWith(_VetFarm value, $Res Function(_VetFarm) _then) = __$VetFarmCopyWithImpl; +@override @useResult +$Res call({ + String? fullName, String? mobile, String? city, String? province +}); + + + + +} +/// @nodoc +class __$VetFarmCopyWithImpl<$Res> + implements _$VetFarmCopyWith<$Res> { + __$VetFarmCopyWithImpl(this._self, this._then); + + final _VetFarm _self; + final $Res Function(_VetFarm) _then; + +/// Create a copy of VetFarm +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? fullName = freezed,Object? mobile = freezed,Object? city = freezed,Object? province = freezed,}) { + return _then(_VetFarm( +fullName: freezed == fullName ? _self.fullName : fullName // ignore: cast_nullable_to_non_nullable +as String?,mobile: freezed == mobile ? _self.mobile : mobile // ignore: cast_nullable_to_non_nullable +as String?,city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable +as String?,province: freezed == province ? _self.province : province // ignore: cast_nullable_to_non_nullable +as String?, + )); +} + + +} + + +/// @nodoc +mixin _$HatchingInfo { + + int? get period; bool? get activeHatching; +/// Create a copy of HatchingInfo +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$HatchingInfoCopyWith get copyWith => _$HatchingInfoCopyWithImpl(this as HatchingInfo, _$identity); + + /// Serializes this HatchingInfo to a JSON map. + Map toJson(); + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is HatchingInfo&&(identical(other.period, period) || other.period == period)&&(identical(other.activeHatching, activeHatching) || other.activeHatching == activeHatching)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,period,activeHatching); + +@override +String toString() { + return 'HatchingInfo(period: $period, activeHatching: $activeHatching)'; +} + + +} + +/// @nodoc +abstract mixin class $HatchingInfoCopyWith<$Res> { + factory $HatchingInfoCopyWith(HatchingInfo value, $Res Function(HatchingInfo) _then) = _$HatchingInfoCopyWithImpl; +@useResult +$Res call({ + int? period, bool? activeHatching +}); + + + + +} +/// @nodoc +class _$HatchingInfoCopyWithImpl<$Res> + implements $HatchingInfoCopyWith<$Res> { + _$HatchingInfoCopyWithImpl(this._self, this._then); + + final HatchingInfo _self; + final $Res Function(HatchingInfo) _then; + +/// Create a copy of HatchingInfo +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? period = freezed,Object? activeHatching = freezed,}) { + return _then(_self.copyWith( +period: freezed == period ? _self.period : period // ignore: cast_nullable_to_non_nullable +as int?,activeHatching: freezed == activeHatching ? _self.activeHatching : activeHatching // ignore: cast_nullable_to_non_nullable +as bool?, + )); +} + +} + + +/// Adds pattern-matching-related methods to [HatchingInfo]. +extension HatchingInfoPatterns on HatchingInfo { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _HatchingInfo value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _HatchingInfo() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _HatchingInfo value) $default,){ +final _that = this; +switch (_that) { +case _HatchingInfo(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _HatchingInfo value)? $default,){ +final _that = this; +switch (_that) { +case _HatchingInfo() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( int? period, bool? activeHatching)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _HatchingInfo() when $default != null: +return $default(_that.period,_that.activeHatching);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( int? period, bool? activeHatching) $default,) {final _that = this; +switch (_that) { +case _HatchingInfo(): +return $default(_that.period,_that.activeHatching);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( int? period, bool? activeHatching)? $default,) {final _that = this; +switch (_that) { +case _HatchingInfo() when $default != null: +return $default(_that.period,_that.activeHatching);case _: + return null; + +} +} + +} + +/// @nodoc +@JsonSerializable() + +class _HatchingInfo implements HatchingInfo { + const _HatchingInfo({this.period, this.activeHatching}); + factory _HatchingInfo.fromJson(Map json) => _$HatchingInfoFromJson(json); + +@override final int? period; +@override final bool? activeHatching; + +/// Create a copy of HatchingInfo +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$HatchingInfoCopyWith<_HatchingInfo> get copyWith => __$HatchingInfoCopyWithImpl<_HatchingInfo>(this, _$identity); + +@override +Map toJson() { + return _$HatchingInfoToJson(this, ); +} + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _HatchingInfo&&(identical(other.period, period) || other.period == period)&&(identical(other.activeHatching, activeHatching) || other.activeHatching == activeHatching)); +} + +@JsonKey(includeFromJson: false, includeToJson: false) +@override +int get hashCode => Object.hash(runtimeType,period,activeHatching); + +@override +String toString() { + return 'HatchingInfo(period: $period, activeHatching: $activeHatching)'; +} + + +} + +/// @nodoc +abstract mixin class _$HatchingInfoCopyWith<$Res> implements $HatchingInfoCopyWith<$Res> { + factory _$HatchingInfoCopyWith(_HatchingInfo value, $Res Function(_HatchingInfo) _then) = __$HatchingInfoCopyWithImpl; +@override @useResult +$Res call({ + int? period, bool? activeHatching +}); + + + + +} +/// @nodoc +class __$HatchingInfoCopyWithImpl<$Res> + implements _$HatchingInfoCopyWith<$Res> { + __$HatchingInfoCopyWithImpl(this._self, this._then); + + final _HatchingInfo _self; + final $Res Function(_HatchingInfo) _then; + +/// Create a copy of HatchingInfo +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? period = freezed,Object? activeHatching = freezed,}) { + return _then(_HatchingInfo( +period: freezed == period ? _self.period : period // ignore: cast_nullable_to_non_nullable +as int?,activeHatching: freezed == activeHatching ? _self.activeHatching : activeHatching // ignore: cast_nullable_to_non_nullable +as bool?, + )); +} + + +} + +// dart format on diff --git a/packages/chicken/lib/data/models/response/poultry/poultry_farm.g.dart b/packages/chicken/lib/data/models/response/poultry/poultry_farm.g.dart new file mode 100644 index 0000000..3f6b21c --- /dev/null +++ b/packages/chicken/lib/data/models/response/poultry/poultry_farm.g.dart @@ -0,0 +1,238 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'poultry_farm.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +_PoultryFarm _$PoultryFarmFromJson(Map json) => _PoultryFarm( + id: (json['id'] as num?)?.toInt(), + user: json['user'] == null + ? null + : User.fromJson(json['user'] as Map), + address: json['address'] == null + ? null + : Address.fromJson(json['address'] as Map), + hatching: json['hatching'] as List?, + vetFarm: json['vet_farm'] == null + ? null + : VetFarm.fromJson(json['vet_farm'] as Map), + key: json['key'] as String?, + trash: json['trash'] as bool?, + ownerIdForeignKey: (json['owner_id_foreign_key'] as num?)?.toInt(), + userIdForeignKey: (json['user_id_foreign_key'] as num?)?.toInt(), + addressIdForeignKey: (json['address_id_foreign_key'] as num?)?.toInt(), + hasChainCompany: json['has_chain_company'] as bool?, + userBankIdForeignKey: (json['user_bank_id_foreign_key'] as num?)?.toInt(), + cityOperator: json['city_operator'], + unitName: json['unit_name'] as String?, + gisCode: json['gis_code'] as String?, + operatingLicenceCapacity: (json['operating_licence_capacity'] as num?) + ?.toInt(), + numberOfHalls: (json['number_of_halls'] as num?)?.toInt(), + tenant: json['tenant'] as bool?, + hasTenant: json['has_tenant'] as bool?, + personType: json['person_type'], + economicCode: json['economic_code'], + systemCode: json['system_code'] as String?, + epidemiologicalCode: json['epidemiological_code'] as String?, + breedingUniqueId: json['breeding_unique_id'] as String?, + totalCapacity: (json['total_capacity'] as num?)?.toInt(), + licenceNumber: json['licence_number'] as String?, + healthCertificateNumber: json['health_certificate_number'] as String?, + numberOfRequests: (json['number_of_requests'] as num?)?.toInt(), + hatchingDate: json['hatching_date'] as String?, + lastPartyDate: json['last_party_date'] as String?, + numberOfIncubators: (json['number_of_incubators'] as num?)?.toInt(), + herdAgeByDay: (json['herd_age_by_day'] as num?)?.toInt(), + herdAgeByWeek: (json['herd_age_by_week'] as num?)?.toInt(), + numberOfParty: (json['number_of_party'] as num?)?.toInt(), + communicationType: json['communication_type'], + cooperative: json['cooperative'], + dateOfRegister: json['date_of_register'] as String?, + unitStatus: json['unit_status'], + active: json['active'] as bool?, + identityDocuments: json['identity_documents'], + samasatUserCode: json['samasat_user_code'], + baseOrder: json['base_order'], + incubationDate: json['incubation_date'] as String?, + walletAmount: (json['wallet_amount'] as num?)?.toInt(), + city: (json['city'] as num?)?.toInt(), + 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?, + walletIdForeignKey: (json['wallet_id_foreign_key'] as num?)?.toInt(), + poultryIdKey: (json['poultry_id_key'] as num?)?.toInt(), + lat: (json['lat'] as num?)?.toDouble(), + long: (json['long'] as num?)?.toDouble(), + date: json['date'], + killingAveAge: (json['killing_ave_age'] as num?)?.toInt(), + activeLeftOver: (json['active_left_over'] as num?)?.toInt(), + killingAveCount: (json['killing_ave_count'] as num?)?.toInt(), + killingAveWeight: (json['killing_ave_weight'] as num?)?.toInt(), + killingLiveWeight: (json['killing_live_weight'] as num?)?.toInt(), + killingCarcassesWeight: (json['killing_carcasses_weight'] as num?)?.toInt(), + killingLossWeightPercent: (json['killing_loss_weight_percent'] 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(), + interestLicenseId: json['interest_license_id'], + orderLimit: json['order_limit'] as bool?, + owner: json['owner'], + userBankInfo: json['user_bank_info'], + wallet: (json['wallet'] as num?)?.toInt(), + hatchingInfo: json['hatching_info'] == null + ? null + : HatchingInfo.fromJson(json['hatching_info'] as Map), +); + +Map _$PoultryFarmToJson(_PoultryFarm instance) => + { + 'id': instance.id, + 'user': instance.user, + 'address': instance.address, + 'hatching': instance.hatching, + 'vet_farm': instance.vetFarm, + 'key': instance.key, + 'trash': instance.trash, + 'owner_id_foreign_key': instance.ownerIdForeignKey, + 'user_id_foreign_key': instance.userIdForeignKey, + 'address_id_foreign_key': instance.addressIdForeignKey, + 'has_chain_company': instance.hasChainCompany, + 'user_bank_id_foreign_key': instance.userBankIdForeignKey, + 'city_operator': instance.cityOperator, + 'unit_name': instance.unitName, + 'gis_code': instance.gisCode, + 'operating_licence_capacity': instance.operatingLicenceCapacity, + 'number_of_halls': instance.numberOfHalls, + 'tenant': instance.tenant, + 'has_tenant': instance.hasTenant, + 'person_type': instance.personType, + 'economic_code': instance.economicCode, + 'system_code': instance.systemCode, + 'epidemiological_code': instance.epidemiologicalCode, + 'breeding_unique_id': instance.breedingUniqueId, + 'total_capacity': instance.totalCapacity, + 'licence_number': instance.licenceNumber, + 'health_certificate_number': instance.healthCertificateNumber, + 'number_of_requests': instance.numberOfRequests, + 'hatching_date': instance.hatchingDate, + 'last_party_date': instance.lastPartyDate, + 'number_of_incubators': instance.numberOfIncubators, + 'herd_age_by_day': instance.herdAgeByDay, + 'herd_age_by_week': instance.herdAgeByWeek, + 'number_of_party': instance.numberOfParty, + 'communication_type': instance.communicationType, + 'cooperative': instance.cooperative, + 'date_of_register': instance.dateOfRegister, + 'unit_status': instance.unitStatus, + 'active': instance.active, + 'identity_documents': instance.identityDocuments, + 'samasat_user_code': instance.samasatUserCode, + 'base_order': instance.baseOrder, + 'incubation_date': instance.incubationDate, + 'wallet_amount': instance.walletAmount, + 'city': instance.city, + 'city_number': instance.cityNumber, + 'city_name': instance.cityName, + 'province_number': instance.provinceNumber, + 'province_name': instance.provinceName, + 'wallet_id_foreign_key': instance.walletIdForeignKey, + 'poultry_id_key': instance.poultryIdKey, + 'lat': instance.lat, + 'long': instance.long, + 'date': instance.date, + 'killing_ave_age': instance.killingAveAge, + 'active_left_over': instance.activeLeftOver, + 'killing_ave_count': instance.killingAveCount, + 'killing_ave_weight': instance.killingAveWeight, + 'killing_live_weight': instance.killingLiveWeight, + 'killing_carcasses_weight': instance.killingCarcassesWeight, + 'killing_loss_weight_percent': instance.killingLossWeightPercent, + '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, + 'interest_license_id': instance.interestLicenseId, + 'order_limit': instance.orderLimit, + 'owner': instance.owner, + 'user_bank_info': instance.userBankInfo, + 'wallet': instance.wallet, + 'hatching_info': instance.hatchingInfo, + }; + +_User _$UserFromJson(Map json) => _User( + fullname: json['fullname'] as String?, + mobile: json['mobile'] as String?, +); + +Map _$UserToJson(_User instance) => { + 'fullname': instance.fullname, + 'mobile': instance.mobile, +}; + +_Address _$AddressFromJson(Map json) => _Address( + province: json['province'] == null + ? null + : Province.fromJson(json['province'] as Map), + city: json['city'] == null + ? null + : City.fromJson(json['city'] as Map), + address: json['address'] as String?, + postalCode: json['postal_code'] as String?, +); + +Map _$AddressToJson(_Address instance) => { + 'province': instance.province, + 'city': instance.city, + 'address': instance.address, + 'postal_code': instance.postalCode, +}; + +_Province _$ProvinceFromJson(Map json) => + _Province(key: json['key'] as String?, name: json['name'] as String?); + +Map _$ProvinceToJson(_Province instance) => { + 'key': instance.key, + 'name': instance.name, +}; + +_City _$CityFromJson(Map json) => + _City(key: json['key'] as String?, name: json['name'] as String?); + +Map _$CityToJson(_City instance) => { + 'key': instance.key, + 'name': instance.name, +}; + +_VetFarm _$VetFarmFromJson(Map json) => _VetFarm( + fullName: json['full_name'] as String?, + mobile: json['mobile'] as String?, + city: json['city'] as String?, + province: json['province'] as String?, +); + +Map _$VetFarmToJson(_VetFarm instance) => { + 'full_name': instance.fullName, + 'mobile': instance.mobile, + 'city': instance.city, + 'province': instance.province, +}; + +_HatchingInfo _$HatchingInfoFromJson(Map json) => + _HatchingInfo( + period: (json['period'] as num?)?.toInt(), + activeHatching: json['active_hatching'] as bool?, + ); + +Map _$HatchingInfoToJson(_HatchingInfo instance) => + { + 'period': instance.period, + 'active_hatching': instance.activeHatching, + }; diff --git a/packages/chicken/lib/data/repositories/poultry_science/poultry_science_repository.dart b/packages/chicken/lib/data/repositories/poultry_science/poultry_science_repository.dart index a940ca1..394c32e 100644 --- a/packages/chicken/lib/data/repositories/poultry_science/poultry_science_repository.dart +++ b/packages/chicken/lib/data/repositories/poultry_science/poultry_science_repository.dart @@ -1,5 +1,6 @@ import 'package:rasadyar_chicken/data/models/response/hatching/hatching_models.dart'; import 'package:rasadyar_chicken/data/models/response/hatching_report/hatching_report.dart'; +import 'package:rasadyar_chicken/data/models/response/poultry/poultry_farm.dart'; import 'package:rasadyar_chicken/data/models/response/poultry_science/home_poultry_science/home_poultry_science_model.dart'; import 'package:rasadyar_core/core.dart'; @@ -24,4 +25,9 @@ abstract class PoultryScienceRepository { Map? queryParameters, }); + Future?> getPoultryScienceFarmList({ + required String token, + Map? queryParameters, + }); + } diff --git a/packages/chicken/lib/data/repositories/poultry_science/poultry_science_repository_imp.dart b/packages/chicken/lib/data/repositories/poultry_science/poultry_science_repository_imp.dart index 63c6218..a635354 100644 --- a/packages/chicken/lib/data/repositories/poultry_science/poultry_science_repository_imp.dart +++ b/packages/chicken/lib/data/repositories/poultry_science/poultry_science_repository_imp.dart @@ -1,6 +1,7 @@ import 'package:rasadyar_chicken/data/data_source/remote/poultry_science/poultry_science_remote.dart'; import 'package:rasadyar_chicken/data/models/response/hatching/hatching_models.dart'; import 'package:rasadyar_chicken/data/models/response/hatching_report/hatching_report.dart'; +import 'package:rasadyar_chicken/data/models/response/poultry/poultry_farm.dart'; import 'package:rasadyar_chicken/data/models/response/poultry_science/home_poultry_science/home_poultry_science_model.dart'; import 'package:rasadyar_core/core.dart'; @@ -41,4 +42,15 @@ class PoultryScienceRepositoryImp implements PoultryScienceRepository { }) async { return await datasource.getPoultryScienceReport(token: token, queryParameters: queryParameters); } + + @override + Future?> getPoultryScienceFarmList({ + required String token, + Map? queryParameters, + }) async { + return await datasource.getPoultryScienceFarmList( + token: token, + queryParameters: queryParameters, + ); + } } diff --git a/packages/chicken/lib/presentation/pages/poultry_science/farm/logic.dart b/packages/chicken/lib/presentation/pages/poultry_science/farm/logic.dart new file mode 100644 index 0000000..6a5740a --- /dev/null +++ b/packages/chicken/lib/presentation/pages/poultry_science/farm/logic.dart @@ -0,0 +1,103 @@ +import 'package:flutter/material.dart'; +import 'package:rasadyar_chicken/data/models/response/poultry/poultry_farm.dart'; +import 'package:rasadyar_chicken/presentation/pages/poultry_science/home/logic.dart'; +import 'package:rasadyar_chicken/presentation/pages/poultry_science/root/logic.dart'; +import 'package:rasadyar_core/core.dart'; + +class FarmLogic extends GetxController { + List routes = ['اقدام', 'فارم ها']; + PoultryScienceRootLogic rootLogic = Get.find(); + final PoultryScienceHomeLogic _homeLogic = Get.find(); + RxList tagInfo = [ + InformationTagData( + labelTitle: 'کل فارم ها', + isLoading: true, + labelVecIcon: Assets.vec.cubeScanSvg.path, + blendMode: BlendMode.dst, + valueBgColor: Colors.white, + labelGradient: LinearGradient( + begin: Alignment.topCenter, + end: Alignment.bottomCenter, + colors: [AppColor.blueLight, Colors.white], + ), + ), + InformationTagData( + labelTitle: 'حجم جوجه ریزی', + unit: 'قطعه', + isLoading: true, + labelVecIcon: Assets.vec.cubeCardSvg.path, + blendMode: BlendMode.dst, + valueBgColor: Colors.white, + labelGradient: LinearGradient( + begin: Alignment.topCenter, + end: Alignment.bottomCenter, + colors: [AppColor.greenLightHover, Colors.white], + ), + ), + ].obs; + Rx>> farmList = + Resource>.loading().obs; + + RxInt currentPage = 1.obs; + final RxBool isLoadingMoreList = false.obs; + RxList isExpandedList = [].obs; + + @override + void onReady() { + super.onReady(); + tagInfo[0] = tagInfo[0].copyWith( + isLoading: false, + value: _homeLogic.tagInfo['first']!.first.value, + ); + tagInfo[1] = tagInfo[1].copyWith( + isLoading: false, + value: _homeLogic.tagInfo['second']!.first.value, + ); + + getFarmList(); + } + + @override + void onClose() { + super.onClose(); + } + + Future getFarmList([bool isLoadingMore = false]) async { + if (isLoadingMore) { + isLoadingMoreList.value = true; + } else { + farmList.value = Resource>.loading(); + } + await safeCall( + call: () async => await rootLogic.poultryRepository.getPoultryScienceFarmList( + token: rootLogic.tokenService.accessToken.value!, + queryParameters: buildQueryParams( + queryParams: {'type': 'farm'}, + role: 'PoultryScience', + pageSize: 50, + search: 'filter', + value: '', + page: currentPage.value, + ), + ), + onSuccess: (res) { + if ((res?.count ?? 0) == 0) { + farmList.value = Resource>.empty(); + } else { + farmList.value = Resource>.success( + PaginationModel( + count: res?.count ?? 0, + next: res?.next, + previous: res?.previous, + results: [ + ...(farmList.value.data?.results ?? []), + ...?(res?.results as List?), + ], + ), + ); + } + }, + onError: (error, stackTrace) {}, + ); + } +} diff --git a/packages/chicken/lib/presentation/pages/poultry_science/farm/view.dart b/packages/chicken/lib/presentation/pages/poultry_science/farm/view.dart new file mode 100644 index 0000000..5d6ca9d --- /dev/null +++ b/packages/chicken/lib/presentation/pages/poultry_science/farm/view.dart @@ -0,0 +1,226 @@ +import 'package:flutter/material.dart'; +import 'package:rasadyar_chicken/data/models/response/poultry/poultry_farm.dart'; +import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart'; +import 'package:rasadyar_core/core.dart'; + +import 'logic.dart'; + +class FarmPage extends GetView { + const FarmPage({super.key}); + + @override + Widget build(BuildContext context) { + return BasePage( + routes: controller.routes, + hasFilter: false, + hasSearch: false, + widgets: [firstTagInformation(), farmListWidget()], + ); + } + + Widget firstTagInformation() { + return Padding( + padding: const EdgeInsets.fromLTRB(0, 8, 0, 13), + child: ObxValue((data) { + return Padding( + padding: EdgeInsets.symmetric(horizontal: 20.w), + child: Row( + spacing: 8, + children: List.generate( + data.length, + (index) => Expanded(child: InformationTag(data: data[index])), + ), + ), + ); + }, controller.tagInfo), + ); + } + + Widget farmListWidget() { + return Expanded( + child: ObxValue((data) { + return RPaginatedListView( + listType: ListType.separated, + resource: data.value, + hasMore: data.value.data?.next != null, + padding: EdgeInsets.fromLTRB(8, 8, 8, 80), + itemBuilder: (context, index) { + var item = data.value.data!.results![index]; + return ObxValue((val) { + return ExpandableListItem2( + selected: val.contains(index), + onTap: () => controller.isExpandedList.toggle(index), + index: index, + child: itemListWidget(item), + secondChild: itemListExpandedWidget(item), + labelColor: AppColor.blueLight, + labelIcon: Assets.vec.checkSquareSvg.path, + ); + }, controller.isExpandedList); + }, + itemCount: data.value.data?.results?.length ?? 0, + separatorBuilder: (context, index) => SizedBox(height: 8.h), + onLoadMore: () async => controller.getFarmList(true), + onRefresh: () async { + controller.currentPage.value = 1; + await controller.getFarmList(); + }, + ); + }, controller.farmList), + ); + } + + Container itemListExpandedWidget(PoultryFarm item) { + return Container( + padding: EdgeInsets.symmetric(horizontal: 8), + decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(8)), + child: Column( + spacing: 8, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + item.unitName ?? 'N/A', + textAlign: TextAlign.center, + style: AppFonts.yekan16.copyWith(color: AppColor.greenDark), + ), + Spacer(), + + Visibility( + child: Text( + '${item.address?.province?.name} / ${item.address?.city?.name}', + textAlign: TextAlign.center, + style: AppFonts.yekan14.copyWith(color: AppColor.blueNormal), + ), + ), + ], + ), + Container( + height: 32, + padding: EdgeInsets.symmetric(horizontal: 8), + decoration: ShapeDecoration( + color: AppColor.blueLight, + shape: RoundedRectangleBorder( + side: BorderSide(width: 1, color: AppColor.blueLightHover), + borderRadius: BorderRadius.circular(8), + ), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + 'تعاونی : ${item.cityOperator ?? 'ندارد'}', + style: AppFonts.yekan14.copyWith(color: AppColor.textColor), + ), + + Text( + ' تعداد سالن : ${item.numberOfHalls}', + style: AppFonts.yekan14.copyWith(color: AppColor.textColor), + ), + ], + ), + ), + + buildRow(title: 'مالک/ تلفن', value: '${item.user?.fullname} (${item.user?.mobile})'), + buildRow(title: 'شناسه یکتا', value: item.breedingUniqueId ?? 'N/A'), + buildRow(title: 'کد اپیدمیولوژیک', value: item.epidemiologicalCode ?? 'N/A'), + buildRow(title: 'کد بهداشتی', value: item.healthCertificateNumber ?? 'N/A'), + buildRow( + title: 'دامپزشک فارم', + value: '${item.vetFarm?.fullName ?? '-'} (${item.vetFarm?.mobile ?? '-'})', + ), + buildRow(title: 'ظرفیت فارم', value: item.totalCapacity.separatedByComma), + buildRow( + title: 'جوجه ریزی فعال (تعداد دوره) ', + value: + '${(item.hatchingInfo?.activeHatching ?? false) ? 'دارد' : 'ندارد'} (${item.hatchingInfo?.period ?? 0})', + ), + + /* buildRow( + title: 'شرح بازرسی', + value: item.reportInfo?.image == false ? 'ارسال تصویر جوجه ریزی فارم ' : 'تکمیل شده', + titleStyle: AppFonts.yekan14.copyWith( + color: (item.reportInfo?.image ?? false) ? AppColor.greenNormal : AppColor.redDark, + ), + valueStyle: AppFonts.yekan14.copyWith( + color: (item.reportInfo?.image ?? false) ? AppColor.greenNormal : AppColor.redDark, + ), + ),*/ + /* Visibility( + visible: (item.reportInfo?.image == false), + child: RElevated( + text: 'ثبت بازرسی', + isFullWidth: true, + width: 150.w, + height: 40.h, + onPressed: () { + cameraBottomSheet(item.id!); + }, + textStyle: AppFonts.yekan20.copyWith(color: Colors.white), + backgroundColor: AppColor.greenNormal, + ), + ),*/ + ], + ), + ); + } + + Widget itemListWidget(PoultryFarm item) { + return Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + SizedBox(width: 20), + Expanded( + flex: 2, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + spacing: 3, + children: [ + Text( + item.unitName ?? 'N/A', + textAlign: TextAlign.start, + style: AppFonts.yekan12.copyWith(color: AppColor.blueNormal), + ), + Text( + item.user?.mobile ?? 'N/A', + textAlign: TextAlign.center, + style: AppFonts.yekan14.copyWith(color: AppColor.bgDark), + ), + ], + ), + ), + Expanded( + flex: 3, + child: Column( + spacing: 3, + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + 'شناسه یکتا: ${item.breedingUniqueId}', + textAlign: TextAlign.start, + style: AppFonts.yekan12.copyWith(color: AppColor.blueNormal), + ), + Text( + '${item.address?.province?.name}/${item.address?.city?.name}', + textAlign: TextAlign.left, + + style: AppFonts.yekan12.copyWith(color: AppColor.bgDark), + ), + ], + ), + ), + Expanded( + flex: 1, + child: Assets.vec.scanSvg.svg( + width: 32.w, + height: 32.h, + colorFilter: ColorFilter.mode(AppColor.blueNormal, BlendMode.srcIn), + ), + ), + ], + ); + } +} diff --git a/packages/chicken/lib/presentation/pages/poultry_science/home/logic.dart b/packages/chicken/lib/presentation/pages/poultry_science/home/logic.dart index 5983f1d..bfe84db 100644 --- a/packages/chicken/lib/presentation/pages/poultry_science/home/logic.dart +++ b/packages/chicken/lib/presentation/pages/poultry_science/home/logic.dart @@ -8,7 +8,6 @@ class PoultryScienceHomeLogic extends GetxController { PoultryScienceRootLogic rootLogic = Get.find(); Rxn homeInformation = Rxn(); RxBool isExpanded = false.obs; - RxMap> tagInfo = RxMap({ 'first': [ InformationTagData( @@ -55,7 +54,6 @@ class PoultryScienceHomeLogic extends GetxController { valueBgColor: const Color(0xFFCEDFFF), ), ], - 'third': [ InformationTagData( labelTitle: 'تلفات', diff --git a/packages/chicken/lib/presentation/pages/poultry_science/inspection/logic.dart b/packages/chicken/lib/presentation/pages/poultry_science/inspection/logic.dart index 068bea3..6e69cb5 100644 --- a/packages/chicken/lib/presentation/pages/poultry_science/inspection/logic.dart +++ b/packages/chicken/lib/presentation/pages/poultry_science/inspection/logic.dart @@ -80,6 +80,7 @@ class InspectionPoultryScienceLogic extends GetxController { token: rootLogic.tokenService.accessToken.value!, queryParameters: buildQueryParams( queryParams: {'type': 'hatching', 'report': true}, + role: 'PoultryScience', pageSize: 50, page: currentPage.value, ), diff --git a/packages/chicken/lib/presentation/routes/pages.dart b/packages/chicken/lib/presentation/routes/pages.dart index 86ee6f2..1a479d2 100644 --- a/packages/chicken/lib/presentation/routes/pages.dart +++ b/packages/chicken/lib/presentation/routes/pages.dart @@ -1,5 +1,7 @@ import 'package:rasadyar_chicken/presentation/pages/auth/logic.dart'; import 'package:rasadyar_chicken/presentation/pages/auth/view.dart'; +import 'package:rasadyar_chicken/presentation/pages/poultry_science/farm/logic.dart'; +import 'package:rasadyar_chicken/presentation/pages/poultry_science/farm/view.dart'; import 'package:rasadyar_chicken/presentation/pages/poultry_science/home/logic.dart'; import 'package:rasadyar_chicken/presentation/pages/poultry_science/inspection/logic.dart'; import 'package:rasadyar_chicken/presentation/pages/poultry_science/inspection/view.dart'; @@ -176,6 +178,17 @@ sealed class ChickenPages { Get.lazyPut(() => PoultryActionLogic()); }), ), + + GetPage( + name: ChickenRoutes.farmPoultryScience, + page: () => FarmPage(), + middlewares: [AuthMiddleware()], + binding: BindingsBuilder(() { + Get.lazyPut(() => FarmLogic()); + Get.lazyPut(() => PoultryScienceHomeLogic()); + Get.lazyPut(() => PoultryScienceRootLogic()); + }), + ), //endregion ]; } diff --git a/packages/core/lib/presentation/widget/list_view/r_paginated_list_view.dart b/packages/core/lib/presentation/widget/list_view/r_paginated_list_view.dart index 4876689..a29d878 100644 --- a/packages/core/lib/presentation/widget/list_view/r_paginated_list_view.dart +++ b/packages/core/lib/presentation/widget/list_view/r_paginated_list_view.dart @@ -1,7 +1,6 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:rasadyar_core/core.dart'; -import 'package:rasadyar_core/data/model/pagination_model/pagination_model.dart'; enum ListType { builder, separated } @@ -72,6 +71,8 @@ class RPaginatedListView extends StatelessWidget { }, child: RefreshIndicator( color: AppColor.blueNormal, + triggerMode: RefreshIndicatorTriggerMode.anywhere, + onRefresh: onRefresh ?? () async {}, child: listType == ListType.separated ? ListView.separated(