feat: update poultry science feature with new data models and repository methods, enhance inspection submission process, and improve UI for better user experience
This commit is contained in:
@@ -4,7 +4,7 @@ part 'hatching_models.freezed.dart';
|
||||
part 'hatching_models.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class HatchingModel with _$HatchingModel{
|
||||
abstract class HatchingModel with _$HatchingModel {
|
||||
const factory HatchingModel({
|
||||
int? id,
|
||||
Poultry? poultry,
|
||||
@@ -94,6 +94,11 @@ abstract class HatchingModel with _$HatchingModel{
|
||||
String? outputArchiver,
|
||||
num? barDifferenceRequestWeight,
|
||||
num? barDifferenceRequestQuantity,
|
||||
num? totalDiseaseLosses,
|
||||
num? totalFlockDestruction,
|
||||
num? totalNormalFlockLosses,
|
||||
num? totalForceMajeureLosses,
|
||||
num? totalFireLosses,
|
||||
String? healthCertificate,
|
||||
num? samasatDischargePercentage,
|
||||
String? personTypeName,
|
||||
@@ -107,11 +112,13 @@ abstract class HatchingModel with _$HatchingModel{
|
||||
String? tenantCity,
|
||||
bool? hasTenant,
|
||||
String? archiveDate,
|
||||
bool? unknown,
|
||||
String? createdBy,
|
||||
String? modifiedBy,
|
||||
}) = _HatchingModel;
|
||||
|
||||
factory HatchingModel.fromJson(Map<String, dynamic> json) => _$HatchingModelFromJson(json);
|
||||
factory HatchingModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$HatchingModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
@@ -187,17 +194,16 @@ abstract class Poultry with _$Poultry {
|
||||
int? wallet,
|
||||
}) = _Poultry;
|
||||
|
||||
factory Poultry.fromJson(Map<String, dynamic> json) => _$PoultryFromJson(json);
|
||||
factory Poultry.fromJson(Map<String, dynamic> json) =>
|
||||
_$PoultryFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class PoultryUser with _$PoultryUser {
|
||||
const factory PoultryUser({
|
||||
String? fullname,
|
||||
String? mobile,
|
||||
}) = _PoultryUser;
|
||||
const factory PoultryUser({String? fullname, String? mobile}) = _PoultryUser;
|
||||
|
||||
factory PoultryUser.fromJson(Map<String, dynamic> json) => _$PoultryUserFromJson(json);
|
||||
factory PoultryUser.fromJson(Map<String, dynamic> json) =>
|
||||
_$PoultryUserFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
@@ -209,27 +215,24 @@ abstract class PoultryAddress with _$PoultryAddress {
|
||||
String? postalCode,
|
||||
}) = _PoultryAddress;
|
||||
|
||||
factory PoultryAddress.fromJson(Map<String, dynamic> json) => _$PoultryAddressFromJson(json);
|
||||
factory PoultryAddress.fromJson(Map<String, dynamic> json) =>
|
||||
_$PoultryAddressFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class ProvinceRef with _$ProvinceRef {
|
||||
const factory ProvinceRef({
|
||||
String? key,
|
||||
String? name,
|
||||
}) = _ProvinceRef;
|
||||
const factory ProvinceRef({String? key, String? name}) = _ProvinceRef;
|
||||
|
||||
factory ProvinceRef.fromJson(Map<String, dynamic> json) => _$ProvinceRefFromJson(json);
|
||||
factory ProvinceRef.fromJson(Map<String, dynamic> json) =>
|
||||
_$ProvinceRefFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class CityRef with _$CityRef {
|
||||
const factory CityRef({
|
||||
String? key,
|
||||
String? name,
|
||||
}) = _CityRef;
|
||||
const factory CityRef({String? key, String? name}) = _CityRef;
|
||||
|
||||
factory CityRef.fromJson(Map<String, dynamic> json) => _$CityRefFromJson(json);
|
||||
factory CityRef.fromJson(Map<String, dynamic> json) =>
|
||||
_$CityRefFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
@@ -247,7 +250,8 @@ abstract class ChainCompany with _$ChainCompany {
|
||||
num? wallet,
|
||||
}) = _ChainCompany;
|
||||
|
||||
factory ChainCompany.fromJson(Map<String, dynamic> json) => _$ChainCompanyFromJson(json);
|
||||
factory ChainCompany.fromJson(Map<String, dynamic> json) =>
|
||||
_$ChainCompanyFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
@@ -289,7 +293,8 @@ abstract class ChainUser with _$ChainUser {
|
||||
String? unitAddress,
|
||||
}) = _ChainUser;
|
||||
|
||||
factory ChainUser.fromJson(Map<String, dynamic> json) => _$ChainUserFromJson(json);
|
||||
factory ChainUser.fromJson(Map<String, dynamic> json) =>
|
||||
_$ChainUserFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
@@ -306,27 +311,26 @@ abstract class ChainUserState with _$ChainUserState {
|
||||
String? nationalCode,
|
||||
}) = _ChainUserState;
|
||||
|
||||
factory ChainUserState.fromJson(Map<String, dynamic> json) => _$ChainUserStateFromJson(json);
|
||||
factory ChainUserState.fromJson(Map<String, dynamic> json) =>
|
||||
_$ChainUserStateFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class VetFarm with _$VetFarm {
|
||||
const factory VetFarm({
|
||||
String? vetFarmFullName,
|
||||
String? vetFarmMobile,
|
||||
}) = _VetFarm;
|
||||
const factory VetFarm({String? vetFarmFullName, String? vetFarmMobile}) =
|
||||
_VetFarm;
|
||||
|
||||
factory VetFarm.fromJson(Map<String, dynamic> json) => _$VetFarmFromJson(json);
|
||||
factory VetFarm.fromJson(Map<String, dynamic> json) =>
|
||||
_$VetFarmFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class ActiveKill with _$ActiveKill {
|
||||
const factory ActiveKill({
|
||||
bool? activeKill,
|
||||
num? countOfRequest,
|
||||
}) = _ActiveKill;
|
||||
const factory ActiveKill({bool? activeKill, num? countOfRequest}) =
|
||||
_ActiveKill;
|
||||
|
||||
factory ActiveKill.fromJson(Map<String, dynamic> json) => _$ActiveKillFromJson(json);
|
||||
factory ActiveKill.fromJson(Map<String, dynamic> json) =>
|
||||
_$ActiveKillFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
@@ -348,7 +352,8 @@ abstract class KillingInfo with _$KillingInfo {
|
||||
num? wareHouseBarsWeightLose,
|
||||
}) = _KillingInfo;
|
||||
|
||||
factory KillingInfo.fromJson(Map<String, dynamic> json) => _$KillingInfoFromJson(json);
|
||||
factory KillingInfo.fromJson(Map<String, dynamic> json) =>
|
||||
_$KillingInfoFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
@@ -361,17 +366,16 @@ abstract class FreeGovernmentalInfo with _$FreeGovernmentalInfo {
|
||||
num? leftTotalFreeCommitmentQuantity,
|
||||
}) = _FreeGovernmentalInfo;
|
||||
|
||||
factory FreeGovernmentalInfo.fromJson(Map<String, dynamic> json) => _$FreeGovernmentalInfoFromJson(json);
|
||||
factory FreeGovernmentalInfo.fromJson(Map<String, dynamic> json) =>
|
||||
_$FreeGovernmentalInfoFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class ReportInfo with _$ReportInfo {
|
||||
const factory ReportInfo({
|
||||
bool? poultryScience,
|
||||
bool? image,
|
||||
}) = _ReportInfo;
|
||||
const factory ReportInfo({bool? poultryScience, bool? image}) = _ReportInfo;
|
||||
|
||||
factory ReportInfo.fromJson(Map<String, dynamic> json) => _$ReportInfoFromJson(json);
|
||||
factory ReportInfo.fromJson(Map<String, dynamic> json) =>
|
||||
_$ReportInfoFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
@@ -382,18 +386,17 @@ abstract class LatestHatchingChange with _$LatestHatchingChange {
|
||||
String? fullName,
|
||||
}) = _LatestHatchingChange;
|
||||
|
||||
factory LatestHatchingChange.fromJson(Map<String, dynamic> json) => _$LatestHatchingChangeFromJson(json);
|
||||
factory LatestHatchingChange.fromJson(Map<String, dynamic> json) =>
|
||||
_$LatestHatchingChangeFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class Registrar with _$Registrar {
|
||||
const factory Registrar({
|
||||
String? date,
|
||||
String? role,
|
||||
String? fullname,
|
||||
}) = _Registrar;
|
||||
const factory Registrar({String? date, String? role, String? fullname}) =
|
||||
_Registrar;
|
||||
|
||||
factory Registrar.fromJson(Map<String, dynamic> json) => _$RegistrarFromJson(json);
|
||||
factory Registrar.fromJson(Map<String, dynamic> json) =>
|
||||
_$RegistrarFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
@@ -405,7 +408,8 @@ abstract class LastChange with _$LastChange {
|
||||
String? fullName,
|
||||
}) = _LastChange;
|
||||
|
||||
factory LastChange.fromJson(Map<String, dynamic> json) => _$LastChangeFromJson(json);
|
||||
factory LastChange.fromJson(Map<String, dynamic> json) =>
|
||||
_$LastChangeFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
@@ -416,6 +420,6 @@ abstract class BreedItem with _$BreedItem {
|
||||
num? remainQuantity,
|
||||
}) = _BreedItem;
|
||||
|
||||
factory BreedItem.fromJson(Map<String, dynamic> json) => _$BreedItemFromJson(json);
|
||||
factory BreedItem.fromJson(Map<String, dynamic> json) =>
|
||||
_$BreedItemFromJson(json);
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -126,6 +126,11 @@ _HatchingModel _$HatchingModelFromJson(
|
||||
outputArchiver: json['output_archiver'] as String?,
|
||||
barDifferenceRequestWeight: json['bar_difference_request_weight'] as num?,
|
||||
barDifferenceRequestQuantity: json['bar_difference_request_quantity'] as num?,
|
||||
totalDiseaseLosses: json['total_disease_losses'] as num?,
|
||||
totalFlockDestruction: json['total_flock_destruction'] as num?,
|
||||
totalNormalFlockLosses: json['total_normal_flock_losses'] as num?,
|
||||
totalForceMajeureLosses: json['total_force_majeure_losses'] as num?,
|
||||
totalFireLosses: json['total_fire_losses'] as num?,
|
||||
healthCertificate: json['health_certificate'] as String?,
|
||||
samasatDischargePercentage: json['samasat_discharge_percentage'] as num?,
|
||||
personTypeName: json['person_type_name'] as String?,
|
||||
@@ -139,6 +144,7 @@ _HatchingModel _$HatchingModelFromJson(
|
||||
tenantCity: json['tenant_city'] as String?,
|
||||
hasTenant: json['has_tenant'] as bool?,
|
||||
archiveDate: json['archive_date'] as String?,
|
||||
unknown: json['unknown'] as bool?,
|
||||
createdBy: json['created_by'] as String?,
|
||||
modifiedBy: json['modified_by'] as String?,
|
||||
);
|
||||
@@ -233,6 +239,11 @@ Map<String, dynamic> _$HatchingModelToJson(_HatchingModel instance) =>
|
||||
'output_archiver': instance.outputArchiver,
|
||||
'bar_difference_request_weight': instance.barDifferenceRequestWeight,
|
||||
'bar_difference_request_quantity': instance.barDifferenceRequestQuantity,
|
||||
'total_disease_losses': instance.totalDiseaseLosses,
|
||||
'total_flock_destruction': instance.totalFlockDestruction,
|
||||
'total_normal_flock_losses': instance.totalNormalFlockLosses,
|
||||
'total_force_majeure_losses': instance.totalForceMajeureLosses,
|
||||
'total_fire_losses': instance.totalFireLosses,
|
||||
'health_certificate': instance.healthCertificate,
|
||||
'samasat_discharge_percentage': instance.samasatDischargePercentage,
|
||||
'person_type_name': instance.personTypeName,
|
||||
@@ -246,6 +257,7 @@ Map<String, dynamic> _$HatchingModelToJson(_HatchingModel instance) =>
|
||||
'tenant_city': instance.tenantCity,
|
||||
'has_tenant': instance.hasTenant,
|
||||
'archive_date': instance.archiveDate,
|
||||
'unknown': instance.unknown,
|
||||
'created_by': instance.createdBy,
|
||||
'modified_by': instance.modifiedBy,
|
||||
};
|
||||
|
||||
@@ -0,0 +1,207 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
import '../hatching/hatching_models.dart';
|
||||
|
||||
part 'poultry_science_report.freezed.dart';
|
||||
part 'poultry_science_report.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class PoultryScienceReport with _$PoultryScienceReport {
|
||||
const factory PoultryScienceReport({
|
||||
int? id,
|
||||
PoultryScienceRef? poultryScience,
|
||||
HatchingModel? hatching,
|
||||
UserRef? user,
|
||||
String? key,
|
||||
String? createDate,
|
||||
String? modifyDate,
|
||||
bool? trash,
|
||||
String? date,
|
||||
String? image,
|
||||
num? lat,
|
||||
num? log,
|
||||
String? reporterFullname,
|
||||
String? reporterMobile,
|
||||
String? reporterRole,
|
||||
String? state,
|
||||
num? realQuantityAi,
|
||||
String? messageAi,
|
||||
num? realQuantity,
|
||||
String? message,
|
||||
String? messageRegistererFullname,
|
||||
String? messageRegistererMobile,
|
||||
String? messageRegistererRole,
|
||||
ReportInformation? reportInformation,
|
||||
String? createdBy,
|
||||
String? modifiedBy,
|
||||
}) = _PoultryScienceReport;
|
||||
|
||||
factory PoultryScienceReport.fromJson(Map<String, dynamic> json) =>
|
||||
_$PoultryScienceReportFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class PoultryScienceRef with _$PoultryScienceRef {
|
||||
const factory PoultryScienceRef({
|
||||
int? id,
|
||||
UserWithCity? user,
|
||||
String? key,
|
||||
String? createDate,
|
||||
String? modifyDate,
|
||||
bool? trash,
|
||||
String? engineeringCode,
|
||||
String? createdBy,
|
||||
String? modifiedBy,
|
||||
List<int>? poultry,
|
||||
}) = _PoultryScienceRef;
|
||||
|
||||
factory PoultryScienceRef.fromJson(Map<String, dynamic> json) =>
|
||||
_$PoultryScienceRefFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class UserRef with _$UserRef {
|
||||
const factory UserRef({String? fullname, String? mobile, CityRef? city}) =
|
||||
_UserRef;
|
||||
|
||||
factory UserRef.fromJson(Map<String, dynamic> json) =>
|
||||
_$UserRefFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class UserWithCity with _$UserWithCity {
|
||||
const factory UserWithCity({
|
||||
String? fullname,
|
||||
String? mobile,
|
||||
CityRef? city,
|
||||
}) = _UserWithCity;
|
||||
|
||||
factory UserWithCity.fromJson(Map<String, dynamic> json) =>
|
||||
_$UserWithCityFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class ReportInformation with _$ReportInformation {
|
||||
const factory ReportInformation({
|
||||
HrInfo? hr,
|
||||
Casualties? casualties,
|
||||
Facilities? facilities,
|
||||
InputStatus? inputStatus,
|
||||
String? inspectionNotes,
|
||||
String? inspectionStatus,
|
||||
TechnicalOfficer? technicalOfficer,
|
||||
InfrastructureEnergy? infrastructureEnergy,
|
||||
GeneralConditionHall? generalConditionHall,
|
||||
}) = _ReportInformation;
|
||||
|
||||
factory ReportInformation.fromJson(Map<String, dynamic> json) =>
|
||||
_$ReportInformationFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class HrInfo with _$HrInfo {
|
||||
const factory HrInfo({
|
||||
bool? trained,
|
||||
String? contractStatus,
|
||||
num? numberEmployed,
|
||||
num? numberIndigenous,
|
||||
num? numberNonIndigenous,
|
||||
}) = _HrInfo;
|
||||
|
||||
factory HrInfo.fromJson(Map<String, dynamic> json) => _$HrInfoFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class Casualties with _$Casualties {
|
||||
const factory Casualties({
|
||||
List<String>? images,
|
||||
String? typeDisease,
|
||||
num? normalLosses,
|
||||
bool? samplingDone,
|
||||
String? typeSampling,
|
||||
num? abnormalLosses,
|
||||
String? sourceOfHatching,
|
||||
String? causeAbnormalLosses,
|
||||
}) = _Casualties;
|
||||
|
||||
factory Casualties.fromJson(Map<String, dynamic> json) =>
|
||||
_$CasualtiesFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class Facilities with _$Facilities {
|
||||
const factory Facilities({
|
||||
String? date,
|
||||
num? amount,
|
||||
bool? hasFacilities,
|
||||
String? repaymentStatus,
|
||||
String? typeOfFacility,
|
||||
String? requestFacilities,
|
||||
}) = _Facilities;
|
||||
|
||||
factory Facilities.fromJson(Map<String, dynamic> json) =>
|
||||
_$FacilitiesFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class InputStatus with _$InputStatus {
|
||||
const factory InputStatus({
|
||||
List<String>? images,
|
||||
String? gradeGrain,
|
||||
String? companyName,
|
||||
String? inputStatus,
|
||||
String? trackingCode,
|
||||
String? typeOfGrain,
|
||||
String? inventoryUntilVisit,
|
||||
String? inventoryInWarehouse,
|
||||
}) = _InputStatus;
|
||||
|
||||
factory InputStatus.fromJson(Map<String, dynamic> json) =>
|
||||
_$InputStatusFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class TechnicalOfficer with _$TechnicalOfficer {
|
||||
const factory TechnicalOfficer({
|
||||
String? technicalHealthOfficer,
|
||||
String? technicalEngineeringOfficer,
|
||||
}) = _TechnicalOfficer;
|
||||
|
||||
factory TechnicalOfficer.fromJson(Map<String, dynamic> json) =>
|
||||
_$TechnicalOfficerFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class InfrastructureEnergy with _$InfrastructureEnergy {
|
||||
const factory InfrastructureEnergy({
|
||||
String? fuelType,
|
||||
String? generatorType,
|
||||
String? powerCutHour,
|
||||
String? generatorCount,
|
||||
String? generatorModel,
|
||||
String? additionalNotes,
|
||||
String? generatorCapacity,
|
||||
String? powerCutDuration,
|
||||
String? generatorPerformance,
|
||||
bool? hasPowerCutHistory,
|
||||
String? emergencyFuelInventory,
|
||||
}) = _InfrastructureEnergy;
|
||||
|
||||
factory InfrastructureEnergy.fromJson(Map<String, dynamic> json) =>
|
||||
_$InfrastructureEnergyFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class GeneralConditionHall with _$GeneralConditionHall {
|
||||
const factory GeneralConditionHall({
|
||||
List<String>? images,
|
||||
String? temperature,
|
||||
String? bedCondition,
|
||||
String? healthStatus,
|
||||
String? ventilationStatus,
|
||||
String? drinkingWaterSource,
|
||||
String? drinkingWaterQuality,
|
||||
}) = _GeneralConditionHall;
|
||||
|
||||
factory GeneralConditionHall.fromJson(Map<String, dynamic> json) =>
|
||||
_$GeneralConditionHallFromJson(json);
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,339 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'poultry_science_report.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_PoultryScienceReport _$PoultryScienceReportFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _PoultryScienceReport(
|
||||
id: (json['id'] as num?)?.toInt(),
|
||||
poultryScience: json['poultry_science'] == null
|
||||
? null
|
||||
: PoultryScienceRef.fromJson(
|
||||
json['poultry_science'] as Map<String, dynamic>,
|
||||
),
|
||||
hatching: json['hatching'] == null
|
||||
? null
|
||||
: HatchingModel.fromJson(json['hatching'] as Map<String, dynamic>),
|
||||
user: json['user'] == null
|
||||
? null
|
||||
: UserRef.fromJson(json['user'] as Map<String, dynamic>),
|
||||
key: json['key'] as String?,
|
||||
createDate: json['create_date'] as String?,
|
||||
modifyDate: json['modify_date'] as String?,
|
||||
trash: json['trash'] as bool?,
|
||||
date: json['date'] as String?,
|
||||
image: json['image'] as String?,
|
||||
lat: json['lat'] as num?,
|
||||
log: json['log'] as num?,
|
||||
reporterFullname: json['reporter_fullname'] as String?,
|
||||
reporterMobile: json['reporter_mobile'] as String?,
|
||||
reporterRole: json['reporter_role'] as String?,
|
||||
state: json['state'] as String?,
|
||||
realQuantityAi: json['real_quantity_ai'] as num?,
|
||||
messageAi: json['message_ai'] as String?,
|
||||
realQuantity: json['real_quantity'] as num?,
|
||||
message: json['message'] as String?,
|
||||
messageRegistererFullname: json['message_registerer_fullname'] as String?,
|
||||
messageRegistererMobile: json['message_registerer_mobile'] as String?,
|
||||
messageRegistererRole: json['message_registerer_role'] as String?,
|
||||
reportInformation: json['report_information'] == null
|
||||
? null
|
||||
: ReportInformation.fromJson(
|
||||
json['report_information'] as Map<String, dynamic>,
|
||||
),
|
||||
createdBy: json['created_by'] as String?,
|
||||
modifiedBy: json['modified_by'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$PoultryScienceReportToJson(
|
||||
_PoultryScienceReport instance,
|
||||
) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'poultry_science': instance.poultryScience,
|
||||
'hatching': instance.hatching,
|
||||
'user': instance.user,
|
||||
'key': instance.key,
|
||||
'create_date': instance.createDate,
|
||||
'modify_date': instance.modifyDate,
|
||||
'trash': instance.trash,
|
||||
'date': instance.date,
|
||||
'image': instance.image,
|
||||
'lat': instance.lat,
|
||||
'log': instance.log,
|
||||
'reporter_fullname': instance.reporterFullname,
|
||||
'reporter_mobile': instance.reporterMobile,
|
||||
'reporter_role': instance.reporterRole,
|
||||
'state': instance.state,
|
||||
'real_quantity_ai': instance.realQuantityAi,
|
||||
'message_ai': instance.messageAi,
|
||||
'real_quantity': instance.realQuantity,
|
||||
'message': instance.message,
|
||||
'message_registerer_fullname': instance.messageRegistererFullname,
|
||||
'message_registerer_mobile': instance.messageRegistererMobile,
|
||||
'message_registerer_role': instance.messageRegistererRole,
|
||||
'report_information': instance.reportInformation,
|
||||
'created_by': instance.createdBy,
|
||||
'modified_by': instance.modifiedBy,
|
||||
};
|
||||
|
||||
_PoultryScienceRef _$PoultryScienceRefFromJson(Map<String, dynamic> json) =>
|
||||
_PoultryScienceRef(
|
||||
id: (json['id'] as num?)?.toInt(),
|
||||
user: json['user'] == null
|
||||
? null
|
||||
: UserWithCity.fromJson(json['user'] as Map<String, dynamic>),
|
||||
key: json['key'] as String?,
|
||||
createDate: json['create_date'] as String?,
|
||||
modifyDate: json['modify_date'] as String?,
|
||||
trash: json['trash'] as bool?,
|
||||
engineeringCode: json['engineering_code'] as String?,
|
||||
createdBy: json['created_by'] as String?,
|
||||
modifiedBy: json['modified_by'] as String?,
|
||||
poultry: (json['poultry'] as List<dynamic>?)
|
||||
?.map((e) => (e as num).toInt())
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$PoultryScienceRefToJson(_PoultryScienceRef instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'user': instance.user,
|
||||
'key': instance.key,
|
||||
'create_date': instance.createDate,
|
||||
'modify_date': instance.modifyDate,
|
||||
'trash': instance.trash,
|
||||
'engineering_code': instance.engineeringCode,
|
||||
'created_by': instance.createdBy,
|
||||
'modified_by': instance.modifiedBy,
|
||||
'poultry': instance.poultry,
|
||||
};
|
||||
|
||||
_UserRef _$UserRefFromJson(Map<String, dynamic> json) => _UserRef(
|
||||
fullname: json['fullname'] as String?,
|
||||
mobile: json['mobile'] as String?,
|
||||
city: json['city'] == null
|
||||
? null
|
||||
: CityRef.fromJson(json['city'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$UserRefToJson(_UserRef instance) => <String, dynamic>{
|
||||
'fullname': instance.fullname,
|
||||
'mobile': instance.mobile,
|
||||
'city': instance.city,
|
||||
};
|
||||
|
||||
_UserWithCity _$UserWithCityFromJson(Map<String, dynamic> json) =>
|
||||
_UserWithCity(
|
||||
fullname: json['fullname'] as String?,
|
||||
mobile: json['mobile'] as String?,
|
||||
city: json['city'] == null
|
||||
? null
|
||||
: CityRef.fromJson(json['city'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$UserWithCityToJson(_UserWithCity instance) =>
|
||||
<String, dynamic>{
|
||||
'fullname': instance.fullname,
|
||||
'mobile': instance.mobile,
|
||||
'city': instance.city,
|
||||
};
|
||||
|
||||
_ReportInformation _$ReportInformationFromJson(Map<String, dynamic> json) =>
|
||||
_ReportInformation(
|
||||
hr: json['hr'] == null
|
||||
? null
|
||||
: HrInfo.fromJson(json['hr'] as Map<String, dynamic>),
|
||||
casualties: json['casualties'] == null
|
||||
? null
|
||||
: Casualties.fromJson(json['casualties'] as Map<String, dynamic>),
|
||||
facilities: json['facilities'] == null
|
||||
? null
|
||||
: Facilities.fromJson(json['facilities'] as Map<String, dynamic>),
|
||||
inputStatus: json['input_status'] == null
|
||||
? null
|
||||
: InputStatus.fromJson(json['input_status'] as Map<String, dynamic>),
|
||||
inspectionNotes: json['inspection_notes'] as String?,
|
||||
inspectionStatus: json['inspection_status'] as String?,
|
||||
technicalOfficer: json['technical_officer'] == null
|
||||
? null
|
||||
: TechnicalOfficer.fromJson(
|
||||
json['technical_officer'] as Map<String, dynamic>,
|
||||
),
|
||||
infrastructureEnergy: json['infrastructure_energy'] == null
|
||||
? null
|
||||
: InfrastructureEnergy.fromJson(
|
||||
json['infrastructure_energy'] as Map<String, dynamic>,
|
||||
),
|
||||
generalConditionHall: json['general_condition_hall'] == null
|
||||
? null
|
||||
: GeneralConditionHall.fromJson(
|
||||
json['general_condition_hall'] as Map<String, dynamic>,
|
||||
),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ReportInformationToJson(_ReportInformation instance) =>
|
||||
<String, dynamic>{
|
||||
'hr': instance.hr,
|
||||
'casualties': instance.casualties,
|
||||
'facilities': instance.facilities,
|
||||
'input_status': instance.inputStatus,
|
||||
'inspection_notes': instance.inspectionNotes,
|
||||
'inspection_status': instance.inspectionStatus,
|
||||
'technical_officer': instance.technicalOfficer,
|
||||
'infrastructure_energy': instance.infrastructureEnergy,
|
||||
'general_condition_hall': instance.generalConditionHall,
|
||||
};
|
||||
|
||||
_HrInfo _$HrInfoFromJson(Map<String, dynamic> json) => _HrInfo(
|
||||
trained: json['trained'] as bool?,
|
||||
contractStatus: json['contract_status'] as String?,
|
||||
numberEmployed: json['number_employed'] as num?,
|
||||
numberIndigenous: json['number_indigenous'] as num?,
|
||||
numberNonIndigenous: json['number_non_indigenous'] as num?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$HrInfoToJson(_HrInfo instance) => <String, dynamic>{
|
||||
'trained': instance.trained,
|
||||
'contract_status': instance.contractStatus,
|
||||
'number_employed': instance.numberEmployed,
|
||||
'number_indigenous': instance.numberIndigenous,
|
||||
'number_non_indigenous': instance.numberNonIndigenous,
|
||||
};
|
||||
|
||||
_Casualties _$CasualtiesFromJson(Map<String, dynamic> json) => _Casualties(
|
||||
images: (json['images'] as List<dynamic>?)?.map((e) => e as String).toList(),
|
||||
typeDisease: json['type_disease'] as String?,
|
||||
normalLosses: json['normal_losses'] as num?,
|
||||
samplingDone: json['sampling_done'] as bool?,
|
||||
typeSampling: json['type_sampling'] as String?,
|
||||
abnormalLosses: json['abnormal_losses'] as num?,
|
||||
sourceOfHatching: json['source_of_hatching'] as String?,
|
||||
causeAbnormalLosses: json['cause_abnormal_losses'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$CasualtiesToJson(_Casualties instance) =>
|
||||
<String, dynamic>{
|
||||
'images': instance.images,
|
||||
'type_disease': instance.typeDisease,
|
||||
'normal_losses': instance.normalLosses,
|
||||
'sampling_done': instance.samplingDone,
|
||||
'type_sampling': instance.typeSampling,
|
||||
'abnormal_losses': instance.abnormalLosses,
|
||||
'source_of_hatching': instance.sourceOfHatching,
|
||||
'cause_abnormal_losses': instance.causeAbnormalLosses,
|
||||
};
|
||||
|
||||
_Facilities _$FacilitiesFromJson(Map<String, dynamic> json) => _Facilities(
|
||||
date: json['date'] as String?,
|
||||
amount: json['amount'] as num?,
|
||||
hasFacilities: json['has_facilities'] as bool?,
|
||||
repaymentStatus: json['repayment_status'] as String?,
|
||||
typeOfFacility: json['type_of_facility'] as String?,
|
||||
requestFacilities: json['request_facilities'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$FacilitiesToJson(_Facilities instance) =>
|
||||
<String, dynamic>{
|
||||
'date': instance.date,
|
||||
'amount': instance.amount,
|
||||
'has_facilities': instance.hasFacilities,
|
||||
'repayment_status': instance.repaymentStatus,
|
||||
'type_of_facility': instance.typeOfFacility,
|
||||
'request_facilities': instance.requestFacilities,
|
||||
};
|
||||
|
||||
_InputStatus _$InputStatusFromJson(Map<String, dynamic> json) => _InputStatus(
|
||||
images: (json['images'] as List<dynamic>?)?.map((e) => e as String).toList(),
|
||||
gradeGrain: json['grade_grain'] as String?,
|
||||
companyName: json['company_name'] as String?,
|
||||
inputStatus: json['input_status'] as String?,
|
||||
trackingCode: json['tracking_code'] as String?,
|
||||
typeOfGrain: json['type_of_grain'] as String?,
|
||||
inventoryUntilVisit: json['inventory_until_visit'] as String?,
|
||||
inventoryInWarehouse: json['inventory_in_warehouse'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$InputStatusToJson(_InputStatus instance) =>
|
||||
<String, dynamic>{
|
||||
'images': instance.images,
|
||||
'grade_grain': instance.gradeGrain,
|
||||
'company_name': instance.companyName,
|
||||
'input_status': instance.inputStatus,
|
||||
'tracking_code': instance.trackingCode,
|
||||
'type_of_grain': instance.typeOfGrain,
|
||||
'inventory_until_visit': instance.inventoryUntilVisit,
|
||||
'inventory_in_warehouse': instance.inventoryInWarehouse,
|
||||
};
|
||||
|
||||
_TechnicalOfficer _$TechnicalOfficerFromJson(Map<String, dynamic> json) =>
|
||||
_TechnicalOfficer(
|
||||
technicalHealthOfficer: json['technical_health_officer'] as String?,
|
||||
technicalEngineeringOfficer:
|
||||
json['technical_engineering_officer'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$TechnicalOfficerToJson(_TechnicalOfficer instance) =>
|
||||
<String, dynamic>{
|
||||
'technical_health_officer': instance.technicalHealthOfficer,
|
||||
'technical_engineering_officer': instance.technicalEngineeringOfficer,
|
||||
};
|
||||
|
||||
_InfrastructureEnergy _$InfrastructureEnergyFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _InfrastructureEnergy(
|
||||
fuelType: json['fuel_type'] as String?,
|
||||
generatorType: json['generator_type'] as String?,
|
||||
powerCutHour: json['power_cut_hour'] as String?,
|
||||
generatorCount: json['generator_count'] as String?,
|
||||
generatorModel: json['generator_model'] as String?,
|
||||
additionalNotes: json['additional_notes'] as String?,
|
||||
generatorCapacity: json['generator_capacity'] as String?,
|
||||
powerCutDuration: json['power_cut_duration'] as String?,
|
||||
generatorPerformance: json['generator_performance'] as String?,
|
||||
hasPowerCutHistory: json['has_power_cut_history'] as bool?,
|
||||
emergencyFuelInventory: json['emergency_fuel_inventory'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$InfrastructureEnergyToJson(
|
||||
_InfrastructureEnergy instance,
|
||||
) => <String, dynamic>{
|
||||
'fuel_type': instance.fuelType,
|
||||
'generator_type': instance.generatorType,
|
||||
'power_cut_hour': instance.powerCutHour,
|
||||
'generator_count': instance.generatorCount,
|
||||
'generator_model': instance.generatorModel,
|
||||
'additional_notes': instance.additionalNotes,
|
||||
'generator_capacity': instance.generatorCapacity,
|
||||
'power_cut_duration': instance.powerCutDuration,
|
||||
'generator_performance': instance.generatorPerformance,
|
||||
'has_power_cut_history': instance.hasPowerCutHistory,
|
||||
'emergency_fuel_inventory': instance.emergencyFuelInventory,
|
||||
};
|
||||
|
||||
_GeneralConditionHall _$GeneralConditionHallFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _GeneralConditionHall(
|
||||
images: (json['images'] as List<dynamic>?)?.map((e) => e as String).toList(),
|
||||
temperature: json['temperature'] as String?,
|
||||
bedCondition: json['bed_condition'] as String?,
|
||||
healthStatus: json['health_status'] as String?,
|
||||
ventilationStatus: json['ventilation_status'] as String?,
|
||||
drinkingWaterSource: json['drinking_water_source'] as String?,
|
||||
drinkingWaterQuality: json['drinking_water_quality'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$GeneralConditionHallToJson(
|
||||
_GeneralConditionHall instance,
|
||||
) => <String, dynamic>{
|
||||
'images': instance.images,
|
||||
'temperature': instance.temperature,
|
||||
'bed_condition': instance.bedCondition,
|
||||
'health_status': instance.healthStatus,
|
||||
'ventilation_status': instance.ventilationStatus,
|
||||
'drinking_water_source': instance.drinkingWaterSource,
|
||||
'drinking_water_quality': instance.drinkingWaterQuality,
|
||||
};
|
||||
Reference in New Issue
Block a user