refactor : rename files and update routes for poultry actions
feat : poultry kill registration and poultry OrderList ** Made With Nima **
This commit is contained in:
@@ -152,8 +152,7 @@ Map<String, String?> getFaUserRoleWithOnTap(String? role) {
|
||||
case "Steward":
|
||||
return {"مباشر": ChickenRoutes.initSteward};
|
||||
case "PoultryScience":
|
||||
return {"کارشناس طیور": ChickenRoutes.initPoultryScience
|
||||
};
|
||||
return {"کارشناس طیور": ChickenRoutes.initPoultryScience};
|
||||
default:
|
||||
return {"نامشخص": null};
|
||||
}
|
||||
|
||||
@@ -44,10 +44,7 @@ class ChickenLocalDataSourceImp implements ChickenLocalDataSource {
|
||||
path: ChickenRoutes.buysInProvinceSteward,
|
||||
),
|
||||
];
|
||||
await local.add(
|
||||
boxName: boxName,
|
||||
value: WidelyUsedLocalModel(hasInit: true, items: tmpList),
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@@ -1,7 +1,16 @@
|
||||
import 'package:rasadyar_chicken/data/models/poultry_export/poultry_export.dart';
|
||||
import 'package:rasadyar_chicken/data/models/request/kill_registration/kill_registration.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/all_poultry/all_poultry.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/approved_price/approved_price.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/kill_house_poultry/kill_house_poultry.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/kill_request_poultry/kill_request_poultry.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/poultry_farm/poultry_farm.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/poultry_hatching/poultry_hatching.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/poultry_order/poultry_order.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/poultry_science/home_poultry_science/home_poultry_science_model.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/sell_for_freezing/sell_for_freezing.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
abstract class PoultryScienceRemoteDatasource {
|
||||
@@ -30,4 +39,51 @@ abstract class PoultryScienceRemoteDatasource {
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<ApprovedPrice?> getApprovedPrice({ required String token,
|
||||
Map<String, dynamic>? queryParameters,});
|
||||
|
||||
Future<List<AllPoultry>?> getAllPoultry({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
|
||||
Future<SellForFreezing?> getSellForFreezing({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
|
||||
Future<PoultryExport?> getPoultryExport({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
|
||||
Future<List<KillRequestPoultry>?> getUserPoultry({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<List<PoultryHatching>?> getPoultryHatching({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<List<KillHousePoultry>?> getKillHouseList({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<void> submitKillRegistration({
|
||||
required String token,
|
||||
required KillRegistrationRequest request,
|
||||
});
|
||||
|
||||
|
||||
Future<PaginationModel<PoultryOrder>?> getPoultryOderList({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,7 +1,16 @@
|
||||
import 'package:rasadyar_chicken/data/models/poultry_export/poultry_export.dart';
|
||||
import 'package:rasadyar_chicken/data/models/request/kill_registration/kill_registration.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/all_poultry/all_poultry.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/approved_price/approved_price.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/kill_house_poultry/kill_house_poultry.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/kill_request_poultry/kill_request_poultry.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/poultry_farm/poultry_farm.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/poultry_hatching/poultry_hatching.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/poultry_order/poultry_order.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/poultry_science/home_poultry_science/home_poultry_science_model.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/sell_for_freezing/sell_for_freezing.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
import 'poultry_science_remote.dart';
|
||||
@@ -78,7 +87,7 @@ class PoultryScienceRemoteDatasourceImp implements PoultryScienceRemoteDatasourc
|
||||
Future<PaginationModel<PoultryFarm>?> getPoultryScienceFarmList({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async{
|
||||
}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/poultry_and_hatching_for_poultry_science/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
@@ -90,4 +99,138 @@ class PoultryScienceRemoteDatasourceImp implements PoultryScienceRemoteDatasourc
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
//region kill Registration
|
||||
@override
|
||||
Future<ApprovedPrice?> getApprovedPrice({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/approved-price/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
queryParameters: queryParameters,
|
||||
fromJson: (json) => ApprovedPrice.fromJson(json),
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<List<AllPoultry>?> getAllPoultry({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/get-all-poultry/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
queryParameters: queryParameters,
|
||||
fromJsonList: (json) =>
|
||||
json.map((e) => AllPoultry.fromJson(e as Map<String, dynamic>)).toList(),
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<PoultryExport?> getPoultryExport({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/poultry-export/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
queryParameters: queryParameters,
|
||||
fromJson: (json) => PoultryExport.fromJson(json),
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<SellForFreezing?> getSellForFreezing({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/sell-for-freezing/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
queryParameters: queryParameters,
|
||||
fromJson: (json) => SellForFreezing.fromJson(json),
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<List<KillRequestPoultry>?> getUserPoultry({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/Poultry/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
queryParameters: queryParameters,
|
||||
fromJsonList: (json) => json.map((e) => KillRequestPoultry.fromJson(e)).toList(),
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<List<PoultryHatching>?> getPoultryHatching({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/poultry_hatching/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
queryParameters: queryParameters,
|
||||
fromJsonList: (json) => json.map((e) => PoultryHatching.fromJson(e)).toList(),
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<List<KillHousePoultry>?> getKillHouseList({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/kill_house_list/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
queryParameters: queryParameters,
|
||||
fromJsonList: (json) => json.map((e) => KillHousePoultry.fromJson(e)).toList(),
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> submitKillRegistration({
|
||||
required String token,
|
||||
required KillRegistrationRequest request,
|
||||
}) async {
|
||||
await _httpClient.post(
|
||||
'/Poultry_Request/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
data: request.toJson(),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<PaginationModel<PoultryOrder>?> getPoultryOderList({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/Poultry_Request/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
queryParameters: queryParameters,
|
||||
fromJson: (json) => PaginationModel<PoultryOrder>.fromJson(
|
||||
json,
|
||||
(data) => PoultryOrder.fromJson(data as Map<String, dynamic>),
|
||||
),
|
||||
);
|
||||
dLog(res.data.runtimeType);
|
||||
|
||||
return res.data;
|
||||
}
|
||||
|
||||
|
||||
//endregion
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
part 'poultry_export.freezed.dart';
|
||||
part 'poultry_export.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class PoultryExport with _$PoultryExport {
|
||||
const factory PoultryExport({
|
||||
String? key,
|
||||
bool? allow,
|
||||
bool? limitationStatus,
|
||||
double? limitation,
|
||||
}) = _PoultryExport;
|
||||
|
||||
factory PoultryExport.fromJson(Map<String, dynamic> json) =>
|
||||
_$PoultryExportFromJson(json);
|
||||
}
|
||||
@@ -0,0 +1,286 @@
|
||||
// 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_export.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$PoultryExport {
|
||||
|
||||
String? get key; bool? get allow; bool? get limitationStatus; double? get limitation;
|
||||
/// Create a copy of PoultryExport
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$PoultryExportCopyWith<PoultryExport> get copyWith => _$PoultryExportCopyWithImpl<PoultryExport>(this as PoultryExport, _$identity);
|
||||
|
||||
/// Serializes this PoultryExport to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is PoultryExport&&(identical(other.key, key) || other.key == key)&&(identical(other.allow, allow) || other.allow == allow)&&(identical(other.limitationStatus, limitationStatus) || other.limitationStatus == limitationStatus)&&(identical(other.limitation, limitation) || other.limitation == limitation));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,key,allow,limitationStatus,limitation);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'PoultryExport(key: $key, allow: $allow, limitationStatus: $limitationStatus, limitation: $limitation)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $PoultryExportCopyWith<$Res> {
|
||||
factory $PoultryExportCopyWith(PoultryExport value, $Res Function(PoultryExport) _then) = _$PoultryExportCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String? key, bool? allow, bool? limitationStatus, double? limitation
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$PoultryExportCopyWithImpl<$Res>
|
||||
implements $PoultryExportCopyWith<$Res> {
|
||||
_$PoultryExportCopyWithImpl(this._self, this._then);
|
||||
|
||||
final PoultryExport _self;
|
||||
final $Res Function(PoultryExport) _then;
|
||||
|
||||
/// Create a copy of PoultryExport
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? key = freezed,Object? allow = freezed,Object? limitationStatus = freezed,Object? limitation = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
|
||||
as String?,allow: freezed == allow ? _self.allow : allow // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,limitationStatus: freezed == limitationStatus ? _self.limitationStatus : limitationStatus // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,limitation: freezed == limitation ? _self.limitation : limitation // ignore: cast_nullable_to_non_nullable
|
||||
as double?,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [PoultryExport].
|
||||
extension PoultryExportPatterns on PoultryExport {
|
||||
/// 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 extends Object?>(TResult Function( _PoultryExport value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _PoultryExport() 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 extends Object?>(TResult Function( _PoultryExport value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _PoultryExport():
|
||||
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 extends Object?>(TResult? Function( _PoultryExport value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _PoultryExport() 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 extends Object?>(TResult Function( String? key, bool? allow, bool? limitationStatus, double? limitation)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _PoultryExport() when $default != null:
|
||||
return $default(_that.key,_that.allow,_that.limitationStatus,_that.limitation);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 extends Object?>(TResult Function( String? key, bool? allow, bool? limitationStatus, double? limitation) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _PoultryExport():
|
||||
return $default(_that.key,_that.allow,_that.limitationStatus,_that.limitation);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 extends Object?>(TResult? Function( String? key, bool? allow, bool? limitationStatus, double? limitation)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _PoultryExport() when $default != null:
|
||||
return $default(_that.key,_that.allow,_that.limitationStatus,_that.limitation);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _PoultryExport implements PoultryExport {
|
||||
const _PoultryExport({this.key, this.allow, this.limitationStatus, this.limitation});
|
||||
factory _PoultryExport.fromJson(Map<String, dynamic> json) => _$PoultryExportFromJson(json);
|
||||
|
||||
@override final String? key;
|
||||
@override final bool? allow;
|
||||
@override final bool? limitationStatus;
|
||||
@override final double? limitation;
|
||||
|
||||
/// Create a copy of PoultryExport
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$PoultryExportCopyWith<_PoultryExport> get copyWith => __$PoultryExportCopyWithImpl<_PoultryExport>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$PoultryExportToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _PoultryExport&&(identical(other.key, key) || other.key == key)&&(identical(other.allow, allow) || other.allow == allow)&&(identical(other.limitationStatus, limitationStatus) || other.limitationStatus == limitationStatus)&&(identical(other.limitation, limitation) || other.limitation == limitation));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,key,allow,limitationStatus,limitation);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'PoultryExport(key: $key, allow: $allow, limitationStatus: $limitationStatus, limitation: $limitation)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$PoultryExportCopyWith<$Res> implements $PoultryExportCopyWith<$Res> {
|
||||
factory _$PoultryExportCopyWith(_PoultryExport value, $Res Function(_PoultryExport) _then) = __$PoultryExportCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String? key, bool? allow, bool? limitationStatus, double? limitation
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$PoultryExportCopyWithImpl<$Res>
|
||||
implements _$PoultryExportCopyWith<$Res> {
|
||||
__$PoultryExportCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _PoultryExport _self;
|
||||
final $Res Function(_PoultryExport) _then;
|
||||
|
||||
/// Create a copy of PoultryExport
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? key = freezed,Object? allow = freezed,Object? limitationStatus = freezed,Object? limitation = freezed,}) {
|
||||
return _then(_PoultryExport(
|
||||
key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
|
||||
as String?,allow: freezed == allow ? _self.allow : allow // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,limitationStatus: freezed == limitationStatus ? _self.limitationStatus : limitationStatus // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,limitation: freezed == limitation ? _self.limitation : limitation // ignore: cast_nullable_to_non_nullable
|
||||
as double?,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
@@ -0,0 +1,23 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'poultry_export.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_PoultryExport _$PoultryExportFromJson(Map<String, dynamic> json) =>
|
||||
_PoultryExport(
|
||||
key: json['key'] as String?,
|
||||
allow: json['allow'] as bool?,
|
||||
limitationStatus: json['limitation_status'] as bool?,
|
||||
limitation: (json['limitation'] as num?)?.toDouble(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$PoultryExportToJson(_PoultryExport instance) =>
|
||||
<String, dynamic>{
|
||||
'key': instance.key,
|
||||
'allow': instance.allow,
|
||||
'limitation_status': instance.limitationStatus,
|
||||
'limitation': instance.limitation,
|
||||
};
|
||||
@@ -0,0 +1,35 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'kill_registration.freezed.dart';
|
||||
part 'kill_registration.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class KillRegistrationRequest with _$KillRegistrationRequest {
|
||||
const factory KillRegistrationRequest({
|
||||
bool? approvedPrice,
|
||||
bool? market,
|
||||
String? killReqKey,
|
||||
String? operatorKey,
|
||||
String? poultryHatchingKey,
|
||||
int? quantity,
|
||||
String? sendDate,
|
||||
String? chickenBreed,
|
||||
@JsonKey(name: "Index_weight") double? indexWeight,
|
||||
String? losses,
|
||||
List<dynamic>? auctionList,
|
||||
bool? freezing,
|
||||
bool? export,
|
||||
bool? cash,
|
||||
bool? credit,
|
||||
List<dynamic>? killHouseList,
|
||||
String? role,
|
||||
String? poultryKey,
|
||||
int? amount,
|
||||
String? financialOperation,
|
||||
bool? freeSaleInProvince,
|
||||
String? confirmPoultryMobile,
|
||||
}) = _KillRegistrationRequest;
|
||||
|
||||
factory KillRegistrationRequest.fromJson(Map<String, dynamic> json) =>
|
||||
_$KillRegistrationRequestFromJson(json);
|
||||
}
|
||||
@@ -0,0 +1,356 @@
|
||||
// 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 'kill_registration.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$KillRegistrationRequest {
|
||||
|
||||
bool? get approvedPrice; bool? get market; String? get killReqKey; String? get operatorKey; String? get poultryHatchingKey; int? get quantity; String? get sendDate; String? get chickenBreed;@JsonKey(name: "Index_weight") double? get indexWeight; String? get losses; List<dynamic>? get auctionList; bool? get freezing; bool? get export; bool? get cash; bool? get credit; List<dynamic>? get killHouseList; String? get role; String? get poultryKey; int? get amount; String? get financialOperation; bool? get freeSaleInProvince; String? get confirmPoultryMobile;
|
||||
/// Create a copy of KillRegistrationRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$KillRegistrationRequestCopyWith<KillRegistrationRequest> get copyWith => _$KillRegistrationRequestCopyWithImpl<KillRegistrationRequest>(this as KillRegistrationRequest, _$identity);
|
||||
|
||||
/// Serializes this KillRegistrationRequest to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is KillRegistrationRequest&&(identical(other.approvedPrice, approvedPrice) || other.approvedPrice == approvedPrice)&&(identical(other.market, market) || other.market == market)&&(identical(other.killReqKey, killReqKey) || other.killReqKey == killReqKey)&&(identical(other.operatorKey, operatorKey) || other.operatorKey == operatorKey)&&(identical(other.poultryHatchingKey, poultryHatchingKey) || other.poultryHatchingKey == poultryHatchingKey)&&(identical(other.quantity, quantity) || other.quantity == quantity)&&(identical(other.sendDate, sendDate) || other.sendDate == sendDate)&&(identical(other.chickenBreed, chickenBreed) || other.chickenBreed == chickenBreed)&&(identical(other.indexWeight, indexWeight) || other.indexWeight == indexWeight)&&(identical(other.losses, losses) || other.losses == losses)&&const DeepCollectionEquality().equals(other.auctionList, auctionList)&&(identical(other.freezing, freezing) || other.freezing == freezing)&&(identical(other.export, export) || other.export == export)&&(identical(other.cash, cash) || other.cash == cash)&&(identical(other.credit, credit) || other.credit == credit)&&const DeepCollectionEquality().equals(other.killHouseList, killHouseList)&&(identical(other.role, role) || other.role == role)&&(identical(other.poultryKey, poultryKey) || other.poultryKey == poultryKey)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.financialOperation, financialOperation) || other.financialOperation == financialOperation)&&(identical(other.freeSaleInProvince, freeSaleInProvince) || other.freeSaleInProvince == freeSaleInProvince)&&(identical(other.confirmPoultryMobile, confirmPoultryMobile) || other.confirmPoultryMobile == confirmPoultryMobile));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hashAll([runtimeType,approvedPrice,market,killReqKey,operatorKey,poultryHatchingKey,quantity,sendDate,chickenBreed,indexWeight,losses,const DeepCollectionEquality().hash(auctionList),freezing,export,cash,credit,const DeepCollectionEquality().hash(killHouseList),role,poultryKey,amount,financialOperation,freeSaleInProvince,confirmPoultryMobile]);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'KillRegistrationRequest(approvedPrice: $approvedPrice, market: $market, killReqKey: $killReqKey, operatorKey: $operatorKey, poultryHatchingKey: $poultryHatchingKey, quantity: $quantity, sendDate: $sendDate, chickenBreed: $chickenBreed, indexWeight: $indexWeight, losses: $losses, auctionList: $auctionList, freezing: $freezing, export: $export, cash: $cash, credit: $credit, killHouseList: $killHouseList, role: $role, poultryKey: $poultryKey, amount: $amount, financialOperation: $financialOperation, freeSaleInProvince: $freeSaleInProvince, confirmPoultryMobile: $confirmPoultryMobile)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $KillRegistrationRequestCopyWith<$Res> {
|
||||
factory $KillRegistrationRequestCopyWith(KillRegistrationRequest value, $Res Function(KillRegistrationRequest) _then) = _$KillRegistrationRequestCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
bool? approvedPrice, bool? market, String? killReqKey, String? operatorKey, String? poultryHatchingKey, int? quantity, String? sendDate, String? chickenBreed,@JsonKey(name: "Index_weight") double? indexWeight, String? losses, List<dynamic>? auctionList, bool? freezing, bool? export, bool? cash, bool? credit, List<dynamic>? killHouseList, String? role, String? poultryKey, int? amount, String? financialOperation, bool? freeSaleInProvince, String? confirmPoultryMobile
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$KillRegistrationRequestCopyWithImpl<$Res>
|
||||
implements $KillRegistrationRequestCopyWith<$Res> {
|
||||
_$KillRegistrationRequestCopyWithImpl(this._self, this._then);
|
||||
|
||||
final KillRegistrationRequest _self;
|
||||
final $Res Function(KillRegistrationRequest) _then;
|
||||
|
||||
/// Create a copy of KillRegistrationRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? approvedPrice = freezed,Object? market = freezed,Object? killReqKey = freezed,Object? operatorKey = freezed,Object? poultryHatchingKey = freezed,Object? quantity = freezed,Object? sendDate = freezed,Object? chickenBreed = freezed,Object? indexWeight = freezed,Object? losses = freezed,Object? auctionList = freezed,Object? freezing = freezed,Object? export = freezed,Object? cash = freezed,Object? credit = freezed,Object? killHouseList = freezed,Object? role = freezed,Object? poultryKey = freezed,Object? amount = freezed,Object? financialOperation = freezed,Object? freeSaleInProvince = freezed,Object? confirmPoultryMobile = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
approvedPrice: freezed == approvedPrice ? _self.approvedPrice : approvedPrice // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,market: freezed == market ? _self.market : market // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,killReqKey: freezed == killReqKey ? _self.killReqKey : killReqKey // ignore: cast_nullable_to_non_nullable
|
||||
as String?,operatorKey: freezed == operatorKey ? _self.operatorKey : operatorKey // ignore: cast_nullable_to_non_nullable
|
||||
as String?,poultryHatchingKey: freezed == poultryHatchingKey ? _self.poultryHatchingKey : poultryHatchingKey // ignore: cast_nullable_to_non_nullable
|
||||
as String?,quantity: freezed == quantity ? _self.quantity : quantity // ignore: cast_nullable_to_non_nullable
|
||||
as int?,sendDate: freezed == sendDate ? _self.sendDate : sendDate // ignore: cast_nullable_to_non_nullable
|
||||
as String?,chickenBreed: freezed == chickenBreed ? _self.chickenBreed : chickenBreed // ignore: cast_nullable_to_non_nullable
|
||||
as String?,indexWeight: freezed == indexWeight ? _self.indexWeight : indexWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,losses: freezed == losses ? _self.losses : losses // ignore: cast_nullable_to_non_nullable
|
||||
as String?,auctionList: freezed == auctionList ? _self.auctionList : auctionList // ignore: cast_nullable_to_non_nullable
|
||||
as List<dynamic>?,freezing: freezed == freezing ? _self.freezing : freezing // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,export: freezed == export ? _self.export : export // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,cash: freezed == cash ? _self.cash : cash // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,credit: freezed == credit ? _self.credit : credit // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,killHouseList: freezed == killHouseList ? _self.killHouseList : killHouseList // ignore: cast_nullable_to_non_nullable
|
||||
as List<dynamic>?,role: freezed == role ? _self.role : role // ignore: cast_nullable_to_non_nullable
|
||||
as String?,poultryKey: freezed == poultryKey ? _self.poultryKey : poultryKey // ignore: cast_nullable_to_non_nullable
|
||||
as String?,amount: freezed == amount ? _self.amount : amount // ignore: cast_nullable_to_non_nullable
|
||||
as int?,financialOperation: freezed == financialOperation ? _self.financialOperation : financialOperation // ignore: cast_nullable_to_non_nullable
|
||||
as String?,freeSaleInProvince: freezed == freeSaleInProvince ? _self.freeSaleInProvince : freeSaleInProvince // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,confirmPoultryMobile: freezed == confirmPoultryMobile ? _self.confirmPoultryMobile : confirmPoultryMobile // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [KillRegistrationRequest].
|
||||
extension KillRegistrationRequestPatterns on KillRegistrationRequest {
|
||||
/// 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 extends Object?>(TResult Function( _KillRegistrationRequest value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _KillRegistrationRequest() 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 extends Object?>(TResult Function( _KillRegistrationRequest value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _KillRegistrationRequest():
|
||||
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 extends Object?>(TResult? Function( _KillRegistrationRequest value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _KillRegistrationRequest() 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 extends Object?>(TResult Function( bool? approvedPrice, bool? market, String? killReqKey, String? operatorKey, String? poultryHatchingKey, int? quantity, String? sendDate, String? chickenBreed, @JsonKey(name: "Index_weight") double? indexWeight, String? losses, List<dynamic>? auctionList, bool? freezing, bool? export, bool? cash, bool? credit, List<dynamic>? killHouseList, String? role, String? poultryKey, int? amount, String? financialOperation, bool? freeSaleInProvince, String? confirmPoultryMobile)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _KillRegistrationRequest() when $default != null:
|
||||
return $default(_that.approvedPrice,_that.market,_that.killReqKey,_that.operatorKey,_that.poultryHatchingKey,_that.quantity,_that.sendDate,_that.chickenBreed,_that.indexWeight,_that.losses,_that.auctionList,_that.freezing,_that.export,_that.cash,_that.credit,_that.killHouseList,_that.role,_that.poultryKey,_that.amount,_that.financialOperation,_that.freeSaleInProvince,_that.confirmPoultryMobile);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 extends Object?>(TResult Function( bool? approvedPrice, bool? market, String? killReqKey, String? operatorKey, String? poultryHatchingKey, int? quantity, String? sendDate, String? chickenBreed, @JsonKey(name: "Index_weight") double? indexWeight, String? losses, List<dynamic>? auctionList, bool? freezing, bool? export, bool? cash, bool? credit, List<dynamic>? killHouseList, String? role, String? poultryKey, int? amount, String? financialOperation, bool? freeSaleInProvince, String? confirmPoultryMobile) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _KillRegistrationRequest():
|
||||
return $default(_that.approvedPrice,_that.market,_that.killReqKey,_that.operatorKey,_that.poultryHatchingKey,_that.quantity,_that.sendDate,_that.chickenBreed,_that.indexWeight,_that.losses,_that.auctionList,_that.freezing,_that.export,_that.cash,_that.credit,_that.killHouseList,_that.role,_that.poultryKey,_that.amount,_that.financialOperation,_that.freeSaleInProvince,_that.confirmPoultryMobile);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 extends Object?>(TResult? Function( bool? approvedPrice, bool? market, String? killReqKey, String? operatorKey, String? poultryHatchingKey, int? quantity, String? sendDate, String? chickenBreed, @JsonKey(name: "Index_weight") double? indexWeight, String? losses, List<dynamic>? auctionList, bool? freezing, bool? export, bool? cash, bool? credit, List<dynamic>? killHouseList, String? role, String? poultryKey, int? amount, String? financialOperation, bool? freeSaleInProvince, String? confirmPoultryMobile)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _KillRegistrationRequest() when $default != null:
|
||||
return $default(_that.approvedPrice,_that.market,_that.killReqKey,_that.operatorKey,_that.poultryHatchingKey,_that.quantity,_that.sendDate,_that.chickenBreed,_that.indexWeight,_that.losses,_that.auctionList,_that.freezing,_that.export,_that.cash,_that.credit,_that.killHouseList,_that.role,_that.poultryKey,_that.amount,_that.financialOperation,_that.freeSaleInProvince,_that.confirmPoultryMobile);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _KillRegistrationRequest implements KillRegistrationRequest {
|
||||
const _KillRegistrationRequest({this.approvedPrice, this.market, this.killReqKey, this.operatorKey, this.poultryHatchingKey, this.quantity, this.sendDate, this.chickenBreed, @JsonKey(name: "Index_weight") this.indexWeight, this.losses, final List<dynamic>? auctionList, this.freezing, this.export, this.cash, this.credit, final List<dynamic>? killHouseList, this.role, this.poultryKey, this.amount, this.financialOperation, this.freeSaleInProvince, this.confirmPoultryMobile}): _auctionList = auctionList,_killHouseList = killHouseList;
|
||||
factory _KillRegistrationRequest.fromJson(Map<String, dynamic> json) => _$KillRegistrationRequestFromJson(json);
|
||||
|
||||
@override final bool? approvedPrice;
|
||||
@override final bool? market;
|
||||
@override final String? killReqKey;
|
||||
@override final String? operatorKey;
|
||||
@override final String? poultryHatchingKey;
|
||||
@override final int? quantity;
|
||||
@override final String? sendDate;
|
||||
@override final String? chickenBreed;
|
||||
@override@JsonKey(name: "Index_weight") final double? indexWeight;
|
||||
@override final String? losses;
|
||||
final List<dynamic>? _auctionList;
|
||||
@override List<dynamic>? get auctionList {
|
||||
final value = _auctionList;
|
||||
if (value == null) return null;
|
||||
if (_auctionList is EqualUnmodifiableListView) return _auctionList;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(value);
|
||||
}
|
||||
|
||||
@override final bool? freezing;
|
||||
@override final bool? export;
|
||||
@override final bool? cash;
|
||||
@override final bool? credit;
|
||||
final List<dynamic>? _killHouseList;
|
||||
@override List<dynamic>? get killHouseList {
|
||||
final value = _killHouseList;
|
||||
if (value == null) return null;
|
||||
if (_killHouseList is EqualUnmodifiableListView) return _killHouseList;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(value);
|
||||
}
|
||||
|
||||
@override final String? role;
|
||||
@override final String? poultryKey;
|
||||
@override final int? amount;
|
||||
@override final String? financialOperation;
|
||||
@override final bool? freeSaleInProvince;
|
||||
@override final String? confirmPoultryMobile;
|
||||
|
||||
/// Create a copy of KillRegistrationRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$KillRegistrationRequestCopyWith<_KillRegistrationRequest> get copyWith => __$KillRegistrationRequestCopyWithImpl<_KillRegistrationRequest>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$KillRegistrationRequestToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _KillRegistrationRequest&&(identical(other.approvedPrice, approvedPrice) || other.approvedPrice == approvedPrice)&&(identical(other.market, market) || other.market == market)&&(identical(other.killReqKey, killReqKey) || other.killReqKey == killReqKey)&&(identical(other.operatorKey, operatorKey) || other.operatorKey == operatorKey)&&(identical(other.poultryHatchingKey, poultryHatchingKey) || other.poultryHatchingKey == poultryHatchingKey)&&(identical(other.quantity, quantity) || other.quantity == quantity)&&(identical(other.sendDate, sendDate) || other.sendDate == sendDate)&&(identical(other.chickenBreed, chickenBreed) || other.chickenBreed == chickenBreed)&&(identical(other.indexWeight, indexWeight) || other.indexWeight == indexWeight)&&(identical(other.losses, losses) || other.losses == losses)&&const DeepCollectionEquality().equals(other._auctionList, _auctionList)&&(identical(other.freezing, freezing) || other.freezing == freezing)&&(identical(other.export, export) || other.export == export)&&(identical(other.cash, cash) || other.cash == cash)&&(identical(other.credit, credit) || other.credit == credit)&&const DeepCollectionEquality().equals(other._killHouseList, _killHouseList)&&(identical(other.role, role) || other.role == role)&&(identical(other.poultryKey, poultryKey) || other.poultryKey == poultryKey)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.financialOperation, financialOperation) || other.financialOperation == financialOperation)&&(identical(other.freeSaleInProvince, freeSaleInProvince) || other.freeSaleInProvince == freeSaleInProvince)&&(identical(other.confirmPoultryMobile, confirmPoultryMobile) || other.confirmPoultryMobile == confirmPoultryMobile));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hashAll([runtimeType,approvedPrice,market,killReqKey,operatorKey,poultryHatchingKey,quantity,sendDate,chickenBreed,indexWeight,losses,const DeepCollectionEquality().hash(_auctionList),freezing,export,cash,credit,const DeepCollectionEquality().hash(_killHouseList),role,poultryKey,amount,financialOperation,freeSaleInProvince,confirmPoultryMobile]);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'KillRegistrationRequest(approvedPrice: $approvedPrice, market: $market, killReqKey: $killReqKey, operatorKey: $operatorKey, poultryHatchingKey: $poultryHatchingKey, quantity: $quantity, sendDate: $sendDate, chickenBreed: $chickenBreed, indexWeight: $indexWeight, losses: $losses, auctionList: $auctionList, freezing: $freezing, export: $export, cash: $cash, credit: $credit, killHouseList: $killHouseList, role: $role, poultryKey: $poultryKey, amount: $amount, financialOperation: $financialOperation, freeSaleInProvince: $freeSaleInProvince, confirmPoultryMobile: $confirmPoultryMobile)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$KillRegistrationRequestCopyWith<$Res> implements $KillRegistrationRequestCopyWith<$Res> {
|
||||
factory _$KillRegistrationRequestCopyWith(_KillRegistrationRequest value, $Res Function(_KillRegistrationRequest) _then) = __$KillRegistrationRequestCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
bool? approvedPrice, bool? market, String? killReqKey, String? operatorKey, String? poultryHatchingKey, int? quantity, String? sendDate, String? chickenBreed,@JsonKey(name: "Index_weight") double? indexWeight, String? losses, List<dynamic>? auctionList, bool? freezing, bool? export, bool? cash, bool? credit, List<dynamic>? killHouseList, String? role, String? poultryKey, int? amount, String? financialOperation, bool? freeSaleInProvince, String? confirmPoultryMobile
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$KillRegistrationRequestCopyWithImpl<$Res>
|
||||
implements _$KillRegistrationRequestCopyWith<$Res> {
|
||||
__$KillRegistrationRequestCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _KillRegistrationRequest _self;
|
||||
final $Res Function(_KillRegistrationRequest) _then;
|
||||
|
||||
/// Create a copy of KillRegistrationRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? approvedPrice = freezed,Object? market = freezed,Object? killReqKey = freezed,Object? operatorKey = freezed,Object? poultryHatchingKey = freezed,Object? quantity = freezed,Object? sendDate = freezed,Object? chickenBreed = freezed,Object? indexWeight = freezed,Object? losses = freezed,Object? auctionList = freezed,Object? freezing = freezed,Object? export = freezed,Object? cash = freezed,Object? credit = freezed,Object? killHouseList = freezed,Object? role = freezed,Object? poultryKey = freezed,Object? amount = freezed,Object? financialOperation = freezed,Object? freeSaleInProvince = freezed,Object? confirmPoultryMobile = freezed,}) {
|
||||
return _then(_KillRegistrationRequest(
|
||||
approvedPrice: freezed == approvedPrice ? _self.approvedPrice : approvedPrice // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,market: freezed == market ? _self.market : market // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,killReqKey: freezed == killReqKey ? _self.killReqKey : killReqKey // ignore: cast_nullable_to_non_nullable
|
||||
as String?,operatorKey: freezed == operatorKey ? _self.operatorKey : operatorKey // ignore: cast_nullable_to_non_nullable
|
||||
as String?,poultryHatchingKey: freezed == poultryHatchingKey ? _self.poultryHatchingKey : poultryHatchingKey // ignore: cast_nullable_to_non_nullable
|
||||
as String?,quantity: freezed == quantity ? _self.quantity : quantity // ignore: cast_nullable_to_non_nullable
|
||||
as int?,sendDate: freezed == sendDate ? _self.sendDate : sendDate // ignore: cast_nullable_to_non_nullable
|
||||
as String?,chickenBreed: freezed == chickenBreed ? _self.chickenBreed : chickenBreed // ignore: cast_nullable_to_non_nullable
|
||||
as String?,indexWeight: freezed == indexWeight ? _self.indexWeight : indexWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,losses: freezed == losses ? _self.losses : losses // ignore: cast_nullable_to_non_nullable
|
||||
as String?,auctionList: freezed == auctionList ? _self._auctionList : auctionList // ignore: cast_nullable_to_non_nullable
|
||||
as List<dynamic>?,freezing: freezed == freezing ? _self.freezing : freezing // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,export: freezed == export ? _self.export : export // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,cash: freezed == cash ? _self.cash : cash // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,credit: freezed == credit ? _self.credit : credit // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,killHouseList: freezed == killHouseList ? _self._killHouseList : killHouseList // ignore: cast_nullable_to_non_nullable
|
||||
as List<dynamic>?,role: freezed == role ? _self.role : role // ignore: cast_nullable_to_non_nullable
|
||||
as String?,poultryKey: freezed == poultryKey ? _self.poultryKey : poultryKey // ignore: cast_nullable_to_non_nullable
|
||||
as String?,amount: freezed == amount ? _self.amount : amount // ignore: cast_nullable_to_non_nullable
|
||||
as int?,financialOperation: freezed == financialOperation ? _self.financialOperation : financialOperation // ignore: cast_nullable_to_non_nullable
|
||||
as String?,freeSaleInProvince: freezed == freeSaleInProvince ? _self.freeSaleInProvince : freeSaleInProvince // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,confirmPoultryMobile: freezed == confirmPoultryMobile ? _self.confirmPoultryMobile : confirmPoultryMobile // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
@@ -0,0 +1,61 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'kill_registration.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_KillRegistrationRequest _$KillRegistrationRequestFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _KillRegistrationRequest(
|
||||
approvedPrice: json['approved_price'] as bool?,
|
||||
market: json['market'] as bool?,
|
||||
killReqKey: json['kill_req_key'] as String?,
|
||||
operatorKey: json['operator_key'] as String?,
|
||||
poultryHatchingKey: json['poultry_hatching_key'] as String?,
|
||||
quantity: (json['quantity'] as num?)?.toInt(),
|
||||
sendDate: json['send_date'] as String?,
|
||||
chickenBreed: json['chicken_breed'] as String?,
|
||||
indexWeight: (json['Index_weight'] as num?)?.toDouble(),
|
||||
losses: json['losses'] as String?,
|
||||
auctionList: json['auction_list'] as List<dynamic>?,
|
||||
freezing: json['freezing'] as bool?,
|
||||
export: json['export'] as bool?,
|
||||
cash: json['cash'] as bool?,
|
||||
credit: json['credit'] as bool?,
|
||||
killHouseList: json['kill_house_list'] as List<dynamic>?,
|
||||
role: json['role'] as String?,
|
||||
poultryKey: json['poultry_key'] as String?,
|
||||
amount: (json['amount'] as num?)?.toInt(),
|
||||
financialOperation: json['financial_operation'] as String?,
|
||||
freeSaleInProvince: json['free_sale_in_province'] as bool?,
|
||||
confirmPoultryMobile: json['confirm_poultry_mobile'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$KillRegistrationRequestToJson(
|
||||
_KillRegistrationRequest instance,
|
||||
) => <String, dynamic>{
|
||||
'approved_price': instance.approvedPrice,
|
||||
'market': instance.market,
|
||||
'kill_req_key': instance.killReqKey,
|
||||
'operator_key': instance.operatorKey,
|
||||
'poultry_hatching_key': instance.poultryHatchingKey,
|
||||
'quantity': instance.quantity,
|
||||
'send_date': instance.sendDate,
|
||||
'chicken_breed': instance.chickenBreed,
|
||||
'Index_weight': instance.indexWeight,
|
||||
'losses': instance.losses,
|
||||
'auction_list': instance.auctionList,
|
||||
'freezing': instance.freezing,
|
||||
'export': instance.export,
|
||||
'cash': instance.cash,
|
||||
'credit': instance.credit,
|
||||
'kill_house_list': instance.killHouseList,
|
||||
'role': instance.role,
|
||||
'poultry_key': instance.poultryKey,
|
||||
'amount': instance.amount,
|
||||
'financial_operation': instance.financialOperation,
|
||||
'free_sale_in_province': instance.freeSaleInProvince,
|
||||
'confirm_poultry_mobile': instance.confirmPoultryMobile,
|
||||
};
|
||||
@@ -0,0 +1,60 @@
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
part 'all_poultry.freezed.dart';
|
||||
part 'all_poultry.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class AllPoultry with _$AllPoultry {
|
||||
const factory AllPoultry({
|
||||
User? user,
|
||||
String? key,
|
||||
String? unitName,
|
||||
Address? address,
|
||||
int? lastHatchingRemainQuantity,
|
||||
bool? provinceAllowSellFree,
|
||||
ChainCompany? chainCompany,
|
||||
}) = _AllPoultry;
|
||||
|
||||
factory AllPoultry.fromJson(Map<String, dynamic> json) =>
|
||||
_$AllPoultryFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class User with _$User {
|
||||
const factory User({
|
||||
String? fullname,
|
||||
String? mobile,
|
||||
}) = _User;
|
||||
|
||||
factory User.fromJson(Map<String, dynamic> json) => _$UserFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class Address with _$Address {
|
||||
const factory Address({
|
||||
City? city,
|
||||
}) = _Address;
|
||||
|
||||
factory Address.fromJson(Map<String, dynamic> json) =>
|
||||
_$AddressFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class City with _$City {
|
||||
const factory City({
|
||||
String? name,
|
||||
}) = _City;
|
||||
|
||||
factory City.fromJson(Map<String, dynamic> json) => _$CityFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class ChainCompany with _$ChainCompany {
|
||||
const factory ChainCompany({
|
||||
bool? chainCompany,
|
||||
String? hatchingKey,
|
||||
}) = _ChainCompany;
|
||||
|
||||
factory ChainCompany.fromJson(Map<String, dynamic> json) =>
|
||||
_$ChainCompanyFromJson(json);
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,74 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'all_poultry.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_AllPoultry _$AllPoultryFromJson(Map<String, dynamic> json) => _AllPoultry(
|
||||
user: json['user'] == null
|
||||
? null
|
||||
: User.fromJson(json['user'] as Map<String, dynamic>),
|
||||
key: json['key'] as String?,
|
||||
unitName: json['unit_name'] as String?,
|
||||
address: json['address'] == null
|
||||
? null
|
||||
: Address.fromJson(json['address'] as Map<String, dynamic>),
|
||||
lastHatchingRemainQuantity: (json['last_hatching_remain_quantity'] as num?)
|
||||
?.toInt(),
|
||||
provinceAllowSellFree: json['province_allow_sell_free'] as bool?,
|
||||
chainCompany: json['chain_company'] == null
|
||||
? null
|
||||
: ChainCompany.fromJson(json['chain_company'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$AllPoultryToJson(_AllPoultry instance) =>
|
||||
<String, dynamic>{
|
||||
'user': instance.user,
|
||||
'key': instance.key,
|
||||
'unit_name': instance.unitName,
|
||||
'address': instance.address,
|
||||
'last_hatching_remain_quantity': instance.lastHatchingRemainQuantity,
|
||||
'province_allow_sell_free': instance.provinceAllowSellFree,
|
||||
'chain_company': instance.chainCompany,
|
||||
};
|
||||
|
||||
_User _$UserFromJson(Map<String, dynamic> json) => _User(
|
||||
fullname: json['fullname'] as String?,
|
||||
mobile: json['mobile'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$UserToJson(_User instance) => <String, dynamic>{
|
||||
'fullname': instance.fullname,
|
||||
'mobile': instance.mobile,
|
||||
};
|
||||
|
||||
_Address _$AddressFromJson(Map<String, dynamic> json) => _Address(
|
||||
city: json['city'] == null
|
||||
? null
|
||||
: City.fromJson(json['city'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$AddressToJson(_Address instance) => <String, dynamic>{
|
||||
'city': instance.city,
|
||||
};
|
||||
|
||||
_City _$CityFromJson(Map<String, dynamic> json) =>
|
||||
_City(name: json['name'] as String?);
|
||||
|
||||
Map<String, dynamic> _$CityToJson(_City instance) => <String, dynamic>{
|
||||
'name': instance.name,
|
||||
};
|
||||
|
||||
_ChainCompany _$ChainCompanyFromJson(Map<String, dynamic> json) =>
|
||||
_ChainCompany(
|
||||
chainCompany: json['chain_company'] as bool?,
|
||||
hatchingKey: json['hatching_key'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ChainCompanyToJson(_ChainCompany instance) =>
|
||||
<String, dynamic>{
|
||||
'chain_company': instance.chainCompany,
|
||||
'hatching_key': instance.hatchingKey,
|
||||
};
|
||||
@@ -0,0 +1,18 @@
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
part 'approved_price.freezed.dart';
|
||||
part 'approved_price.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class ApprovedPrice with _$ApprovedPrice {
|
||||
const factory ApprovedPrice({
|
||||
bool? approved,
|
||||
double? lowestPrice,
|
||||
double? highestPrice,
|
||||
double? lowestWeight,
|
||||
double? highestWeight,
|
||||
}) = _ApprovedPrice;
|
||||
|
||||
factory ApprovedPrice.fromJson(Map<String, dynamic> json) =>
|
||||
_$ApprovedPriceFromJson(json);
|
||||
}
|
||||
@@ -0,0 +1,289 @@
|
||||
// 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 'approved_price.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$ApprovedPrice {
|
||||
|
||||
bool? get approved; double? get lowestPrice; double? get highestPrice; double? get lowestWeight; double? get highestWeight;
|
||||
/// Create a copy of ApprovedPrice
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$ApprovedPriceCopyWith<ApprovedPrice> get copyWith => _$ApprovedPriceCopyWithImpl<ApprovedPrice>(this as ApprovedPrice, _$identity);
|
||||
|
||||
/// Serializes this ApprovedPrice to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is ApprovedPrice&&(identical(other.approved, approved) || other.approved == approved)&&(identical(other.lowestPrice, lowestPrice) || other.lowestPrice == lowestPrice)&&(identical(other.highestPrice, highestPrice) || other.highestPrice == highestPrice)&&(identical(other.lowestWeight, lowestWeight) || other.lowestWeight == lowestWeight)&&(identical(other.highestWeight, highestWeight) || other.highestWeight == highestWeight));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,approved,lowestPrice,highestPrice,lowestWeight,highestWeight);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ApprovedPrice(approved: $approved, lowestPrice: $lowestPrice, highestPrice: $highestPrice, lowestWeight: $lowestWeight, highestWeight: $highestWeight)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $ApprovedPriceCopyWith<$Res> {
|
||||
factory $ApprovedPriceCopyWith(ApprovedPrice value, $Res Function(ApprovedPrice) _then) = _$ApprovedPriceCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
bool? approved, double? lowestPrice, double? highestPrice, double? lowestWeight, double? highestWeight
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$ApprovedPriceCopyWithImpl<$Res>
|
||||
implements $ApprovedPriceCopyWith<$Res> {
|
||||
_$ApprovedPriceCopyWithImpl(this._self, this._then);
|
||||
|
||||
final ApprovedPrice _self;
|
||||
final $Res Function(ApprovedPrice) _then;
|
||||
|
||||
/// Create a copy of ApprovedPrice
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? approved = freezed,Object? lowestPrice = freezed,Object? highestPrice = freezed,Object? lowestWeight = freezed,Object? highestWeight = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
approved: freezed == approved ? _self.approved : approved // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,lowestPrice: freezed == lowestPrice ? _self.lowestPrice : lowestPrice // ignore: cast_nullable_to_non_nullable
|
||||
as double?,highestPrice: freezed == highestPrice ? _self.highestPrice : highestPrice // ignore: cast_nullable_to_non_nullable
|
||||
as double?,lowestWeight: freezed == lowestWeight ? _self.lowestWeight : lowestWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,highestWeight: freezed == highestWeight ? _self.highestWeight : highestWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [ApprovedPrice].
|
||||
extension ApprovedPricePatterns on ApprovedPrice {
|
||||
/// 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 extends Object?>(TResult Function( _ApprovedPrice value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _ApprovedPrice() 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 extends Object?>(TResult Function( _ApprovedPrice value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _ApprovedPrice():
|
||||
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 extends Object?>(TResult? Function( _ApprovedPrice value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _ApprovedPrice() 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 extends Object?>(TResult Function( bool? approved, double? lowestPrice, double? highestPrice, double? lowestWeight, double? highestWeight)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _ApprovedPrice() when $default != null:
|
||||
return $default(_that.approved,_that.lowestPrice,_that.highestPrice,_that.lowestWeight,_that.highestWeight);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 extends Object?>(TResult Function( bool? approved, double? lowestPrice, double? highestPrice, double? lowestWeight, double? highestWeight) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _ApprovedPrice():
|
||||
return $default(_that.approved,_that.lowestPrice,_that.highestPrice,_that.lowestWeight,_that.highestWeight);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 extends Object?>(TResult? Function( bool? approved, double? lowestPrice, double? highestPrice, double? lowestWeight, double? highestWeight)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _ApprovedPrice() when $default != null:
|
||||
return $default(_that.approved,_that.lowestPrice,_that.highestPrice,_that.lowestWeight,_that.highestWeight);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _ApprovedPrice implements ApprovedPrice {
|
||||
const _ApprovedPrice({this.approved, this.lowestPrice, this.highestPrice, this.lowestWeight, this.highestWeight});
|
||||
factory _ApprovedPrice.fromJson(Map<String, dynamic> json) => _$ApprovedPriceFromJson(json);
|
||||
|
||||
@override final bool? approved;
|
||||
@override final double? lowestPrice;
|
||||
@override final double? highestPrice;
|
||||
@override final double? lowestWeight;
|
||||
@override final double? highestWeight;
|
||||
|
||||
/// Create a copy of ApprovedPrice
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$ApprovedPriceCopyWith<_ApprovedPrice> get copyWith => __$ApprovedPriceCopyWithImpl<_ApprovedPrice>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$ApprovedPriceToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ApprovedPrice&&(identical(other.approved, approved) || other.approved == approved)&&(identical(other.lowestPrice, lowestPrice) || other.lowestPrice == lowestPrice)&&(identical(other.highestPrice, highestPrice) || other.highestPrice == highestPrice)&&(identical(other.lowestWeight, lowestWeight) || other.lowestWeight == lowestWeight)&&(identical(other.highestWeight, highestWeight) || other.highestWeight == highestWeight));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,approved,lowestPrice,highestPrice,lowestWeight,highestWeight);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ApprovedPrice(approved: $approved, lowestPrice: $lowestPrice, highestPrice: $highestPrice, lowestWeight: $lowestWeight, highestWeight: $highestWeight)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$ApprovedPriceCopyWith<$Res> implements $ApprovedPriceCopyWith<$Res> {
|
||||
factory _$ApprovedPriceCopyWith(_ApprovedPrice value, $Res Function(_ApprovedPrice) _then) = __$ApprovedPriceCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
bool? approved, double? lowestPrice, double? highestPrice, double? lowestWeight, double? highestWeight
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$ApprovedPriceCopyWithImpl<$Res>
|
||||
implements _$ApprovedPriceCopyWith<$Res> {
|
||||
__$ApprovedPriceCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _ApprovedPrice _self;
|
||||
final $Res Function(_ApprovedPrice) _then;
|
||||
|
||||
/// Create a copy of ApprovedPrice
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? approved = freezed,Object? lowestPrice = freezed,Object? highestPrice = freezed,Object? lowestWeight = freezed,Object? highestWeight = freezed,}) {
|
||||
return _then(_ApprovedPrice(
|
||||
approved: freezed == approved ? _self.approved : approved // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,lowestPrice: freezed == lowestPrice ? _self.lowestPrice : lowestPrice // ignore: cast_nullable_to_non_nullable
|
||||
as double?,highestPrice: freezed == highestPrice ? _self.highestPrice : highestPrice // ignore: cast_nullable_to_non_nullable
|
||||
as double?,lowestWeight: freezed == lowestWeight ? _self.lowestWeight : lowestWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,highestWeight: freezed == highestWeight ? _self.highestWeight : highestWeight // ignore: cast_nullable_to_non_nullable
|
||||
as double?,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
@@ -0,0 +1,25 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'approved_price.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_ApprovedPrice _$ApprovedPriceFromJson(Map<String, dynamic> json) =>
|
||||
_ApprovedPrice(
|
||||
approved: json['approved'] as bool?,
|
||||
lowestPrice: (json['lowest_price'] as num?)?.toDouble(),
|
||||
highestPrice: (json['highest_price'] as num?)?.toDouble(),
|
||||
lowestWeight: (json['lowest_weight'] as num?)?.toDouble(),
|
||||
highestWeight: (json['highest_weight'] as num?)?.toDouble(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ApprovedPriceToJson(_ApprovedPrice instance) =>
|
||||
<String, dynamic>{
|
||||
'approved': instance.approved,
|
||||
'lowest_price': instance.lowestPrice,
|
||||
'highest_price': instance.highestPrice,
|
||||
'lowest_weight': instance.lowestWeight,
|
||||
'highest_weight': instance.highestWeight,
|
||||
};
|
||||
@@ -0,0 +1,20 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'kill_house_poultry.freezed.dart';
|
||||
part 'kill_house_poultry.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class KillHousePoultry with _$KillHousePoultry {
|
||||
const factory KillHousePoultry({
|
||||
String? name,
|
||||
bool? killer,
|
||||
String? fullname,
|
||||
int? quantitySum,
|
||||
int? firstQuantity,
|
||||
int? poultryQuantitySum,
|
||||
String? killReqKey,
|
||||
}) = _KillHousePoultry;
|
||||
|
||||
factory KillHousePoultry.fromJson(Map<String, dynamic> json) =>
|
||||
_$KillHousePoultryFromJson(json);
|
||||
}
|
||||
@@ -0,0 +1,295 @@
|
||||
// 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 'kill_house_poultry.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$KillHousePoultry {
|
||||
|
||||
String? get name; bool? get killer; String? get fullname; int? get quantitySum; int? get firstQuantity; int? get poultryQuantitySum; String? get killReqKey;
|
||||
/// Create a copy of KillHousePoultry
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$KillHousePoultryCopyWith<KillHousePoultry> get copyWith => _$KillHousePoultryCopyWithImpl<KillHousePoultry>(this as KillHousePoultry, _$identity);
|
||||
|
||||
/// Serializes this KillHousePoultry to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is KillHousePoultry&&(identical(other.name, name) || other.name == name)&&(identical(other.killer, killer) || other.killer == killer)&&(identical(other.fullname, fullname) || other.fullname == fullname)&&(identical(other.quantitySum, quantitySum) || other.quantitySum == quantitySum)&&(identical(other.firstQuantity, firstQuantity) || other.firstQuantity == firstQuantity)&&(identical(other.poultryQuantitySum, poultryQuantitySum) || other.poultryQuantitySum == poultryQuantitySum)&&(identical(other.killReqKey, killReqKey) || other.killReqKey == killReqKey));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,name,killer,fullname,quantitySum,firstQuantity,poultryQuantitySum,killReqKey);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'KillHousePoultry(name: $name, killer: $killer, fullname: $fullname, quantitySum: $quantitySum, firstQuantity: $firstQuantity, poultryQuantitySum: $poultryQuantitySum, killReqKey: $killReqKey)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $KillHousePoultryCopyWith<$Res> {
|
||||
factory $KillHousePoultryCopyWith(KillHousePoultry value, $Res Function(KillHousePoultry) _then) = _$KillHousePoultryCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String? name, bool? killer, String? fullname, int? quantitySum, int? firstQuantity, int? poultryQuantitySum, String? killReqKey
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$KillHousePoultryCopyWithImpl<$Res>
|
||||
implements $KillHousePoultryCopyWith<$Res> {
|
||||
_$KillHousePoultryCopyWithImpl(this._self, this._then);
|
||||
|
||||
final KillHousePoultry _self;
|
||||
final $Res Function(KillHousePoultry) _then;
|
||||
|
||||
/// Create a copy of KillHousePoultry
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? name = freezed,Object? killer = freezed,Object? fullname = freezed,Object? quantitySum = freezed,Object? firstQuantity = freezed,Object? poultryQuantitySum = freezed,Object? killReqKey = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||
as String?,killer: freezed == killer ? _self.killer : killer // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,fullname: freezed == fullname ? _self.fullname : fullname // ignore: cast_nullable_to_non_nullable
|
||||
as String?,quantitySum: freezed == quantitySum ? _self.quantitySum : quantitySum // ignore: cast_nullable_to_non_nullable
|
||||
as int?,firstQuantity: freezed == firstQuantity ? _self.firstQuantity : firstQuantity // ignore: cast_nullable_to_non_nullable
|
||||
as int?,poultryQuantitySum: freezed == poultryQuantitySum ? _self.poultryQuantitySum : poultryQuantitySum // ignore: cast_nullable_to_non_nullable
|
||||
as int?,killReqKey: freezed == killReqKey ? _self.killReqKey : killReqKey // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [KillHousePoultry].
|
||||
extension KillHousePoultryPatterns on KillHousePoultry {
|
||||
/// 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 extends Object?>(TResult Function( _KillHousePoultry value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _KillHousePoultry() 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 extends Object?>(TResult Function( _KillHousePoultry value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _KillHousePoultry():
|
||||
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 extends Object?>(TResult? Function( _KillHousePoultry value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _KillHousePoultry() 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 extends Object?>(TResult Function( String? name, bool? killer, String? fullname, int? quantitySum, int? firstQuantity, int? poultryQuantitySum, String? killReqKey)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _KillHousePoultry() when $default != null:
|
||||
return $default(_that.name,_that.killer,_that.fullname,_that.quantitySum,_that.firstQuantity,_that.poultryQuantitySum,_that.killReqKey);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 extends Object?>(TResult Function( String? name, bool? killer, String? fullname, int? quantitySum, int? firstQuantity, int? poultryQuantitySum, String? killReqKey) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _KillHousePoultry():
|
||||
return $default(_that.name,_that.killer,_that.fullname,_that.quantitySum,_that.firstQuantity,_that.poultryQuantitySum,_that.killReqKey);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 extends Object?>(TResult? Function( String? name, bool? killer, String? fullname, int? quantitySum, int? firstQuantity, int? poultryQuantitySum, String? killReqKey)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _KillHousePoultry() when $default != null:
|
||||
return $default(_that.name,_that.killer,_that.fullname,_that.quantitySum,_that.firstQuantity,_that.poultryQuantitySum,_that.killReqKey);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _KillHousePoultry implements KillHousePoultry {
|
||||
const _KillHousePoultry({this.name, this.killer, this.fullname, this.quantitySum, this.firstQuantity, this.poultryQuantitySum, this.killReqKey});
|
||||
factory _KillHousePoultry.fromJson(Map<String, dynamic> json) => _$KillHousePoultryFromJson(json);
|
||||
|
||||
@override final String? name;
|
||||
@override final bool? killer;
|
||||
@override final String? fullname;
|
||||
@override final int? quantitySum;
|
||||
@override final int? firstQuantity;
|
||||
@override final int? poultryQuantitySum;
|
||||
@override final String? killReqKey;
|
||||
|
||||
/// Create a copy of KillHousePoultry
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$KillHousePoultryCopyWith<_KillHousePoultry> get copyWith => __$KillHousePoultryCopyWithImpl<_KillHousePoultry>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$KillHousePoultryToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _KillHousePoultry&&(identical(other.name, name) || other.name == name)&&(identical(other.killer, killer) || other.killer == killer)&&(identical(other.fullname, fullname) || other.fullname == fullname)&&(identical(other.quantitySum, quantitySum) || other.quantitySum == quantitySum)&&(identical(other.firstQuantity, firstQuantity) || other.firstQuantity == firstQuantity)&&(identical(other.poultryQuantitySum, poultryQuantitySum) || other.poultryQuantitySum == poultryQuantitySum)&&(identical(other.killReqKey, killReqKey) || other.killReqKey == killReqKey));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,name,killer,fullname,quantitySum,firstQuantity,poultryQuantitySum,killReqKey);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'KillHousePoultry(name: $name, killer: $killer, fullname: $fullname, quantitySum: $quantitySum, firstQuantity: $firstQuantity, poultryQuantitySum: $poultryQuantitySum, killReqKey: $killReqKey)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$KillHousePoultryCopyWith<$Res> implements $KillHousePoultryCopyWith<$Res> {
|
||||
factory _$KillHousePoultryCopyWith(_KillHousePoultry value, $Res Function(_KillHousePoultry) _then) = __$KillHousePoultryCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String? name, bool? killer, String? fullname, int? quantitySum, int? firstQuantity, int? poultryQuantitySum, String? killReqKey
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$KillHousePoultryCopyWithImpl<$Res>
|
||||
implements _$KillHousePoultryCopyWith<$Res> {
|
||||
__$KillHousePoultryCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _KillHousePoultry _self;
|
||||
final $Res Function(_KillHousePoultry) _then;
|
||||
|
||||
/// Create a copy of KillHousePoultry
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? name = freezed,Object? killer = freezed,Object? fullname = freezed,Object? quantitySum = freezed,Object? firstQuantity = freezed,Object? poultryQuantitySum = freezed,Object? killReqKey = freezed,}) {
|
||||
return _then(_KillHousePoultry(
|
||||
name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
|
||||
as String?,killer: freezed == killer ? _self.killer : killer // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,fullname: freezed == fullname ? _self.fullname : fullname // ignore: cast_nullable_to_non_nullable
|
||||
as String?,quantitySum: freezed == quantitySum ? _self.quantitySum : quantitySum // ignore: cast_nullable_to_non_nullable
|
||||
as int?,firstQuantity: freezed == firstQuantity ? _self.firstQuantity : firstQuantity // ignore: cast_nullable_to_non_nullable
|
||||
as int?,poultryQuantitySum: freezed == poultryQuantitySum ? _self.poultryQuantitySum : poultryQuantitySum // ignore: cast_nullable_to_non_nullable
|
||||
as int?,killReqKey: freezed == killReqKey ? _self.killReqKey : killReqKey // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
@@ -0,0 +1,29 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'kill_house_poultry.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_KillHousePoultry _$KillHousePoultryFromJson(Map<String, dynamic> json) =>
|
||||
_KillHousePoultry(
|
||||
name: json['name'] as String?,
|
||||
killer: json['killer'] as bool?,
|
||||
fullname: json['fullname'] as String?,
|
||||
quantitySum: (json['quantity_sum'] as num?)?.toInt(),
|
||||
firstQuantity: (json['first_quantity'] as num?)?.toInt(),
|
||||
poultryQuantitySum: (json['poultry_quantity_sum'] as num?)?.toInt(),
|
||||
killReqKey: json['kill_req_key'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$KillHousePoultryToJson(_KillHousePoultry instance) =>
|
||||
<String, dynamic>{
|
||||
'name': instance.name,
|
||||
'killer': instance.killer,
|
||||
'fullname': instance.fullname,
|
||||
'quantity_sum': instance.quantitySum,
|
||||
'first_quantity': instance.firstQuantity,
|
||||
'poultry_quantity_sum': instance.poultryQuantitySum,
|
||||
'kill_req_key': instance.killReqKey,
|
||||
};
|
||||
@@ -0,0 +1,257 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'kill_request_poultry.freezed.dart';
|
||||
part 'kill_request_poultry.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class KillRequestPoultry with _$KillRequestPoultry{
|
||||
const factory KillRequestPoultry({
|
||||
UserProfile? userprofile,
|
||||
Address? address,
|
||||
PoultryOwner? poultryOwner,
|
||||
PoultryTenant? poultryTenant,
|
||||
List<Hatching>? hatching,
|
||||
List<int>? registerVetHalls,
|
||||
Allow? allow,
|
||||
ProvinceAllowChooseKillHouse? provinceAllowChooseKillHouse,
|
||||
bool? provinceAllowSellFree,
|
||||
VetFarm? vetFarm,
|
||||
LastHatchingDifferentRequestQuantity? lastHatchingDiffrentRequestQuantity,
|
||||
UserBankInfo? userBankInfo,
|
||||
int? leftOverOwnHatching,
|
||||
String? key,
|
||||
bool? trash,
|
||||
int? ownerIdForeignKey,
|
||||
int? userIdForeignKey,
|
||||
int? addressIdForeignKey,
|
||||
bool? hasChainCompany,
|
||||
int? userBankIdForeignKey,
|
||||
String? cityOperator,
|
||||
String? unitName,
|
||||
String? gisCode,
|
||||
int? operatingLicenceCapacity,
|
||||
int? numberOfHalls,
|
||||
bool? tenant,
|
||||
bool? hasTenant,
|
||||
String? personType,
|
||||
String? 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,
|
||||
String? communicationType,
|
||||
String? cooperative,
|
||||
String? dateOfRegister,
|
||||
String? unitStatus,
|
||||
bool? active,
|
||||
String? identityDocuments,
|
||||
String? samasatUserCode,
|
||||
int? baseOrder,
|
||||
String? incubationDate,
|
||||
int? walletAmount,
|
||||
int? city,
|
||||
int? cityNumber,
|
||||
String? cityName,
|
||||
int? provinceNumber,
|
||||
String? provinceName,
|
||||
int? walletIdForeignKey,
|
||||
int? poultryIdKey,
|
||||
double? lat,
|
||||
double? long,
|
||||
String? date,
|
||||
int? killingAveAge,
|
||||
int? activeLeftOver,
|
||||
int? killingAveCount,
|
||||
double? killingAveWeight,
|
||||
double? killingLiveWeight,
|
||||
double? killingCarcassesWeight,
|
||||
double? killingLossWeightPercent,
|
||||
double? realKillingAveWeight,
|
||||
double? realKillingLiveWeight,
|
||||
double? realKillingCarcassesWeight,
|
||||
double? realKillingLossWeightPercent,
|
||||
int? interestLicenseId,
|
||||
bool? orderLimit,
|
||||
int? owner,
|
||||
int? wallet,
|
||||
}) = _KillRequestPoultry;
|
||||
|
||||
factory KillRequestPoultry.fromJson(Map<String, dynamic> json) =>
|
||||
_$KillRequestPoultryFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class UserProfile with _$UserProfile {
|
||||
const factory UserProfile({
|
||||
String? userKey,
|
||||
int? baseOrder,
|
||||
String? fullName,
|
||||
String? mobile,
|
||||
String? city,
|
||||
String? province,
|
||||
String? breedingUniqueId,
|
||||
}) = _UserProfile;
|
||||
|
||||
factory UserProfile.fromJson(Map<String, dynamic> json) =>
|
||||
_$UserProfileFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class Address with _$Address {
|
||||
const factory Address({
|
||||
Province? province,
|
||||
City? city,
|
||||
String? address,
|
||||
String? postalCode,
|
||||
}) = _Address;
|
||||
|
||||
factory Address.fromJson(Map<String, dynamic> json) =>
|
||||
_$AddressFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class Province with _$Province {
|
||||
const factory Province({
|
||||
String? key,
|
||||
String? name,
|
||||
}) = _Province;
|
||||
|
||||
factory Province.fromJson(Map<String, dynamic> json) =>
|
||||
_$ProvinceFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class City with _$City {
|
||||
const factory City({
|
||||
String? key,
|
||||
String? name,
|
||||
}) = _City;
|
||||
|
||||
factory City.fromJson(Map<String, dynamic> json) => _$CityFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class PoultryOwner with _$PoultryOwner {
|
||||
const factory PoultryOwner({
|
||||
String? fullName,
|
||||
String? mobile,
|
||||
String? unitName,
|
||||
int? numberOfHalls,
|
||||
String? breedingUniqueId,
|
||||
}) = _PoultryOwner;
|
||||
|
||||
factory PoultryOwner.fromJson(Map<String, dynamic> json) =>
|
||||
_$PoultryOwnerFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class PoultryTenant with _$PoultryTenant {
|
||||
const factory PoultryTenant({
|
||||
String? key,
|
||||
String? firstName,
|
||||
String? lastName,
|
||||
String? fullName,
|
||||
String? mobile,
|
||||
String? nationalId,
|
||||
String? breedingUniqueId,
|
||||
}) = _PoultryTenant;
|
||||
|
||||
factory PoultryTenant.fromJson(Map<String, dynamic> json) =>
|
||||
_$PoultryTenantFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class Hatching with _$Hatching {
|
||||
const factory Hatching({
|
||||
String? poultryKey,
|
||||
String? poultryHatchingKey,
|
||||
String? poultry,
|
||||
int? quantity,
|
||||
int? losses,
|
||||
int? leftOver,
|
||||
double? outProvinceKilledQuantity,
|
||||
double? exportKilledQuantity,
|
||||
int? hall,
|
||||
String? date,
|
||||
int? period,
|
||||
String? state,
|
||||
int? age,
|
||||
}) = _Hatching;
|
||||
|
||||
factory Hatching.fromJson(Map<String, dynamic> json) =>
|
||||
_$HatchingFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class Allow with _$Allow {
|
||||
const factory Allow({
|
||||
bool? city,
|
||||
bool? province,
|
||||
}) = _Allow;
|
||||
|
||||
factory Allow.fromJson(Map<String, dynamic> json) => _$AllowFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class ProvinceAllowChooseKillHouse with _$ProvinceAllowChooseKillHouse {
|
||||
const factory ProvinceAllowChooseKillHouse({
|
||||
bool? allowState,
|
||||
bool? mandatory,
|
||||
}) = _ProvinceAllowChooseKillHouse;
|
||||
|
||||
factory ProvinceAllowChooseKillHouse.fromJson(Map<String, dynamic> json) =>
|
||||
_$ProvinceAllowChooseKillHouseFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class VetFarm with _$VetFarm {
|
||||
const factory VetFarm({
|
||||
String? fullName,
|
||||
String? mobile,
|
||||
String? city,
|
||||
String? province,
|
||||
}) = _VetFarm;
|
||||
|
||||
factory VetFarm.fromJson(Map<String, dynamic> json) =>
|
||||
_$VetFarmFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class LastHatchingDifferentRequestQuantity
|
||||
with _$LastHatchingDifferentRequestQuantity {
|
||||
const factory LastHatchingDifferentRequestQuantity({
|
||||
double? leftExportQuantity,
|
||||
double? leftPoultryOutProvince,
|
||||
int? lastHatchingRemainQuantity,
|
||||
}) = _LastHatchingDifferentRequestQuantity;
|
||||
|
||||
factory LastHatchingDifferentRequestQuantity.fromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$LastHatchingDifferentRequestQuantityFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class UserBankInfo with _$UserBankInfo {
|
||||
const factory UserBankInfo({
|
||||
String? key,
|
||||
String? nameOfBankUser,
|
||||
String? bankName,
|
||||
String? card,
|
||||
String? shaba,
|
||||
String? account,
|
||||
int? userBankIdKey,
|
||||
String? provinceName,
|
||||
}) = _UserBankInfo;
|
||||
|
||||
factory UserBankInfo.fromJson(Map<String, dynamic> json) =>
|
||||
_$UserBankInfoFromJson(json);
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,410 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'kill_request_poultry.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_KillRequestPoultry _$KillRequestPoultryFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _KillRequestPoultry(
|
||||
userprofile: json['userprofile'] == null
|
||||
? null
|
||||
: UserProfile.fromJson(json['userprofile'] as Map<String, dynamic>),
|
||||
address: json['address'] == null
|
||||
? null
|
||||
: Address.fromJson(json['address'] as Map<String, dynamic>),
|
||||
poultryOwner: json['poultry_owner'] == null
|
||||
? null
|
||||
: PoultryOwner.fromJson(json['poultry_owner'] as Map<String, dynamic>),
|
||||
poultryTenant: json['poultry_tenant'] == null
|
||||
? null
|
||||
: PoultryTenant.fromJson(json['poultry_tenant'] as Map<String, dynamic>),
|
||||
hatching: (json['hatching'] as List<dynamic>?)
|
||||
?.map((e) => Hatching.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
registerVetHalls: (json['register_vet_halls'] as List<dynamic>?)
|
||||
?.map((e) => (e as num).toInt())
|
||||
.toList(),
|
||||
allow: json['allow'] == null
|
||||
? null
|
||||
: Allow.fromJson(json['allow'] as Map<String, dynamic>),
|
||||
provinceAllowChooseKillHouse: json['province_allow_choose_kill_house'] == null
|
||||
? null
|
||||
: ProvinceAllowChooseKillHouse.fromJson(
|
||||
json['province_allow_choose_kill_house'] as Map<String, dynamic>,
|
||||
),
|
||||
provinceAllowSellFree: json['province_allow_sell_free'] as bool?,
|
||||
vetFarm: json['vet_farm'] == null
|
||||
? null
|
||||
: VetFarm.fromJson(json['vet_farm'] as Map<String, dynamic>),
|
||||
lastHatchingDiffrentRequestQuantity:
|
||||
json['last_hatching_diffrent_request_quantity'] == null
|
||||
? null
|
||||
: LastHatchingDifferentRequestQuantity.fromJson(
|
||||
json['last_hatching_diffrent_request_quantity']
|
||||
as Map<String, dynamic>,
|
||||
),
|
||||
userBankInfo: json['user_bank_info'] == null
|
||||
? null
|
||||
: UserBankInfo.fromJson(json['user_bank_info'] as Map<String, dynamic>),
|
||||
leftOverOwnHatching: (json['left_over_own_hatching'] as num?)?.toInt(),
|
||||
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'] as String?,
|
||||
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'] as String?,
|
||||
economicCode: json['economic_code'] as String?,
|
||||
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'] as String?,
|
||||
cooperative: json['cooperative'] as String?,
|
||||
dateOfRegister: json['date_of_register'] as String?,
|
||||
unitStatus: json['unit_status'] as String?,
|
||||
active: json['active'] as bool?,
|
||||
identityDocuments: json['identity_documents'] as String?,
|
||||
samasatUserCode: json['samasat_user_code'] as String?,
|
||||
baseOrder: (json['base_order'] as num?)?.toInt(),
|
||||
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'] as String?,
|
||||
killingAveAge: (json['killing_ave_age'] as num?)?.toInt(),
|
||||
activeLeftOver: (json['active_left_over'] as num?)?.toInt(),
|
||||
killingAveCount: (json['killing_ave_count'] as num?)?.toInt(),
|
||||
killingAveWeight: (json['killing_ave_weight'] as num?)?.toDouble(),
|
||||
killingLiveWeight: (json['killing_live_weight'] as num?)?.toDouble(),
|
||||
killingCarcassesWeight: (json['killing_carcasses_weight'] as num?)
|
||||
?.toDouble(),
|
||||
killingLossWeightPercent: (json['killing_loss_weight_percent'] as num?)
|
||||
?.toDouble(),
|
||||
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'] as num?)?.toInt(),
|
||||
orderLimit: json['order_limit'] as bool?,
|
||||
owner: (json['owner'] as num?)?.toInt(),
|
||||
wallet: (json['wallet'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$KillRequestPoultryToJson(_KillRequestPoultry instance) =>
|
||||
<String, dynamic>{
|
||||
'userprofile': instance.userprofile,
|
||||
'address': instance.address,
|
||||
'poultry_owner': instance.poultryOwner,
|
||||
'poultry_tenant': instance.poultryTenant,
|
||||
'hatching': instance.hatching,
|
||||
'register_vet_halls': instance.registerVetHalls,
|
||||
'allow': instance.allow,
|
||||
'province_allow_choose_kill_house': instance.provinceAllowChooseKillHouse,
|
||||
'province_allow_sell_free': instance.provinceAllowSellFree,
|
||||
'vet_farm': instance.vetFarm,
|
||||
'last_hatching_diffrent_request_quantity':
|
||||
instance.lastHatchingDiffrentRequestQuantity,
|
||||
'user_bank_info': instance.userBankInfo,
|
||||
'left_over_own_hatching': instance.leftOverOwnHatching,
|
||||
'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,
|
||||
'wallet': instance.wallet,
|
||||
};
|
||||
|
||||
_UserProfile _$UserProfileFromJson(Map<String, dynamic> json) => _UserProfile(
|
||||
userKey: json['user_key'] as String?,
|
||||
baseOrder: (json['base_order'] as num?)?.toInt(),
|
||||
fullName: json['full_name'] as String?,
|
||||
mobile: json['mobile'] as String?,
|
||||
city: json['city'] as String?,
|
||||
province: json['province'] as String?,
|
||||
breedingUniqueId: json['breeding_unique_id'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$UserProfileToJson(_UserProfile instance) =>
|
||||
<String, dynamic>{
|
||||
'user_key': instance.userKey,
|
||||
'base_order': instance.baseOrder,
|
||||
'full_name': instance.fullName,
|
||||
'mobile': instance.mobile,
|
||||
'city': instance.city,
|
||||
'province': instance.province,
|
||||
'breeding_unique_id': instance.breedingUniqueId,
|
||||
};
|
||||
|
||||
_Address _$AddressFromJson(Map<String, dynamic> json) => _Address(
|
||||
province: json['province'] == null
|
||||
? null
|
||||
: Province.fromJson(json['province'] as Map<String, dynamic>),
|
||||
city: json['city'] == null
|
||||
? null
|
||||
: City.fromJson(json['city'] as Map<String, dynamic>),
|
||||
address: json['address'] as String?,
|
||||
postalCode: json['postal_code'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$AddressToJson(_Address instance) => <String, dynamic>{
|
||||
'province': instance.province,
|
||||
'city': instance.city,
|
||||
'address': instance.address,
|
||||
'postal_code': instance.postalCode,
|
||||
};
|
||||
|
||||
_Province _$ProvinceFromJson(Map<String, dynamic> json) =>
|
||||
_Province(key: json['key'] as String?, name: json['name'] as String?);
|
||||
|
||||
Map<String, dynamic> _$ProvinceToJson(_Province instance) => <String, dynamic>{
|
||||
'key': instance.key,
|
||||
'name': instance.name,
|
||||
};
|
||||
|
||||
_City _$CityFromJson(Map<String, dynamic> json) =>
|
||||
_City(key: json['key'] as String?, name: json['name'] as String?);
|
||||
|
||||
Map<String, dynamic> _$CityToJson(_City instance) => <String, dynamic>{
|
||||
'key': instance.key,
|
||||
'name': instance.name,
|
||||
};
|
||||
|
||||
_PoultryOwner _$PoultryOwnerFromJson(Map<String, dynamic> json) =>
|
||||
_PoultryOwner(
|
||||
fullName: json['full_name'] as String?,
|
||||
mobile: json['mobile'] as String?,
|
||||
unitName: json['unit_name'] as String?,
|
||||
numberOfHalls: (json['number_of_halls'] as num?)?.toInt(),
|
||||
breedingUniqueId: json['breeding_unique_id'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$PoultryOwnerToJson(_PoultryOwner instance) =>
|
||||
<String, dynamic>{
|
||||
'full_name': instance.fullName,
|
||||
'mobile': instance.mobile,
|
||||
'unit_name': instance.unitName,
|
||||
'number_of_halls': instance.numberOfHalls,
|
||||
'breeding_unique_id': instance.breedingUniqueId,
|
||||
};
|
||||
|
||||
_PoultryTenant _$PoultryTenantFromJson(Map<String, dynamic> json) =>
|
||||
_PoultryTenant(
|
||||
key: json['key'] as String?,
|
||||
firstName: json['first_name'] as String?,
|
||||
lastName: json['last_name'] as String?,
|
||||
fullName: json['full_name'] as String?,
|
||||
mobile: json['mobile'] as String?,
|
||||
nationalId: json['national_id'] as String?,
|
||||
breedingUniqueId: json['breeding_unique_id'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$PoultryTenantToJson(_PoultryTenant instance) =>
|
||||
<String, dynamic>{
|
||||
'key': instance.key,
|
||||
'first_name': instance.firstName,
|
||||
'last_name': instance.lastName,
|
||||
'full_name': instance.fullName,
|
||||
'mobile': instance.mobile,
|
||||
'national_id': instance.nationalId,
|
||||
'breeding_unique_id': instance.breedingUniqueId,
|
||||
};
|
||||
|
||||
_Hatching _$HatchingFromJson(Map<String, dynamic> json) => _Hatching(
|
||||
poultryKey: json['poultry_key'] as String?,
|
||||
poultryHatchingKey: json['poultry_hatching_key'] as String?,
|
||||
poultry: json['poultry'] as String?,
|
||||
quantity: (json['quantity'] as num?)?.toInt(),
|
||||
losses: (json['losses'] as num?)?.toInt(),
|
||||
leftOver: (json['left_over'] as num?)?.toInt(),
|
||||
outProvinceKilledQuantity: (json['out_province_killed_quantity'] as num?)
|
||||
?.toDouble(),
|
||||
exportKilledQuantity: (json['export_killed_quantity'] as num?)?.toDouble(),
|
||||
hall: (json['hall'] as num?)?.toInt(),
|
||||
date: json['date'] as String?,
|
||||
period: (json['period'] as num?)?.toInt(),
|
||||
state: json['state'] as String?,
|
||||
age: (json['age'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$HatchingToJson(_Hatching instance) => <String, dynamic>{
|
||||
'poultry_key': instance.poultryKey,
|
||||
'poultry_hatching_key': instance.poultryHatchingKey,
|
||||
'poultry': instance.poultry,
|
||||
'quantity': instance.quantity,
|
||||
'losses': instance.losses,
|
||||
'left_over': instance.leftOver,
|
||||
'out_province_killed_quantity': instance.outProvinceKilledQuantity,
|
||||
'export_killed_quantity': instance.exportKilledQuantity,
|
||||
'hall': instance.hall,
|
||||
'date': instance.date,
|
||||
'period': instance.period,
|
||||
'state': instance.state,
|
||||
'age': instance.age,
|
||||
};
|
||||
|
||||
_Allow _$AllowFromJson(Map<String, dynamic> json) =>
|
||||
_Allow(city: json['city'] as bool?, province: json['province'] as bool?);
|
||||
|
||||
Map<String, dynamic> _$AllowToJson(_Allow instance) => <String, dynamic>{
|
||||
'city': instance.city,
|
||||
'province': instance.province,
|
||||
};
|
||||
|
||||
_ProvinceAllowChooseKillHouse _$ProvinceAllowChooseKillHouseFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _ProvinceAllowChooseKillHouse(
|
||||
allowState: json['allow_state'] as bool?,
|
||||
mandatory: json['mandatory'] as bool?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ProvinceAllowChooseKillHouseToJson(
|
||||
_ProvinceAllowChooseKillHouse instance,
|
||||
) => <String, dynamic>{
|
||||
'allow_state': instance.allowState,
|
||||
'mandatory': instance.mandatory,
|
||||
};
|
||||
|
||||
_VetFarm _$VetFarmFromJson(Map<String, dynamic> json) => _VetFarm(
|
||||
fullName: json['full_name'] as String?,
|
||||
mobile: json['mobile'] as String?,
|
||||
city: json['city'] as String?,
|
||||
province: json['province'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$VetFarmToJson(_VetFarm instance) => <String, dynamic>{
|
||||
'full_name': instance.fullName,
|
||||
'mobile': instance.mobile,
|
||||
'city': instance.city,
|
||||
'province': instance.province,
|
||||
};
|
||||
|
||||
_LastHatchingDifferentRequestQuantity
|
||||
_$LastHatchingDifferentRequestQuantityFromJson(Map<String, dynamic> json) =>
|
||||
_LastHatchingDifferentRequestQuantity(
|
||||
leftExportQuantity: (json['left_export_quantity'] as num?)?.toDouble(),
|
||||
leftPoultryOutProvince: (json['left_poultry_out_province'] as num?)
|
||||
?.toDouble(),
|
||||
lastHatchingRemainQuantity:
|
||||
(json['last_hatching_remain_quantity'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$LastHatchingDifferentRequestQuantityToJson(
|
||||
_LastHatchingDifferentRequestQuantity instance,
|
||||
) => <String, dynamic>{
|
||||
'left_export_quantity': instance.leftExportQuantity,
|
||||
'left_poultry_out_province': instance.leftPoultryOutProvince,
|
||||
'last_hatching_remain_quantity': instance.lastHatchingRemainQuantity,
|
||||
};
|
||||
|
||||
_UserBankInfo _$UserBankInfoFromJson(Map<String, dynamic> json) =>
|
||||
_UserBankInfo(
|
||||
key: json['key'] as String?,
|
||||
nameOfBankUser: json['name_of_bank_user'] as String?,
|
||||
bankName: json['bank_name'] as String?,
|
||||
card: json['card'] as String?,
|
||||
shaba: json['shaba'] as String?,
|
||||
account: json['account'] as String?,
|
||||
userBankIdKey: (json['user_bank_id_key'] as num?)?.toInt(),
|
||||
provinceName: json['province_name'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$UserBankInfoToJson(_UserBankInfo instance) =>
|
||||
<String, dynamic>{
|
||||
'key': instance.key,
|
||||
'name_of_bank_user': instance.nameOfBankUser,
|
||||
'bank_name': instance.bankName,
|
||||
'card': instance.card,
|
||||
'shaba': instance.shaba,
|
||||
'account': instance.account,
|
||||
'user_bank_id_key': instance.userBankIdKey,
|
||||
'province_name': instance.provinceName,
|
||||
};
|
||||
@@ -0,0 +1,545 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'poultry_hatching.freezed.dart';
|
||||
part 'poultry_hatching.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class PoultryHatching with _$PoultryHatching {
|
||||
const factory PoultryHatching({
|
||||
int? id,
|
||||
Poultry? poultry,
|
||||
ChainCompany? chainCompany,
|
||||
int? age,
|
||||
dynamic inspectionLosses,
|
||||
VetFarm? vetFarm,
|
||||
ActiveKill? activeKill,
|
||||
KillingInfo? killingInfo,
|
||||
FreeGovernmentalInfo? freeGovernmentalInfo,
|
||||
ManagementHatchingAgeRange? managementHatchingAgeRange,
|
||||
String? key,
|
||||
String? createDate,
|
||||
String? modifyDate,
|
||||
bool? trash,
|
||||
bool? hasChainCompany,
|
||||
dynamic poultryIdForeignKey,
|
||||
dynamic poultryHatchingIdKey,
|
||||
int? quantity,
|
||||
int? losses,
|
||||
int? leftOver,
|
||||
int? killedQuantity,
|
||||
int? extraKilledQuantity,
|
||||
double? governmentalKilledQuantity,
|
||||
double? governmentalQuantity,
|
||||
double? freeKilledQuantity,
|
||||
double? freeQuantity,
|
||||
double? chainKilledQuantity,
|
||||
double? chainKilledWeight,
|
||||
double? outProvinceKilledWeight,
|
||||
double? outProvinceKilledQuantity,
|
||||
double? exportKilledWeight,
|
||||
double? exportKilledQuantity,
|
||||
double? totalCommitment,
|
||||
String? commitmentType,
|
||||
double? totalCommitmentQuantity,
|
||||
double? totalFreeCommitmentQuantity,
|
||||
double? totalFreeCommitmentWeight,
|
||||
double? totalKilledWeight,
|
||||
double? totalAverageKilledWeight,
|
||||
int? requestLeftOver,
|
||||
int? hall,
|
||||
String? date,
|
||||
dynamic predicateDate,
|
||||
String? chickenBreed,
|
||||
int? period,
|
||||
String? allowHatching,
|
||||
String? state,
|
||||
bool? archive,
|
||||
bool? violation,
|
||||
dynamic message,
|
||||
Registrar? registrar,
|
||||
List<Breed>? breed,
|
||||
int? cityNumber,
|
||||
String? cityName,
|
||||
int? provinceNumber,
|
||||
String? provinceName,
|
||||
LastChange? lastChange,
|
||||
int? chickenAge,
|
||||
int? nowAge,
|
||||
LatestHatchingChange? latestHatchingChange,
|
||||
String? violationReport,
|
||||
String? violationMessage,
|
||||
List<String>? violationImage,
|
||||
String? violationReporter,
|
||||
String? violationReportDate,
|
||||
String? violationReportEditor,
|
||||
String? violationReportEditDate,
|
||||
int? totalLosses,
|
||||
int? directLosses,
|
||||
String? directLossesInputer,
|
||||
String? directLossesDate,
|
||||
String? directLossesEditor,
|
||||
String? directLossesLastEditDate,
|
||||
String? endPeriodLossesInputer,
|
||||
String? endPeriodLossesDate,
|
||||
String? endPeriodLossesEditor,
|
||||
String? endPeriodLossesLastEditDate,
|
||||
String? breedingUniqueId,
|
||||
String? licenceNumber,
|
||||
bool? temporaryTrash,
|
||||
bool? temporaryDeleted,
|
||||
dynamic firstDateInputArchive,
|
||||
dynamic secondDateInputArchive,
|
||||
dynamic inputArchiver,
|
||||
dynamic outputArchiveDate,
|
||||
dynamic outputArchiver,
|
||||
double? barDifferenceRequestWeight,
|
||||
double? barDifferenceRequestQuantity,
|
||||
dynamic healthCertificate,
|
||||
int? samasatDischargePercentage,
|
||||
dynamic personTypeName,
|
||||
String? interactTypeName,
|
||||
dynamic unionTypeName,
|
||||
dynamic certId,
|
||||
int? increaseQuantity,
|
||||
String? tenantFullname,
|
||||
String? tenantNationalCode,
|
||||
String? tenantMobile,
|
||||
String? tenantCity,
|
||||
bool? hasTenant,
|
||||
dynamic archiveDate,
|
||||
dynamic createdBy,
|
||||
dynamic modifiedBy,
|
||||
}) = _PoultryHatching;
|
||||
|
||||
factory PoultryHatching.fromJson(Map<String, dynamic> json) =>
|
||||
_$PoultryHatchingFromJson(json);
|
||||
}
|
||||
|
||||
// Sub models
|
||||
@freezed
|
||||
abstract class Poultry with _$Poultry {
|
||||
const factory Poultry({
|
||||
UserProfile? userprofile,
|
||||
Address? address,
|
||||
dynamic poultryOwner,
|
||||
PoultryTenant? poultryTenant,
|
||||
List<Hatching>? hatching,
|
||||
List<int>? registerVetHalls,
|
||||
Allow? allow,
|
||||
ProvinceAllowChooseKillHouse? provinceAllowChooseKillHouse,
|
||||
bool? provinceAllowSellFree,
|
||||
VetFarm? vetFarm,
|
||||
LastHatchingDiffrentRequestQuantity? lastHatchingDiffrentRequestQuantity,
|
||||
UserBankInfo? userBankInfo,
|
||||
int? leftOverOwnHatching,
|
||||
String? key,
|
||||
bool? trash,
|
||||
int? ownerIdForeignKey,
|
||||
int? userIdForeignKey,
|
||||
int? addressIdForeignKey,
|
||||
bool? hasChainCompany,
|
||||
int? userBankIdForeignKey,
|
||||
String? 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,
|
||||
int? wallet,
|
||||
}) = _Poultry;
|
||||
|
||||
factory Poultry.fromJson(Map<String, dynamic> json) =>
|
||||
_$PoultryFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class UserProfile with _$UserProfile {
|
||||
const factory UserProfile({
|
||||
String? userKey,
|
||||
int? baseOrder,
|
||||
String? fullName,
|
||||
String? mobile,
|
||||
String? city,
|
||||
String? province,
|
||||
String? breedingUniqueId,
|
||||
}) = _UserProfile;
|
||||
|
||||
factory UserProfile.fromJson(Map<String, dynamic> json) =>
|
||||
_$UserProfileFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class Address with _$Address {
|
||||
const factory Address({
|
||||
Province? province,
|
||||
City? city,
|
||||
String? address,
|
||||
String? postalCode,
|
||||
}) = _Address;
|
||||
|
||||
factory Address.fromJson(Map<String, dynamic> json) =>
|
||||
_$AddressFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class Province with _$Province {
|
||||
const factory Province({
|
||||
String? key,
|
||||
String? name,
|
||||
}) = _Province;
|
||||
|
||||
factory Province.fromJson(Map<String, dynamic> json) =>
|
||||
_$ProvinceFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class City with _$City {
|
||||
const factory City({
|
||||
String? key,
|
||||
String? name,
|
||||
}) = _City;
|
||||
|
||||
factory City.fromJson(Map<String, dynamic> json) => _$CityFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class PoultryTenant with _$PoultryTenant {
|
||||
const factory PoultryTenant({
|
||||
String? key,
|
||||
String? firstName,
|
||||
String? lastName,
|
||||
String? fullName,
|
||||
String? mobile,
|
||||
String? nationalId,
|
||||
String? breedingUniqueId,
|
||||
}) = _PoultryTenant;
|
||||
|
||||
factory PoultryTenant.fromJson(Map<String, dynamic> json) =>
|
||||
_$PoultryTenantFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class Hatching with _$Hatching {
|
||||
const factory Hatching({
|
||||
String? poultryKey,
|
||||
String? poultryHatchingKey,
|
||||
String? poultry,
|
||||
int? quantity,
|
||||
int? losses,
|
||||
int? leftOver,
|
||||
double? outProvinceKilledQuantity,
|
||||
double? exportKilledQuantity,
|
||||
int? hall,
|
||||
String? date,
|
||||
int? period,
|
||||
String? state,
|
||||
int? age,
|
||||
}) = _Hatching;
|
||||
|
||||
factory Hatching.fromJson(Map<String, dynamic> json) =>
|
||||
_$HatchingFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class Allow with _$Allow {
|
||||
const factory Allow({
|
||||
bool? city,
|
||||
bool? province,
|
||||
}) = _Allow;
|
||||
|
||||
factory Allow.fromJson(Map<String, dynamic> json) => _$AllowFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class ProvinceAllowChooseKillHouse with _$ProvinceAllowChooseKillHouse {
|
||||
const factory ProvinceAllowChooseKillHouse({
|
||||
bool? allowState,
|
||||
bool? mandatory,
|
||||
}) = _ProvinceAllowChooseKillHouse;
|
||||
|
||||
factory ProvinceAllowChooseKillHouse.fromJson(Map<String, dynamic> json) =>
|
||||
_$ProvinceAllowChooseKillHouseFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class VetFarm with _$VetFarm {
|
||||
const factory VetFarm({
|
||||
String? fullName,
|
||||
String? mobile,
|
||||
String? city,
|
||||
String? province,
|
||||
String? vetFarmFullName,
|
||||
String? vetFarmMobile,
|
||||
}) = _VetFarm;
|
||||
|
||||
factory VetFarm.fromJson(Map<String, dynamic> json) =>
|
||||
_$VetFarmFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class LastHatchingDiffrentRequestQuantity
|
||||
with _$LastHatchingDiffrentRequestQuantity {
|
||||
const factory LastHatchingDiffrentRequestQuantity({
|
||||
dynamic leftExportQuantity,
|
||||
double? leftPoultryOutProvince,
|
||||
int? lastHatchingRemainQuantity,
|
||||
}) = _LastHatchingDiffrentRequestQuantity;
|
||||
|
||||
factory LastHatchingDiffrentRequestQuantity.fromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$LastHatchingDiffrentRequestQuantityFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class UserBankInfo with _$UserBankInfo {
|
||||
const factory UserBankInfo({
|
||||
String? key,
|
||||
String? nameOfBankUser,
|
||||
String? bankName,
|
||||
String? card,
|
||||
String? shaba,
|
||||
String? account,
|
||||
int? userBankIdKey,
|
||||
String? provinceName,
|
||||
}) = _UserBankInfo;
|
||||
|
||||
factory UserBankInfo.fromJson(Map<String, dynamic> json) =>
|
||||
_$UserBankInfoFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class ChainCompany with _$ChainCompany {
|
||||
const factory ChainCompany({
|
||||
ChainUser? user,
|
||||
dynamic userBankInfo,
|
||||
String? key,
|
||||
bool? trash,
|
||||
String? name,
|
||||
dynamic city,
|
||||
dynamic province,
|
||||
dynamic postalCode,
|
||||
dynamic address,
|
||||
int? wallet,
|
||||
}) = _ChainCompany;
|
||||
|
||||
factory ChainCompany.fromJson(Map<String, dynamic> json) =>
|
||||
_$ChainCompanyFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class ChainUser with _$ChainUser {
|
||||
const factory ChainUser({
|
||||
List<String>? role,
|
||||
String? city,
|
||||
String? province,
|
||||
String? key,
|
||||
String? userGateWayId,
|
||||
dynamic userDjangoIdForeignKey,
|
||||
dynamic provinceIdForeignKey,
|
||||
dynamic cityIdForeignKey,
|
||||
dynamic systemUserProfileIdKey,
|
||||
String? fullname,
|
||||
String? firstName,
|
||||
String? lastName,
|
||||
dynamic nationalCode,
|
||||
dynamic nationalCodeImage,
|
||||
String? nationalId,
|
||||
String? mobile,
|
||||
dynamic birthday,
|
||||
dynamic image,
|
||||
String? password,
|
||||
bool? active,
|
||||
ChainUserState? state,
|
||||
int? baseOrder,
|
||||
int? cityNumber,
|
||||
String? cityName,
|
||||
int? provinceNumber,
|
||||
String? provinceName,
|
||||
String? unitName,
|
||||
String? unitNationalId,
|
||||
String? unitRegistrationNumber,
|
||||
String? unitEconomicalNumber,
|
||||
String? unitProvince,
|
||||
String? unitCity,
|
||||
String? unitPostalCode,
|
||||
String? unitAddress,
|
||||
}) = _ChainUser;
|
||||
|
||||
factory ChainUser.fromJson(Map<String, dynamic> json) =>
|
||||
_$ChainUserFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class ChainUserState with _$ChainUserState {
|
||||
const factory ChainUserState({
|
||||
String? city,
|
||||
String? image,
|
||||
String? mobile,
|
||||
String? birthday,
|
||||
String? province,
|
||||
String? lastName,
|
||||
String? firstName,
|
||||
String? nationalId,
|
||||
String? nationalCode,
|
||||
}) = _ChainUserState;
|
||||
|
||||
factory ChainUserState.fromJson(Map<String, dynamic> json) =>
|
||||
_$ChainUserStateFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class ActiveKill with _$ActiveKill {
|
||||
const factory ActiveKill({
|
||||
bool? activeKill,
|
||||
int? countOfRequest,
|
||||
}) = _ActiveKill;
|
||||
|
||||
factory ActiveKill.fromJson(Map<String, dynamic> json) =>
|
||||
_$ActiveKillFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class KillingInfo with _$KillingInfo {
|
||||
const factory KillingInfo({
|
||||
String? violationMessage,
|
||||
int? provinceKillRequests,
|
||||
int? provinceKillRequestsQuantity,
|
||||
double? provinceKillRequestsWeight,
|
||||
int? killHouseRequests,
|
||||
int? killHouseRequestsFirstQuantity,
|
||||
double? killHouseRequestsFirstWeight,
|
||||
int? barCompleteWithKillHouse,
|
||||
int? acceptedRealQuantityFinal,
|
||||
double? acceptedRealWightFinal,
|
||||
int? wareHouseBars,
|
||||
int? wareHouseBarsQuantity,
|
||||
double? wareHouseBarsWeight,
|
||||
double? wareHouseBarsWeightLose,
|
||||
}) = _KillingInfo;
|
||||
|
||||
factory KillingInfo.fromJson(Map<String, dynamic> json) =>
|
||||
_$KillingInfoFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class FreeGovernmentalInfo with _$FreeGovernmentalInfo {
|
||||
const factory FreeGovernmentalInfo({
|
||||
int? governmentalAllocatedQuantity,
|
||||
double? totalCommitmentQuantity,
|
||||
int? freeAllocatedQuantity,
|
||||
double? totalFreeCommitmentQuantity,
|
||||
int? leftTotalFreeCommitmentQuantity,
|
||||
}) = _FreeGovernmentalInfo;
|
||||
|
||||
factory FreeGovernmentalInfo.fromJson(Map<String, dynamic> json) =>
|
||||
_$FreeGovernmentalInfoFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class ManagementHatchingAgeRange with _$ManagementHatchingAgeRange {
|
||||
const factory ManagementHatchingAgeRange({
|
||||
double? fromWeight,
|
||||
double? toWeight,
|
||||
}) = _ManagementHatchingAgeRange;
|
||||
|
||||
factory ManagementHatchingAgeRange.fromJson(Map<String, dynamic> json) =>
|
||||
_$ManagementHatchingAgeRangeFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class Registrar with _$Registrar {
|
||||
const factory Registrar({
|
||||
String? date,
|
||||
String? role,
|
||||
String? fullname,
|
||||
}) = _Registrar;
|
||||
|
||||
factory Registrar.fromJson(Map<String, dynamic> json) =>
|
||||
_$RegistrarFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class Breed with _$Breed {
|
||||
const factory Breed({
|
||||
String? breed,
|
||||
int? mainQuantity,
|
||||
int? remainQuantity,
|
||||
}) = _Breed;
|
||||
|
||||
factory Breed.fromJson(Map<String, dynamic> json) => _$BreedFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class LastChange with _$LastChange {
|
||||
const factory LastChange({
|
||||
String? date,
|
||||
String? role,
|
||||
String? type,
|
||||
String? fullName,
|
||||
}) = _LastChange;
|
||||
|
||||
factory LastChange.fromJson(Map<String, dynamic> json) =>
|
||||
_$LastChangeFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class LatestHatchingChange with _$LatestHatchingChange {
|
||||
const factory LatestHatchingChange({
|
||||
String? date,
|
||||
String? role,
|
||||
String? fullName,
|
||||
}) = _LatestHatchingChange;
|
||||
|
||||
factory LatestHatchingChange.fromJson(Map<String, dynamic> json) =>
|
||||
_$LatestHatchingChangeFromJson(json);
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,929 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'poultry_hatching.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_PoultryHatching _$PoultryHatchingFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _PoultryHatching(
|
||||
id: (json['id'] as num?)?.toInt(),
|
||||
poultry: json['poultry'] == null
|
||||
? null
|
||||
: Poultry.fromJson(json['poultry'] as Map<String, dynamic>),
|
||||
chainCompany: json['chain_company'] == null
|
||||
? null
|
||||
: ChainCompany.fromJson(json['chain_company'] as Map<String, dynamic>),
|
||||
age: (json['age'] as num?)?.toInt(),
|
||||
inspectionLosses: json['inspection_losses'],
|
||||
vetFarm: json['vet_farm'] == null
|
||||
? null
|
||||
: VetFarm.fromJson(json['vet_farm'] as Map<String, dynamic>),
|
||||
activeKill: json['active_kill'] == null
|
||||
? null
|
||||
: ActiveKill.fromJson(json['active_kill'] as Map<String, dynamic>),
|
||||
killingInfo: json['killing_info'] == null
|
||||
? null
|
||||
: KillingInfo.fromJson(json['killing_info'] as Map<String, dynamic>),
|
||||
freeGovernmentalInfo: json['free_governmental_info'] == null
|
||||
? null
|
||||
: FreeGovernmentalInfo.fromJson(
|
||||
json['free_governmental_info'] as Map<String, dynamic>,
|
||||
),
|
||||
managementHatchingAgeRange: json['management_hatching_age_range'] == null
|
||||
? null
|
||||
: ManagementHatchingAgeRange.fromJson(
|
||||
json['management_hatching_age_range'] 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?,
|
||||
hasChainCompany: json['has_chain_company'] as bool?,
|
||||
poultryIdForeignKey: json['poultry_id_foreign_key'],
|
||||
poultryHatchingIdKey: json['poultry_hatching_id_key'],
|
||||
quantity: (json['quantity'] as num?)?.toInt(),
|
||||
losses: (json['losses'] as num?)?.toInt(),
|
||||
leftOver: (json['left_over'] as num?)?.toInt(),
|
||||
killedQuantity: (json['killed_quantity'] as num?)?.toInt(),
|
||||
extraKilledQuantity: (json['extra_killed_quantity'] as num?)?.toInt(),
|
||||
governmentalKilledQuantity: (json['governmental_killed_quantity'] as num?)
|
||||
?.toDouble(),
|
||||
governmentalQuantity: (json['governmental_quantity'] as num?)?.toDouble(),
|
||||
freeKilledQuantity: (json['free_killed_quantity'] as num?)?.toDouble(),
|
||||
freeQuantity: (json['free_quantity'] as num?)?.toDouble(),
|
||||
chainKilledQuantity: (json['chain_killed_quantity'] as num?)?.toDouble(),
|
||||
chainKilledWeight: (json['chain_killed_weight'] as num?)?.toDouble(),
|
||||
outProvinceKilledWeight: (json['out_province_killed_weight'] as num?)
|
||||
?.toDouble(),
|
||||
outProvinceKilledQuantity: (json['out_province_killed_quantity'] as num?)
|
||||
?.toDouble(),
|
||||
exportKilledWeight: (json['export_killed_weight'] as num?)?.toDouble(),
|
||||
exportKilledQuantity: (json['export_killed_quantity'] as num?)?.toDouble(),
|
||||
totalCommitment: (json['total_commitment'] as num?)?.toDouble(),
|
||||
commitmentType: json['commitment_type'] as String?,
|
||||
totalCommitmentQuantity: (json['total_commitment_quantity'] as num?)
|
||||
?.toDouble(),
|
||||
totalFreeCommitmentQuantity: (json['total_free_commitment_quantity'] as num?)
|
||||
?.toDouble(),
|
||||
totalFreeCommitmentWeight: (json['total_free_commitment_weight'] as num?)
|
||||
?.toDouble(),
|
||||
totalKilledWeight: (json['total_killed_weight'] as num?)?.toDouble(),
|
||||
totalAverageKilledWeight: (json['total_average_killed_weight'] as num?)
|
||||
?.toDouble(),
|
||||
requestLeftOver: (json['request_left_over'] as num?)?.toInt(),
|
||||
hall: (json['hall'] as num?)?.toInt(),
|
||||
date: json['date'] as String?,
|
||||
predicateDate: json['predicate_date'],
|
||||
chickenBreed: json['chicken_breed'] as String?,
|
||||
period: (json['period'] as num?)?.toInt(),
|
||||
allowHatching: json['allow_hatching'] as String?,
|
||||
state: json['state'] as String?,
|
||||
archive: json['archive'] as bool?,
|
||||
violation: json['violation'] as bool?,
|
||||
message: json['message'],
|
||||
registrar: json['registrar'] == null
|
||||
? null
|
||||
: Registrar.fromJson(json['registrar'] as Map<String, dynamic>),
|
||||
breed: (json['breed'] as List<dynamic>?)
|
||||
?.map((e) => Breed.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
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?,
|
||||
lastChange: json['last_change'] == null
|
||||
? null
|
||||
: LastChange.fromJson(json['last_change'] as Map<String, dynamic>),
|
||||
chickenAge: (json['chicken_age'] as num?)?.toInt(),
|
||||
nowAge: (json['now_age'] as num?)?.toInt(),
|
||||
latestHatchingChange: json['latest_hatching_change'] == null
|
||||
? null
|
||||
: LatestHatchingChange.fromJson(
|
||||
json['latest_hatching_change'] as Map<String, dynamic>,
|
||||
),
|
||||
violationReport: json['violation_report'] as String?,
|
||||
violationMessage: json['violation_message'] as String?,
|
||||
violationImage: (json['violation_image'] as List<dynamic>?)
|
||||
?.map((e) => e as String)
|
||||
.toList(),
|
||||
violationReporter: json['violation_reporter'] as String?,
|
||||
violationReportDate: json['violation_report_date'] as String?,
|
||||
violationReportEditor: json['violation_report_editor'] as String?,
|
||||
violationReportEditDate: json['violation_report_edit_date'] as String?,
|
||||
totalLosses: (json['total_losses'] as num?)?.toInt(),
|
||||
directLosses: (json['direct_losses'] as num?)?.toInt(),
|
||||
directLossesInputer: json['direct_losses_inputer'] as String?,
|
||||
directLossesDate: json['direct_losses_date'] as String?,
|
||||
directLossesEditor: json['direct_losses_editor'] as String?,
|
||||
directLossesLastEditDate: json['direct_losses_last_edit_date'] as String?,
|
||||
endPeriodLossesInputer: json['end_period_losses_inputer'] as String?,
|
||||
endPeriodLossesDate: json['end_period_losses_date'] as String?,
|
||||
endPeriodLossesEditor: json['end_period_losses_editor'] as String?,
|
||||
endPeriodLossesLastEditDate:
|
||||
json['end_period_losses_last_edit_date'] as String?,
|
||||
breedingUniqueId: json['breeding_unique_id'] as String?,
|
||||
licenceNumber: json['licence_number'] as String?,
|
||||
temporaryTrash: json['temporary_trash'] as bool?,
|
||||
temporaryDeleted: json['temporary_deleted'] as bool?,
|
||||
firstDateInputArchive: json['first_date_input_archive'],
|
||||
secondDateInputArchive: json['second_date_input_archive'],
|
||||
inputArchiver: json['input_archiver'],
|
||||
outputArchiveDate: json['output_archive_date'],
|
||||
outputArchiver: json['output_archiver'],
|
||||
barDifferenceRequestWeight: (json['bar_difference_request_weight'] as num?)
|
||||
?.toDouble(),
|
||||
barDifferenceRequestQuantity:
|
||||
(json['bar_difference_request_quantity'] as num?)?.toDouble(),
|
||||
healthCertificate: json['health_certificate'],
|
||||
samasatDischargePercentage: (json['samasat_discharge_percentage'] as num?)
|
||||
?.toInt(),
|
||||
personTypeName: json['person_type_name'],
|
||||
interactTypeName: json['interact_type_name'] as String?,
|
||||
unionTypeName: json['union_type_name'],
|
||||
certId: json['cert_id'],
|
||||
increaseQuantity: (json['increase_quantity'] as num?)?.toInt(),
|
||||
tenantFullname: json['tenant_fullname'] as String?,
|
||||
tenantNationalCode: json['tenant_national_code'] as String?,
|
||||
tenantMobile: json['tenant_mobile'] as String?,
|
||||
tenantCity: json['tenant_city'] as String?,
|
||||
hasTenant: json['has_tenant'] as bool?,
|
||||
archiveDate: json['archive_date'],
|
||||
createdBy: json['created_by'],
|
||||
modifiedBy: json['modified_by'],
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$PoultryHatchingToJson(_PoultryHatching instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'poultry': instance.poultry,
|
||||
'chain_company': instance.chainCompany,
|
||||
'age': instance.age,
|
||||
'inspection_losses': instance.inspectionLosses,
|
||||
'vet_farm': instance.vetFarm,
|
||||
'active_kill': instance.activeKill,
|
||||
'killing_info': instance.killingInfo,
|
||||
'free_governmental_info': instance.freeGovernmentalInfo,
|
||||
'management_hatching_age_range': instance.managementHatchingAgeRange,
|
||||
'key': instance.key,
|
||||
'create_date': instance.createDate,
|
||||
'modify_date': instance.modifyDate,
|
||||
'trash': instance.trash,
|
||||
'has_chain_company': instance.hasChainCompany,
|
||||
'poultry_id_foreign_key': instance.poultryIdForeignKey,
|
||||
'poultry_hatching_id_key': instance.poultryHatchingIdKey,
|
||||
'quantity': instance.quantity,
|
||||
'losses': instance.losses,
|
||||
'left_over': instance.leftOver,
|
||||
'killed_quantity': instance.killedQuantity,
|
||||
'extra_killed_quantity': instance.extraKilledQuantity,
|
||||
'governmental_killed_quantity': instance.governmentalKilledQuantity,
|
||||
'governmental_quantity': instance.governmentalQuantity,
|
||||
'free_killed_quantity': instance.freeKilledQuantity,
|
||||
'free_quantity': instance.freeQuantity,
|
||||
'chain_killed_quantity': instance.chainKilledQuantity,
|
||||
'chain_killed_weight': instance.chainKilledWeight,
|
||||
'out_province_killed_weight': instance.outProvinceKilledWeight,
|
||||
'out_province_killed_quantity': instance.outProvinceKilledQuantity,
|
||||
'export_killed_weight': instance.exportKilledWeight,
|
||||
'export_killed_quantity': instance.exportKilledQuantity,
|
||||
'total_commitment': instance.totalCommitment,
|
||||
'commitment_type': instance.commitmentType,
|
||||
'total_commitment_quantity': instance.totalCommitmentQuantity,
|
||||
'total_free_commitment_quantity': instance.totalFreeCommitmentQuantity,
|
||||
'total_free_commitment_weight': instance.totalFreeCommitmentWeight,
|
||||
'total_killed_weight': instance.totalKilledWeight,
|
||||
'total_average_killed_weight': instance.totalAverageKilledWeight,
|
||||
'request_left_over': instance.requestLeftOver,
|
||||
'hall': instance.hall,
|
||||
'date': instance.date,
|
||||
'predicate_date': instance.predicateDate,
|
||||
'chicken_breed': instance.chickenBreed,
|
||||
'period': instance.period,
|
||||
'allow_hatching': instance.allowHatching,
|
||||
'state': instance.state,
|
||||
'archive': instance.archive,
|
||||
'violation': instance.violation,
|
||||
'message': instance.message,
|
||||
'registrar': instance.registrar,
|
||||
'breed': instance.breed,
|
||||
'city_number': instance.cityNumber,
|
||||
'city_name': instance.cityName,
|
||||
'province_number': instance.provinceNumber,
|
||||
'province_name': instance.provinceName,
|
||||
'last_change': instance.lastChange,
|
||||
'chicken_age': instance.chickenAge,
|
||||
'now_age': instance.nowAge,
|
||||
'latest_hatching_change': instance.latestHatchingChange,
|
||||
'violation_report': instance.violationReport,
|
||||
'violation_message': instance.violationMessage,
|
||||
'violation_image': instance.violationImage,
|
||||
'violation_reporter': instance.violationReporter,
|
||||
'violation_report_date': instance.violationReportDate,
|
||||
'violation_report_editor': instance.violationReportEditor,
|
||||
'violation_report_edit_date': instance.violationReportEditDate,
|
||||
'total_losses': instance.totalLosses,
|
||||
'direct_losses': instance.directLosses,
|
||||
'direct_losses_inputer': instance.directLossesInputer,
|
||||
'direct_losses_date': instance.directLossesDate,
|
||||
'direct_losses_editor': instance.directLossesEditor,
|
||||
'direct_losses_last_edit_date': instance.directLossesLastEditDate,
|
||||
'end_period_losses_inputer': instance.endPeriodLossesInputer,
|
||||
'end_period_losses_date': instance.endPeriodLossesDate,
|
||||
'end_period_losses_editor': instance.endPeriodLossesEditor,
|
||||
'end_period_losses_last_edit_date': instance.endPeriodLossesLastEditDate,
|
||||
'breeding_unique_id': instance.breedingUniqueId,
|
||||
'licence_number': instance.licenceNumber,
|
||||
'temporary_trash': instance.temporaryTrash,
|
||||
'temporary_deleted': instance.temporaryDeleted,
|
||||
'first_date_input_archive': instance.firstDateInputArchive,
|
||||
'second_date_input_archive': instance.secondDateInputArchive,
|
||||
'input_archiver': instance.inputArchiver,
|
||||
'output_archive_date': instance.outputArchiveDate,
|
||||
'output_archiver': instance.outputArchiver,
|
||||
'bar_difference_request_weight': instance.barDifferenceRequestWeight,
|
||||
'bar_difference_request_quantity': instance.barDifferenceRequestQuantity,
|
||||
'health_certificate': instance.healthCertificate,
|
||||
'samasat_discharge_percentage': instance.samasatDischargePercentage,
|
||||
'person_type_name': instance.personTypeName,
|
||||
'interact_type_name': instance.interactTypeName,
|
||||
'union_type_name': instance.unionTypeName,
|
||||
'cert_id': instance.certId,
|
||||
'increase_quantity': instance.increaseQuantity,
|
||||
'tenant_fullname': instance.tenantFullname,
|
||||
'tenant_national_code': instance.tenantNationalCode,
|
||||
'tenant_mobile': instance.tenantMobile,
|
||||
'tenant_city': instance.tenantCity,
|
||||
'has_tenant': instance.hasTenant,
|
||||
'archive_date': instance.archiveDate,
|
||||
'created_by': instance.createdBy,
|
||||
'modified_by': instance.modifiedBy,
|
||||
};
|
||||
|
||||
_Poultry _$PoultryFromJson(Map<String, dynamic> json) => _Poultry(
|
||||
userprofile: json['userprofile'] == null
|
||||
? null
|
||||
: UserProfile.fromJson(json['userprofile'] as Map<String, dynamic>),
|
||||
address: json['address'] == null
|
||||
? null
|
||||
: Address.fromJson(json['address'] as Map<String, dynamic>),
|
||||
poultryOwner: json['poultry_owner'],
|
||||
poultryTenant: json['poultry_tenant'] == null
|
||||
? null
|
||||
: PoultryTenant.fromJson(json['poultry_tenant'] as Map<String, dynamic>),
|
||||
hatching: (json['hatching'] as List<dynamic>?)
|
||||
?.map((e) => Hatching.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
registerVetHalls: (json['register_vet_halls'] as List<dynamic>?)
|
||||
?.map((e) => (e as num).toInt())
|
||||
.toList(),
|
||||
allow: json['allow'] == null
|
||||
? null
|
||||
: Allow.fromJson(json['allow'] as Map<String, dynamic>),
|
||||
provinceAllowChooseKillHouse: json['province_allow_choose_kill_house'] == null
|
||||
? null
|
||||
: ProvinceAllowChooseKillHouse.fromJson(
|
||||
json['province_allow_choose_kill_house'] as Map<String, dynamic>,
|
||||
),
|
||||
provinceAllowSellFree: json['province_allow_sell_free'] as bool?,
|
||||
vetFarm: json['vet_farm'] == null
|
||||
? null
|
||||
: VetFarm.fromJson(json['vet_farm'] as Map<String, dynamic>),
|
||||
lastHatchingDiffrentRequestQuantity:
|
||||
json['last_hatching_diffrent_request_quantity'] == null
|
||||
? null
|
||||
: LastHatchingDiffrentRequestQuantity.fromJson(
|
||||
json['last_hatching_diffrent_request_quantity']
|
||||
as Map<String, dynamic>,
|
||||
),
|
||||
userBankInfo: json['user_bank_info'] == null
|
||||
? null
|
||||
: UserBankInfo.fromJson(json['user_bank_info'] as Map<String, dynamic>),
|
||||
leftOverOwnHatching: (json['left_over_own_hatching'] as num?)?.toInt(),
|
||||
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'] as String?,
|
||||
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'],
|
||||
wallet: (json['wallet'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$PoultryToJson(_Poultry instance) => <String, dynamic>{
|
||||
'userprofile': instance.userprofile,
|
||||
'address': instance.address,
|
||||
'poultry_owner': instance.poultryOwner,
|
||||
'poultry_tenant': instance.poultryTenant,
|
||||
'hatching': instance.hatching,
|
||||
'register_vet_halls': instance.registerVetHalls,
|
||||
'allow': instance.allow,
|
||||
'province_allow_choose_kill_house': instance.provinceAllowChooseKillHouse,
|
||||
'province_allow_sell_free': instance.provinceAllowSellFree,
|
||||
'vet_farm': instance.vetFarm,
|
||||
'last_hatching_diffrent_request_quantity':
|
||||
instance.lastHatchingDiffrentRequestQuantity,
|
||||
'user_bank_info': instance.userBankInfo,
|
||||
'left_over_own_hatching': instance.leftOverOwnHatching,
|
||||
'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,
|
||||
'wallet': instance.wallet,
|
||||
};
|
||||
|
||||
_UserProfile _$UserProfileFromJson(Map<String, dynamic> json) => _UserProfile(
|
||||
userKey: json['user_key'] as String?,
|
||||
baseOrder: (json['base_order'] as num?)?.toInt(),
|
||||
fullName: json['full_name'] as String?,
|
||||
mobile: json['mobile'] as String?,
|
||||
city: json['city'] as String?,
|
||||
province: json['province'] as String?,
|
||||
breedingUniqueId: json['breeding_unique_id'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$UserProfileToJson(_UserProfile instance) =>
|
||||
<String, dynamic>{
|
||||
'user_key': instance.userKey,
|
||||
'base_order': instance.baseOrder,
|
||||
'full_name': instance.fullName,
|
||||
'mobile': instance.mobile,
|
||||
'city': instance.city,
|
||||
'province': instance.province,
|
||||
'breeding_unique_id': instance.breedingUniqueId,
|
||||
};
|
||||
|
||||
_Address _$AddressFromJson(Map<String, dynamic> json) => _Address(
|
||||
province: json['province'] == null
|
||||
? null
|
||||
: Province.fromJson(json['province'] as Map<String, dynamic>),
|
||||
city: json['city'] == null
|
||||
? null
|
||||
: City.fromJson(json['city'] as Map<String, dynamic>),
|
||||
address: json['address'] as String?,
|
||||
postalCode: json['postal_code'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$AddressToJson(_Address instance) => <String, dynamic>{
|
||||
'province': instance.province,
|
||||
'city': instance.city,
|
||||
'address': instance.address,
|
||||
'postal_code': instance.postalCode,
|
||||
};
|
||||
|
||||
_Province _$ProvinceFromJson(Map<String, dynamic> json) =>
|
||||
_Province(key: json['key'] as String?, name: json['name'] as String?);
|
||||
|
||||
Map<String, dynamic> _$ProvinceToJson(_Province instance) => <String, dynamic>{
|
||||
'key': instance.key,
|
||||
'name': instance.name,
|
||||
};
|
||||
|
||||
_City _$CityFromJson(Map<String, dynamic> json) =>
|
||||
_City(key: json['key'] as String?, name: json['name'] as String?);
|
||||
|
||||
Map<String, dynamic> _$CityToJson(_City instance) => <String, dynamic>{
|
||||
'key': instance.key,
|
||||
'name': instance.name,
|
||||
};
|
||||
|
||||
_PoultryTenant _$PoultryTenantFromJson(Map<String, dynamic> json) =>
|
||||
_PoultryTenant(
|
||||
key: json['key'] as String?,
|
||||
firstName: json['first_name'] as String?,
|
||||
lastName: json['last_name'] as String?,
|
||||
fullName: json['full_name'] as String?,
|
||||
mobile: json['mobile'] as String?,
|
||||
nationalId: json['national_id'] as String?,
|
||||
breedingUniqueId: json['breeding_unique_id'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$PoultryTenantToJson(_PoultryTenant instance) =>
|
||||
<String, dynamic>{
|
||||
'key': instance.key,
|
||||
'first_name': instance.firstName,
|
||||
'last_name': instance.lastName,
|
||||
'full_name': instance.fullName,
|
||||
'mobile': instance.mobile,
|
||||
'national_id': instance.nationalId,
|
||||
'breeding_unique_id': instance.breedingUniqueId,
|
||||
};
|
||||
|
||||
_Hatching _$HatchingFromJson(Map<String, dynamic> json) => _Hatching(
|
||||
poultryKey: json['poultry_key'] as String?,
|
||||
poultryHatchingKey: json['poultry_hatching_key'] as String?,
|
||||
poultry: json['poultry'] as String?,
|
||||
quantity: (json['quantity'] as num?)?.toInt(),
|
||||
losses: (json['losses'] as num?)?.toInt(),
|
||||
leftOver: (json['left_over'] as num?)?.toInt(),
|
||||
outProvinceKilledQuantity: (json['out_province_killed_quantity'] as num?)
|
||||
?.toDouble(),
|
||||
exportKilledQuantity: (json['export_killed_quantity'] as num?)?.toDouble(),
|
||||
hall: (json['hall'] as num?)?.toInt(),
|
||||
date: json['date'] as String?,
|
||||
period: (json['period'] as num?)?.toInt(),
|
||||
state: json['state'] as String?,
|
||||
age: (json['age'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$HatchingToJson(_Hatching instance) => <String, dynamic>{
|
||||
'poultry_key': instance.poultryKey,
|
||||
'poultry_hatching_key': instance.poultryHatchingKey,
|
||||
'poultry': instance.poultry,
|
||||
'quantity': instance.quantity,
|
||||
'losses': instance.losses,
|
||||
'left_over': instance.leftOver,
|
||||
'out_province_killed_quantity': instance.outProvinceKilledQuantity,
|
||||
'export_killed_quantity': instance.exportKilledQuantity,
|
||||
'hall': instance.hall,
|
||||
'date': instance.date,
|
||||
'period': instance.period,
|
||||
'state': instance.state,
|
||||
'age': instance.age,
|
||||
};
|
||||
|
||||
_Allow _$AllowFromJson(Map<String, dynamic> json) =>
|
||||
_Allow(city: json['city'] as bool?, province: json['province'] as bool?);
|
||||
|
||||
Map<String, dynamic> _$AllowToJson(_Allow instance) => <String, dynamic>{
|
||||
'city': instance.city,
|
||||
'province': instance.province,
|
||||
};
|
||||
|
||||
_ProvinceAllowChooseKillHouse _$ProvinceAllowChooseKillHouseFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _ProvinceAllowChooseKillHouse(
|
||||
allowState: json['allow_state'] as bool?,
|
||||
mandatory: json['mandatory'] as bool?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ProvinceAllowChooseKillHouseToJson(
|
||||
_ProvinceAllowChooseKillHouse instance,
|
||||
) => <String, dynamic>{
|
||||
'allow_state': instance.allowState,
|
||||
'mandatory': instance.mandatory,
|
||||
};
|
||||
|
||||
_VetFarm _$VetFarmFromJson(Map<String, dynamic> json) => _VetFarm(
|
||||
fullName: json['full_name'] as String?,
|
||||
mobile: json['mobile'] as String?,
|
||||
city: json['city'] as String?,
|
||||
province: json['province'] as String?,
|
||||
vetFarmFullName: json['vet_farm_full_name'] as String?,
|
||||
vetFarmMobile: json['vet_farm_mobile'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$VetFarmToJson(_VetFarm instance) => <String, dynamic>{
|
||||
'full_name': instance.fullName,
|
||||
'mobile': instance.mobile,
|
||||
'city': instance.city,
|
||||
'province': instance.province,
|
||||
'vet_farm_full_name': instance.vetFarmFullName,
|
||||
'vet_farm_mobile': instance.vetFarmMobile,
|
||||
};
|
||||
|
||||
_LastHatchingDiffrentRequestQuantity
|
||||
_$LastHatchingDiffrentRequestQuantityFromJson(Map<String, dynamic> json) =>
|
||||
_LastHatchingDiffrentRequestQuantity(
|
||||
leftExportQuantity: json['left_export_quantity'],
|
||||
leftPoultryOutProvince: (json['left_poultry_out_province'] as num?)
|
||||
?.toDouble(),
|
||||
lastHatchingRemainQuantity:
|
||||
(json['last_hatching_remain_quantity'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$LastHatchingDiffrentRequestQuantityToJson(
|
||||
_LastHatchingDiffrentRequestQuantity instance,
|
||||
) => <String, dynamic>{
|
||||
'left_export_quantity': instance.leftExportQuantity,
|
||||
'left_poultry_out_province': instance.leftPoultryOutProvince,
|
||||
'last_hatching_remain_quantity': instance.lastHatchingRemainQuantity,
|
||||
};
|
||||
|
||||
_UserBankInfo _$UserBankInfoFromJson(Map<String, dynamic> json) =>
|
||||
_UserBankInfo(
|
||||
key: json['key'] as String?,
|
||||
nameOfBankUser: json['name_of_bank_user'] as String?,
|
||||
bankName: json['bank_name'] as String?,
|
||||
card: json['card'] as String?,
|
||||
shaba: json['shaba'] as String?,
|
||||
account: json['account'] as String?,
|
||||
userBankIdKey: (json['user_bank_id_key'] as num?)?.toInt(),
|
||||
provinceName: json['province_name'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$UserBankInfoToJson(_UserBankInfo instance) =>
|
||||
<String, dynamic>{
|
||||
'key': instance.key,
|
||||
'name_of_bank_user': instance.nameOfBankUser,
|
||||
'bank_name': instance.bankName,
|
||||
'card': instance.card,
|
||||
'shaba': instance.shaba,
|
||||
'account': instance.account,
|
||||
'user_bank_id_key': instance.userBankIdKey,
|
||||
'province_name': instance.provinceName,
|
||||
};
|
||||
|
||||
_ChainCompany _$ChainCompanyFromJson(Map<String, dynamic> json) =>
|
||||
_ChainCompany(
|
||||
user: json['user'] == null
|
||||
? null
|
||||
: ChainUser.fromJson(json['user'] as Map<String, dynamic>),
|
||||
userBankInfo: json['user_bank_info'],
|
||||
key: json['key'] as String?,
|
||||
trash: json['trash'] as bool?,
|
||||
name: json['name'] as String?,
|
||||
city: json['city'],
|
||||
province: json['province'],
|
||||
postalCode: json['postal_code'],
|
||||
address: json['address'],
|
||||
wallet: (json['wallet'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ChainCompanyToJson(_ChainCompany instance) =>
|
||||
<String, dynamic>{
|
||||
'user': instance.user,
|
||||
'user_bank_info': instance.userBankInfo,
|
||||
'key': instance.key,
|
||||
'trash': instance.trash,
|
||||
'name': instance.name,
|
||||
'city': instance.city,
|
||||
'province': instance.province,
|
||||
'postal_code': instance.postalCode,
|
||||
'address': instance.address,
|
||||
'wallet': instance.wallet,
|
||||
};
|
||||
|
||||
_ChainUser _$ChainUserFromJson(Map<String, dynamic> json) => _ChainUser(
|
||||
role: (json['role'] as List<dynamic>?)?.map((e) => e as String).toList(),
|
||||
city: json['city'] as String?,
|
||||
province: json['province'] as String?,
|
||||
key: json['key'] as String?,
|
||||
userGateWayId: json['user_gate_way_id'] as String?,
|
||||
userDjangoIdForeignKey: json['user_django_id_foreign_key'],
|
||||
provinceIdForeignKey: json['province_id_foreign_key'],
|
||||
cityIdForeignKey: json['city_id_foreign_key'],
|
||||
systemUserProfileIdKey: json['system_user_profile_id_key'],
|
||||
fullname: json['fullname'] as String?,
|
||||
firstName: json['first_name'] as String?,
|
||||
lastName: json['last_name'] as String?,
|
||||
nationalCode: json['national_code'],
|
||||
nationalCodeImage: json['national_code_image'],
|
||||
nationalId: json['national_id'] as String?,
|
||||
mobile: json['mobile'] as String?,
|
||||
birthday: json['birthday'],
|
||||
image: json['image'],
|
||||
password: json['password'] as String?,
|
||||
active: json['active'] as bool?,
|
||||
state: json['state'] == null
|
||||
? null
|
||||
: ChainUserState.fromJson(json['state'] as Map<String, dynamic>),
|
||||
baseOrder: (json['base_order'] 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?,
|
||||
unitName: json['unit_name'] as String?,
|
||||
unitNationalId: json['unit_national_id'] as String?,
|
||||
unitRegistrationNumber: json['unit_registration_number'] as String?,
|
||||
unitEconomicalNumber: json['unit_economical_number'] as String?,
|
||||
unitProvince: json['unit_province'] as String?,
|
||||
unitCity: json['unit_city'] as String?,
|
||||
unitPostalCode: json['unit_postal_code'] as String?,
|
||||
unitAddress: json['unit_address'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ChainUserToJson(_ChainUser instance) =>
|
||||
<String, dynamic>{
|
||||
'role': instance.role,
|
||||
'city': instance.city,
|
||||
'province': instance.province,
|
||||
'key': instance.key,
|
||||
'user_gate_way_id': instance.userGateWayId,
|
||||
'user_django_id_foreign_key': instance.userDjangoIdForeignKey,
|
||||
'province_id_foreign_key': instance.provinceIdForeignKey,
|
||||
'city_id_foreign_key': instance.cityIdForeignKey,
|
||||
'system_user_profile_id_key': instance.systemUserProfileIdKey,
|
||||
'fullname': instance.fullname,
|
||||
'first_name': instance.firstName,
|
||||
'last_name': instance.lastName,
|
||||
'national_code': instance.nationalCode,
|
||||
'national_code_image': instance.nationalCodeImage,
|
||||
'national_id': instance.nationalId,
|
||||
'mobile': instance.mobile,
|
||||
'birthday': instance.birthday,
|
||||
'image': instance.image,
|
||||
'password': instance.password,
|
||||
'active': instance.active,
|
||||
'state': instance.state,
|
||||
'base_order': instance.baseOrder,
|
||||
'city_number': instance.cityNumber,
|
||||
'city_name': instance.cityName,
|
||||
'province_number': instance.provinceNumber,
|
||||
'province_name': instance.provinceName,
|
||||
'unit_name': instance.unitName,
|
||||
'unit_national_id': instance.unitNationalId,
|
||||
'unit_registration_number': instance.unitRegistrationNumber,
|
||||
'unit_economical_number': instance.unitEconomicalNumber,
|
||||
'unit_province': instance.unitProvince,
|
||||
'unit_city': instance.unitCity,
|
||||
'unit_postal_code': instance.unitPostalCode,
|
||||
'unit_address': instance.unitAddress,
|
||||
};
|
||||
|
||||
_ChainUserState _$ChainUserStateFromJson(Map<String, dynamic> json) =>
|
||||
_ChainUserState(
|
||||
city: json['city'] as String?,
|
||||
image: json['image'] as String?,
|
||||
mobile: json['mobile'] as String?,
|
||||
birthday: json['birthday'] as String?,
|
||||
province: json['province'] as String?,
|
||||
lastName: json['last_name'] as String?,
|
||||
firstName: json['first_name'] as String?,
|
||||
nationalId: json['national_id'] as String?,
|
||||
nationalCode: json['national_code'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ChainUserStateToJson(_ChainUserState instance) =>
|
||||
<String, dynamic>{
|
||||
'city': instance.city,
|
||||
'image': instance.image,
|
||||
'mobile': instance.mobile,
|
||||
'birthday': instance.birthday,
|
||||
'province': instance.province,
|
||||
'last_name': instance.lastName,
|
||||
'first_name': instance.firstName,
|
||||
'national_id': instance.nationalId,
|
||||
'national_code': instance.nationalCode,
|
||||
};
|
||||
|
||||
_ActiveKill _$ActiveKillFromJson(Map<String, dynamic> json) => _ActiveKill(
|
||||
activeKill: json['active_kill'] as bool?,
|
||||
countOfRequest: (json['count_of_request'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ActiveKillToJson(_ActiveKill instance) =>
|
||||
<String, dynamic>{
|
||||
'active_kill': instance.activeKill,
|
||||
'count_of_request': instance.countOfRequest,
|
||||
};
|
||||
|
||||
_KillingInfo _$KillingInfoFromJson(Map<String, dynamic> json) => _KillingInfo(
|
||||
violationMessage: json['violation_message'] as String?,
|
||||
provinceKillRequests: (json['province_kill_requests'] as num?)?.toInt(),
|
||||
provinceKillRequestsQuantity:
|
||||
(json['province_kill_requests_quantity'] as num?)?.toInt(),
|
||||
provinceKillRequestsWeight: (json['province_kill_requests_weight'] as num?)
|
||||
?.toDouble(),
|
||||
killHouseRequests: (json['kill_house_requests'] as num?)?.toInt(),
|
||||
killHouseRequestsFirstQuantity:
|
||||
(json['kill_house_requests_first_quantity'] as num?)?.toInt(),
|
||||
killHouseRequestsFirstWeight:
|
||||
(json['kill_house_requests_first_weight'] as num?)?.toDouble(),
|
||||
barCompleteWithKillHouse: (json['bar_complete_with_kill_house'] as num?)
|
||||
?.toInt(),
|
||||
acceptedRealQuantityFinal: (json['accepted_real_quantity_final'] as num?)
|
||||
?.toInt(),
|
||||
acceptedRealWightFinal: (json['accepted_real_wight_final'] as num?)
|
||||
?.toDouble(),
|
||||
wareHouseBars: (json['ware_house_bars'] as num?)?.toInt(),
|
||||
wareHouseBarsQuantity: (json['ware_house_bars_quantity'] as num?)?.toInt(),
|
||||
wareHouseBarsWeight: (json['ware_house_bars_weight'] as num?)?.toDouble(),
|
||||
wareHouseBarsWeightLose: (json['ware_house_bars_weight_lose'] as num?)
|
||||
?.toDouble(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$KillingInfoToJson(
|
||||
_KillingInfo instance,
|
||||
) => <String, dynamic>{
|
||||
'violation_message': instance.violationMessage,
|
||||
'province_kill_requests': instance.provinceKillRequests,
|
||||
'province_kill_requests_quantity': instance.provinceKillRequestsQuantity,
|
||||
'province_kill_requests_weight': instance.provinceKillRequestsWeight,
|
||||
'kill_house_requests': instance.killHouseRequests,
|
||||
'kill_house_requests_first_quantity': instance.killHouseRequestsFirstQuantity,
|
||||
'kill_house_requests_first_weight': instance.killHouseRequestsFirstWeight,
|
||||
'bar_complete_with_kill_house': instance.barCompleteWithKillHouse,
|
||||
'accepted_real_quantity_final': instance.acceptedRealQuantityFinal,
|
||||
'accepted_real_wight_final': instance.acceptedRealWightFinal,
|
||||
'ware_house_bars': instance.wareHouseBars,
|
||||
'ware_house_bars_quantity': instance.wareHouseBarsQuantity,
|
||||
'ware_house_bars_weight': instance.wareHouseBarsWeight,
|
||||
'ware_house_bars_weight_lose': instance.wareHouseBarsWeightLose,
|
||||
};
|
||||
|
||||
_FreeGovernmentalInfo _$FreeGovernmentalInfoFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _FreeGovernmentalInfo(
|
||||
governmentalAllocatedQuantity:
|
||||
(json['governmental_allocated_quantity'] as num?)?.toInt(),
|
||||
totalCommitmentQuantity: (json['total_commitment_quantity'] as num?)
|
||||
?.toDouble(),
|
||||
freeAllocatedQuantity: (json['free_allocated_quantity'] as num?)?.toInt(),
|
||||
totalFreeCommitmentQuantity: (json['total_free_commitment_quantity'] as num?)
|
||||
?.toDouble(),
|
||||
leftTotalFreeCommitmentQuantity:
|
||||
(json['left_total_free_commitment_quantity'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$FreeGovernmentalInfoToJson(
|
||||
_FreeGovernmentalInfo instance,
|
||||
) => <String, dynamic>{
|
||||
'governmental_allocated_quantity': instance.governmentalAllocatedQuantity,
|
||||
'total_commitment_quantity': instance.totalCommitmentQuantity,
|
||||
'free_allocated_quantity': instance.freeAllocatedQuantity,
|
||||
'total_free_commitment_quantity': instance.totalFreeCommitmentQuantity,
|
||||
'left_total_free_commitment_quantity':
|
||||
instance.leftTotalFreeCommitmentQuantity,
|
||||
};
|
||||
|
||||
_ManagementHatchingAgeRange _$ManagementHatchingAgeRangeFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _ManagementHatchingAgeRange(
|
||||
fromWeight: (json['from_weight'] as num?)?.toDouble(),
|
||||
toWeight: (json['to_weight'] as num?)?.toDouble(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ManagementHatchingAgeRangeToJson(
|
||||
_ManagementHatchingAgeRange instance,
|
||||
) => <String, dynamic>{
|
||||
'from_weight': instance.fromWeight,
|
||||
'to_weight': instance.toWeight,
|
||||
};
|
||||
|
||||
_Registrar _$RegistrarFromJson(Map<String, dynamic> json) => _Registrar(
|
||||
date: json['date'] as String?,
|
||||
role: json['role'] as String?,
|
||||
fullname: json['fullname'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$RegistrarToJson(_Registrar instance) =>
|
||||
<String, dynamic>{
|
||||
'date': instance.date,
|
||||
'role': instance.role,
|
||||
'fullname': instance.fullname,
|
||||
};
|
||||
|
||||
_Breed _$BreedFromJson(Map<String, dynamic> json) => _Breed(
|
||||
breed: json['breed'] as String?,
|
||||
mainQuantity: (json['main_quantity'] as num?)?.toInt(),
|
||||
remainQuantity: (json['remain_quantity'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$BreedToJson(_Breed instance) => <String, dynamic>{
|
||||
'breed': instance.breed,
|
||||
'main_quantity': instance.mainQuantity,
|
||||
'remain_quantity': instance.remainQuantity,
|
||||
};
|
||||
|
||||
_LastChange _$LastChangeFromJson(Map<String, dynamic> json) => _LastChange(
|
||||
date: json['date'] as String?,
|
||||
role: json['role'] as String?,
|
||||
type: json['type'] as String?,
|
||||
fullName: json['full_name'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$LastChangeToJson(_LastChange instance) =>
|
||||
<String, dynamic>{
|
||||
'date': instance.date,
|
||||
'role': instance.role,
|
||||
'type': instance.type,
|
||||
'full_name': instance.fullName,
|
||||
};
|
||||
|
||||
_LatestHatchingChange _$LatestHatchingChangeFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _LatestHatchingChange(
|
||||
date: json['date'] as String?,
|
||||
role: json['role'] as String?,
|
||||
fullName: json['full_name'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$LatestHatchingChangeToJson(
|
||||
_LatestHatchingChange instance,
|
||||
) => <String, dynamic>{
|
||||
'date': instance.date,
|
||||
'role': instance.role,
|
||||
'full_name': instance.fullName,
|
||||
};
|
||||
@@ -0,0 +1,151 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'poultry_order.freezed.dart';
|
||||
part 'poultry_order.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class PoultryOrder with _$PoultryOrder {
|
||||
const factory PoultryOrder({
|
||||
String? key,
|
||||
int? id,
|
||||
Poultry? poultry,
|
||||
int? orderCode,
|
||||
String? createDate,
|
||||
String? sendDate,
|
||||
List<String>? killHouseList,
|
||||
int? firstQuantity,
|
||||
int? quantity,
|
||||
bool? directBuying,
|
||||
bool? union,
|
||||
double? amount,
|
||||
String? financialOperation,
|
||||
int? remainQuantity,
|
||||
@JsonKey(name: "Index_weight") double? indexWeight,
|
||||
Hatching? hatching,
|
||||
String? finalState,
|
||||
int? losses,
|
||||
String? provinceState,
|
||||
String? stateProcess,
|
||||
Registrar? registrar,
|
||||
VetFarm? vetFarm,
|
||||
bool? freeSaleInProvince,
|
||||
bool? freezing,
|
||||
bool? export,
|
||||
String? cityCheckRequest,
|
||||
bool? market,
|
||||
}) = _PoultryOrder;
|
||||
|
||||
factory PoultryOrder.fromJson(Map<String, dynamic> json) => _$PoultryOrderFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class Poultry with _$Poultry {
|
||||
const factory Poultry({
|
||||
String? unitName,
|
||||
String? cityOperator,
|
||||
User? user,
|
||||
int? totalCapacity,
|
||||
Address? address,
|
||||
String? breedingUniqueId,
|
||||
String? systemCode,
|
||||
}) = _Poultry;
|
||||
|
||||
factory Poultry.fromJson(Map<String, dynamic> json) => _$PoultryFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class User with _$User {
|
||||
const factory User({
|
||||
String? fullName,
|
||||
String? firstName,
|
||||
String? lastName,
|
||||
int? baseOrder,
|
||||
String? mobile,
|
||||
String? nationalId,
|
||||
String? nationalCode,
|
||||
String? key,
|
||||
City? city,
|
||||
String? unitName,
|
||||
String? unitNationalId,
|
||||
String? unitRegistrationNumber,
|
||||
String? unitEconomicalNumber,
|
||||
String? unitProvince,
|
||||
String? unitCity,
|
||||
String? unitPostalCode,
|
||||
String? unitAddress,
|
||||
}) = _User;
|
||||
|
||||
factory User.fromJson(Map<String, dynamic> json) => _$UserFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class City with _$City {
|
||||
const factory City({
|
||||
int? id,
|
||||
String? key,
|
||||
String? createDate,
|
||||
String? modifyDate,
|
||||
bool? trash,
|
||||
int? provinceIdForeignKey,
|
||||
int? cityIdKey,
|
||||
String? name,
|
||||
double? productPrice,
|
||||
bool? provinceCenter,
|
||||
int? cityNumber,
|
||||
String? cityName,
|
||||
int? provinceNumber,
|
||||
String? provinceName,
|
||||
dynamic createdBy,
|
||||
dynamic modifiedBy,
|
||||
int? province,
|
||||
}) = _City;
|
||||
|
||||
factory City.fromJson(Map<String, dynamic> json) => _$CityFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class Address with _$Address {
|
||||
const factory Address({Province? province, City? city, String? address, String? postalCode}) =
|
||||
_Address;
|
||||
|
||||
factory Address.fromJson(Map<String, dynamic> json) => _$AddressFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class Province with _$Province {
|
||||
const factory Province({String? key, String? name}) = _Province;
|
||||
|
||||
factory Province.fromJson(Map<String, dynamic> json) => _$ProvinceFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class Hatching with _$Hatching {
|
||||
const factory Hatching({
|
||||
int? age,
|
||||
int? leftOver,
|
||||
String? fileState,
|
||||
String? hatchingDate,
|
||||
String? allowHatching,
|
||||
int? inspectionLosses,
|
||||
double? inspectionLossesPercent,
|
||||
double? totalLossesPercent,
|
||||
double? poultryLossesPercent,
|
||||
double? totalWeight,
|
||||
}) = _Hatching;
|
||||
|
||||
factory Hatching.fromJson(Map<String, dynamic> json) => _$HatchingFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class Registrar with _$Registrar {
|
||||
const factory Registrar({String? date, String? role, String? fullName}) = _Registrar;
|
||||
|
||||
factory Registrar.fromJson(Map<String, dynamic> json) => _$RegistrarFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class VetFarm with _$VetFarm {
|
||||
const factory VetFarm({String? vetFarmFullName, String? vetFarmMobile}) = _VetFarm;
|
||||
|
||||
factory VetFarm.fromJson(Map<String, dynamic> json) => _$VetFarmFromJson(json);
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,261 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'poultry_order.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_PoultryOrder _$PoultryOrderFromJson(Map<String, dynamic> json) =>
|
||||
_PoultryOrder(
|
||||
key: json['key'] as String?,
|
||||
id: (json['id'] as num?)?.toInt(),
|
||||
poultry: json['poultry'] == null
|
||||
? null
|
||||
: Poultry.fromJson(json['poultry'] as Map<String, dynamic>),
|
||||
orderCode: (json['order_code'] as num?)?.toInt(),
|
||||
createDate: json['create_date'] as String?,
|
||||
sendDate: json['send_date'] as String?,
|
||||
killHouseList: (json['kill_house_list'] as List<dynamic>?)
|
||||
?.map((e) => e as String)
|
||||
.toList(),
|
||||
firstQuantity: (json['first_quantity'] as num?)?.toInt(),
|
||||
quantity: (json['quantity'] as num?)?.toInt(),
|
||||
directBuying: json['direct_buying'] as bool?,
|
||||
union: json['union'] as bool?,
|
||||
amount: (json['amount'] as num?)?.toDouble(),
|
||||
financialOperation: json['financial_operation'] as String?,
|
||||
remainQuantity: (json['remain_quantity'] as num?)?.toInt(),
|
||||
indexWeight: (json['Index_weight'] as num?)?.toDouble(),
|
||||
hatching: json['hatching'] == null
|
||||
? null
|
||||
: Hatching.fromJson(json['hatching'] as Map<String, dynamic>),
|
||||
finalState: json['final_state'] as String?,
|
||||
losses: (json['losses'] as num?)?.toInt(),
|
||||
provinceState: json['province_state'] as String?,
|
||||
stateProcess: json['state_process'] as String?,
|
||||
registrar: json['registrar'] == null
|
||||
? null
|
||||
: Registrar.fromJson(json['registrar'] as Map<String, dynamic>),
|
||||
vetFarm: json['vet_farm'] == null
|
||||
? null
|
||||
: VetFarm.fromJson(json['vet_farm'] as Map<String, dynamic>),
|
||||
freeSaleInProvince: json['free_sale_in_province'] as bool?,
|
||||
freezing: json['freezing'] as bool?,
|
||||
export: json['export'] as bool?,
|
||||
cityCheckRequest: json['city_check_request'] as String?,
|
||||
market: json['market'] as bool?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$PoultryOrderToJson(_PoultryOrder instance) =>
|
||||
<String, dynamic>{
|
||||
'key': instance.key,
|
||||
'id': instance.id,
|
||||
'poultry': instance.poultry,
|
||||
'order_code': instance.orderCode,
|
||||
'create_date': instance.createDate,
|
||||
'send_date': instance.sendDate,
|
||||
'kill_house_list': instance.killHouseList,
|
||||
'first_quantity': instance.firstQuantity,
|
||||
'quantity': instance.quantity,
|
||||
'direct_buying': instance.directBuying,
|
||||
'union': instance.union,
|
||||
'amount': instance.amount,
|
||||
'financial_operation': instance.financialOperation,
|
||||
'remain_quantity': instance.remainQuantity,
|
||||
'Index_weight': instance.indexWeight,
|
||||
'hatching': instance.hatching,
|
||||
'final_state': instance.finalState,
|
||||
'losses': instance.losses,
|
||||
'province_state': instance.provinceState,
|
||||
'state_process': instance.stateProcess,
|
||||
'registrar': instance.registrar,
|
||||
'vet_farm': instance.vetFarm,
|
||||
'free_sale_in_province': instance.freeSaleInProvince,
|
||||
'freezing': instance.freezing,
|
||||
'export': instance.export,
|
||||
'city_check_request': instance.cityCheckRequest,
|
||||
'market': instance.market,
|
||||
};
|
||||
|
||||
_Poultry _$PoultryFromJson(Map<String, dynamic> json) => _Poultry(
|
||||
unitName: json['unit_name'] as String?,
|
||||
cityOperator: json['city_operator'] as String?,
|
||||
user: json['user'] == null
|
||||
? null
|
||||
: User.fromJson(json['user'] as Map<String, dynamic>),
|
||||
totalCapacity: (json['total_capacity'] as num?)?.toInt(),
|
||||
address: json['address'] == null
|
||||
? null
|
||||
: Address.fromJson(json['address'] as Map<String, dynamic>),
|
||||
breedingUniqueId: json['breeding_unique_id'] as String?,
|
||||
systemCode: json['system_code'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$PoultryToJson(_Poultry instance) => <String, dynamic>{
|
||||
'unit_name': instance.unitName,
|
||||
'city_operator': instance.cityOperator,
|
||||
'user': instance.user,
|
||||
'total_capacity': instance.totalCapacity,
|
||||
'address': instance.address,
|
||||
'breeding_unique_id': instance.breedingUniqueId,
|
||||
'system_code': instance.systemCode,
|
||||
};
|
||||
|
||||
_User _$UserFromJson(Map<String, dynamic> json) => _User(
|
||||
fullName: json['full_name'] as String?,
|
||||
firstName: json['first_name'] as String?,
|
||||
lastName: json['last_name'] as String?,
|
||||
baseOrder: (json['base_order'] as num?)?.toInt(),
|
||||
mobile: json['mobile'] as String?,
|
||||
nationalId: json['national_id'] as String?,
|
||||
nationalCode: json['national_code'] as String?,
|
||||
key: json['key'] as String?,
|
||||
city: json['city'] == null
|
||||
? null
|
||||
: City.fromJson(json['city'] as Map<String, dynamic>),
|
||||
unitName: json['unit_name'] as String?,
|
||||
unitNationalId: json['unit_national_id'] as String?,
|
||||
unitRegistrationNumber: json['unit_registration_number'] as String?,
|
||||
unitEconomicalNumber: json['unit_economical_number'] as String?,
|
||||
unitProvince: json['unit_province'] as String?,
|
||||
unitCity: json['unit_city'] as String?,
|
||||
unitPostalCode: json['unit_postal_code'] as String?,
|
||||
unitAddress: json['unit_address'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$UserToJson(_User instance) => <String, dynamic>{
|
||||
'full_name': instance.fullName,
|
||||
'first_name': instance.firstName,
|
||||
'last_name': instance.lastName,
|
||||
'base_order': instance.baseOrder,
|
||||
'mobile': instance.mobile,
|
||||
'national_id': instance.nationalId,
|
||||
'national_code': instance.nationalCode,
|
||||
'key': instance.key,
|
||||
'city': instance.city,
|
||||
'unit_name': instance.unitName,
|
||||
'unit_national_id': instance.unitNationalId,
|
||||
'unit_registration_number': instance.unitRegistrationNumber,
|
||||
'unit_economical_number': instance.unitEconomicalNumber,
|
||||
'unit_province': instance.unitProvince,
|
||||
'unit_city': instance.unitCity,
|
||||
'unit_postal_code': instance.unitPostalCode,
|
||||
'unit_address': instance.unitAddress,
|
||||
};
|
||||
|
||||
_City _$CityFromJson(Map<String, dynamic> json) => _City(
|
||||
id: (json['id'] as num?)?.toInt(),
|
||||
key: json['key'] as String?,
|
||||
createDate: json['create_date'] as String?,
|
||||
modifyDate: json['modify_date'] as String?,
|
||||
trash: json['trash'] as bool?,
|
||||
provinceIdForeignKey: (json['province_id_foreign_key'] as num?)?.toInt(),
|
||||
cityIdKey: (json['city_id_key'] as num?)?.toInt(),
|
||||
name: json['name'] as String?,
|
||||
productPrice: (json['product_price'] as num?)?.toDouble(),
|
||||
provinceCenter: json['province_center'] as bool?,
|
||||
cityNumber: (json['city_number'] as num?)?.toInt(),
|
||||
cityName: json['city_name'] as String?,
|
||||
provinceNumber: (json['province_number'] as num?)?.toInt(),
|
||||
provinceName: json['province_name'] as String?,
|
||||
createdBy: json['created_by'],
|
||||
modifiedBy: json['modified_by'],
|
||||
province: (json['province'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$CityToJson(_City instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'key': instance.key,
|
||||
'create_date': instance.createDate,
|
||||
'modify_date': instance.modifyDate,
|
||||
'trash': instance.trash,
|
||||
'province_id_foreign_key': instance.provinceIdForeignKey,
|
||||
'city_id_key': instance.cityIdKey,
|
||||
'name': instance.name,
|
||||
'product_price': instance.productPrice,
|
||||
'province_center': instance.provinceCenter,
|
||||
'city_number': instance.cityNumber,
|
||||
'city_name': instance.cityName,
|
||||
'province_number': instance.provinceNumber,
|
||||
'province_name': instance.provinceName,
|
||||
'created_by': instance.createdBy,
|
||||
'modified_by': instance.modifiedBy,
|
||||
'province': instance.province,
|
||||
};
|
||||
|
||||
_Address _$AddressFromJson(Map<String, dynamic> json) => _Address(
|
||||
province: json['province'] == null
|
||||
? null
|
||||
: Province.fromJson(json['province'] as Map<String, dynamic>),
|
||||
city: json['city'] == null
|
||||
? null
|
||||
: City.fromJson(json['city'] as Map<String, dynamic>),
|
||||
address: json['address'] as String?,
|
||||
postalCode: json['postal_code'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$AddressToJson(_Address instance) => <String, dynamic>{
|
||||
'province': instance.province,
|
||||
'city': instance.city,
|
||||
'address': instance.address,
|
||||
'postal_code': instance.postalCode,
|
||||
};
|
||||
|
||||
_Province _$ProvinceFromJson(Map<String, dynamic> json) =>
|
||||
_Province(key: json['key'] as String?, name: json['name'] as String?);
|
||||
|
||||
Map<String, dynamic> _$ProvinceToJson(_Province instance) => <String, dynamic>{
|
||||
'key': instance.key,
|
||||
'name': instance.name,
|
||||
};
|
||||
|
||||
_Hatching _$HatchingFromJson(Map<String, dynamic> json) => _Hatching(
|
||||
age: (json['age'] as num?)?.toInt(),
|
||||
leftOver: (json['left_over'] as num?)?.toInt(),
|
||||
fileState: json['file_state'] as String?,
|
||||
hatchingDate: json['hatching_date'] as String?,
|
||||
allowHatching: json['allow_hatching'] as String?,
|
||||
inspectionLosses: (json['inspection_losses'] as num?)?.toInt(),
|
||||
inspectionLossesPercent: (json['inspection_losses_percent'] as num?)
|
||||
?.toDouble(),
|
||||
totalLossesPercent: (json['total_losses_percent'] as num?)?.toDouble(),
|
||||
poultryLossesPercent: (json['poultry_losses_percent'] as num?)?.toDouble(),
|
||||
totalWeight: (json['total_weight'] as num?)?.toDouble(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$HatchingToJson(_Hatching instance) => <String, dynamic>{
|
||||
'age': instance.age,
|
||||
'left_over': instance.leftOver,
|
||||
'file_state': instance.fileState,
|
||||
'hatching_date': instance.hatchingDate,
|
||||
'allow_hatching': instance.allowHatching,
|
||||
'inspection_losses': instance.inspectionLosses,
|
||||
'inspection_losses_percent': instance.inspectionLossesPercent,
|
||||
'total_losses_percent': instance.totalLossesPercent,
|
||||
'poultry_losses_percent': instance.poultryLossesPercent,
|
||||
'total_weight': instance.totalWeight,
|
||||
};
|
||||
|
||||
_Registrar _$RegistrarFromJson(Map<String, dynamic> json) => _Registrar(
|
||||
date: json['date'] as String?,
|
||||
role: json['role'] as String?,
|
||||
fullName: json['full_name'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$RegistrarToJson(_Registrar instance) =>
|
||||
<String, dynamic>{
|
||||
'date': instance.date,
|
||||
'role': instance.role,
|
||||
'full_name': instance.fullName,
|
||||
};
|
||||
|
||||
_VetFarm _$VetFarmFromJson(Map<String, dynamic> json) => _VetFarm(
|
||||
vetFarmFullName: json['vet_farm_full_name'] as String?,
|
||||
vetFarmMobile: json['vet_farm_mobile'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$VetFarmToJson(_VetFarm instance) => <String, dynamic>{
|
||||
'vet_farm_full_name': instance.vetFarmFullName,
|
||||
'vet_farm_mobile': instance.vetFarmMobile,
|
||||
};
|
||||
@@ -0,0 +1,16 @@
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
part 'sell_for_freezing.freezed.dart';
|
||||
part 'sell_for_freezing.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class SellForFreezing with _$SellForFreezing {
|
||||
const factory SellForFreezing({
|
||||
bool? permission,
|
||||
}) = _SellForFreezing;
|
||||
|
||||
factory SellForFreezing.fromJson(Map<String, dynamic> json) =>
|
||||
_$SellForFreezingFromJson(json);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,277 @@
|
||||
// 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 'sell_for_freezing.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$SellForFreezing {
|
||||
|
||||
bool? get permission;
|
||||
/// Create a copy of SellForFreezing
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$SellForFreezingCopyWith<SellForFreezing> get copyWith => _$SellForFreezingCopyWithImpl<SellForFreezing>(this as SellForFreezing, _$identity);
|
||||
|
||||
/// Serializes this SellForFreezing to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SellForFreezing&&(identical(other.permission, permission) || other.permission == permission));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,permission);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SellForFreezing(permission: $permission)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $SellForFreezingCopyWith<$Res> {
|
||||
factory $SellForFreezingCopyWith(SellForFreezing value, $Res Function(SellForFreezing) _then) = _$SellForFreezingCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
bool? permission
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$SellForFreezingCopyWithImpl<$Res>
|
||||
implements $SellForFreezingCopyWith<$Res> {
|
||||
_$SellForFreezingCopyWithImpl(this._self, this._then);
|
||||
|
||||
final SellForFreezing _self;
|
||||
final $Res Function(SellForFreezing) _then;
|
||||
|
||||
/// Create a copy of SellForFreezing
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? permission = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
permission: freezed == permission ? _self.permission : permission // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// Adds pattern-matching-related methods to [SellForFreezing].
|
||||
extension SellForFreezingPatterns on SellForFreezing {
|
||||
/// 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 extends Object?>(TResult Function( _SellForFreezing value)? $default,{required TResult orElse(),}){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _SellForFreezing() 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 extends Object?>(TResult Function( _SellForFreezing value) $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _SellForFreezing():
|
||||
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 extends Object?>(TResult? Function( _SellForFreezing value)? $default,){
|
||||
final _that = this;
|
||||
switch (_that) {
|
||||
case _SellForFreezing() 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 extends Object?>(TResult Function( bool? permission)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SellForFreezing() when $default != null:
|
||||
return $default(_that.permission);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 extends Object?>(TResult Function( bool? permission) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SellForFreezing():
|
||||
return $default(_that.permission);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 extends Object?>(TResult? Function( bool? permission)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SellForFreezing() when $default != null:
|
||||
return $default(_that.permission);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _SellForFreezing implements SellForFreezing {
|
||||
const _SellForFreezing({this.permission});
|
||||
factory _SellForFreezing.fromJson(Map<String, dynamic> json) => _$SellForFreezingFromJson(json);
|
||||
|
||||
@override final bool? permission;
|
||||
|
||||
/// Create a copy of SellForFreezing
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$SellForFreezingCopyWith<_SellForFreezing> get copyWith => __$SellForFreezingCopyWithImpl<_SellForFreezing>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$SellForFreezingToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SellForFreezing&&(identical(other.permission, permission) || other.permission == permission));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,permission);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SellForFreezing(permission: $permission)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$SellForFreezingCopyWith<$Res> implements $SellForFreezingCopyWith<$Res> {
|
||||
factory _$SellForFreezingCopyWith(_SellForFreezing value, $Res Function(_SellForFreezing) _then) = __$SellForFreezingCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
bool? permission
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$SellForFreezingCopyWithImpl<$Res>
|
||||
implements _$SellForFreezingCopyWith<$Res> {
|
||||
__$SellForFreezingCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _SellForFreezing _self;
|
||||
final $Res Function(_SellForFreezing) _then;
|
||||
|
||||
/// Create a copy of SellForFreezing
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? permission = freezed,}) {
|
||||
return _then(_SellForFreezing(
|
||||
permission: freezed == permission ? _self.permission : permission // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
@@ -0,0 +1,13 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'sell_for_freezing.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_SellForFreezing _$SellForFreezingFromJson(Map<String, dynamic> json) =>
|
||||
_SellForFreezing(permission: json['permission'] as bool?);
|
||||
|
||||
Map<String, dynamic> _$SellForFreezingToJson(_SellForFreezing instance) =>
|
||||
<String, dynamic>{'permission': instance.permission};
|
||||
@@ -1,7 +1,16 @@
|
||||
import 'package:rasadyar_chicken/data/models/poultry_export/poultry_export.dart';
|
||||
import 'package:rasadyar_chicken/data/models/request/kill_registration/kill_registration.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/all_poultry/all_poultry.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/approved_price/approved_price.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/kill_house_poultry/kill_house_poultry.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/kill_request_poultry/kill_request_poultry.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/poultry_farm/poultry_farm.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/poultry_hatching/poultry_hatching.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/poultry_order/poultry_order.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/poultry_science/home_poultry_science/home_poultry_science_model.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/sell_for_freezing/sell_for_freezing.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
abstract class PoultryScienceRepository {
|
||||
@@ -30,4 +39,50 @@ abstract class PoultryScienceRepository {
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<ApprovedPrice?> getApprovedPrice({ required String token,
|
||||
Map<String, dynamic>? queryParameters,});
|
||||
|
||||
|
||||
Future<List<AllPoultry>?> getAllPoultry({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
|
||||
Future<SellForFreezing?> getSellForFreezing({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
|
||||
Future<PoultryExport?> getPoultryExport({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<List<KillRequestPoultry>?> getUserPoultry({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<List<PoultryHatching>?> getPoultryHatching({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<List<KillHousePoultry>?> getKillHouseList({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<void> submitKillRegistration({
|
||||
required String token,
|
||||
required KillRegistrationRequest request,
|
||||
});
|
||||
|
||||
Future<PaginationModel<PoultryOrder>?> getPoultryOderList({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,17 @@
|
||||
import 'package:rasadyar_chicken/data/data_source/remote/poultry_science/poultry_science_remote.dart';
|
||||
import 'package:rasadyar_chicken/data/models/poultry_export/poultry_export.dart';
|
||||
import 'package:rasadyar_chicken/data/models/request/kill_registration/kill_registration.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/all_poultry/all_poultry.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/approved_price/approved_price.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/kill_house_poultry/kill_house_poultry.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/kill_request_poultry/kill_request_poultry.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/poultry_farm/poultry_farm.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/poultry_hatching/poultry_hatching.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/poultry_order/poultry_order.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/poultry_science/home_poultry_science/home_poultry_science_model.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/sell_for_freezing/sell_for_freezing.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
import 'poultry_science_repository.dart';
|
||||
@@ -53,4 +62,76 @@ class PoultryScienceRepositoryImp implements PoultryScienceRepository {
|
||||
queryParameters: queryParameters,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<ApprovedPrice?> getApprovedPrice({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
return await datasource.getApprovedPrice(token: token, queryParameters: queryParameters);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<List<AllPoultry>?> getAllPoultry({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
return await datasource.getAllPoultry(token: token, queryParameters: queryParameters);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<PoultryExport?> getPoultryExport({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
return await datasource.getPoultryExport(token: token, queryParameters: queryParameters);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<SellForFreezing?> getSellForFreezing({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
return await datasource.getSellForFreezing(token: token, queryParameters: queryParameters);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<List<KillRequestPoultry>?> getUserPoultry({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
return await datasource.getUserPoultry(token: token, queryParameters: queryParameters);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<List<PoultryHatching>?> getPoultryHatching({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
return await datasource.getPoultryHatching(token: token, queryParameters: queryParameters);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<List<KillHousePoultry>?> getKillHouseList({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
return await datasource.getKillHouseList(token: token, queryParameters: queryParameters);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> submitKillRegistration({
|
||||
required String token,
|
||||
required KillRegistrationRequest request,
|
||||
}) async {
|
||||
await datasource.submitKillRegistration(token: token, request: request);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<PaginationModel<PoultryOrder>?> getPoultryOderList({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
return await datasource.getPoultryOderList(token: token, queryParameters: queryParameters);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user