feat : search and filter in buyer out of the province
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'steward_free_sale_bar_request.freezed.dart';
|
||||
part 'steward_free_sale_bar_request.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class StewardFreeSaleBarRequest with _$StewardFreeSaleBarRequest {
|
||||
const factory StewardFreeSaleBarRequest({
|
||||
String? buyerKey,
|
||||
int? numberOfCarcasses,
|
||||
int? weightOfCarcasses,
|
||||
String? date,
|
||||
String? clearanceCode,
|
||||
String? productKey,
|
||||
String? key,
|
||||
}) = _StewardFreeSaleBarRequest;
|
||||
|
||||
factory StewardFreeSaleBarRequest.fromJson(Map<String, dynamic> json) =>
|
||||
_$StewardFreeSaleBarRequestFromJson(json);
|
||||
}
|
||||
@@ -0,0 +1,166 @@
|
||||
// dart format width=80
|
||||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// 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 'steward_free_sale_bar_request.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$StewardFreeSaleBarRequest {
|
||||
|
||||
String? get buyerKey; int? get numberOfCarcasses; int? get weightOfCarcasses; String? get date; String? get clearanceCode; String? get productKey; String? get key;
|
||||
/// Create a copy of StewardFreeSaleBarRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$StewardFreeSaleBarRequestCopyWith<StewardFreeSaleBarRequest> get copyWith => _$StewardFreeSaleBarRequestCopyWithImpl<StewardFreeSaleBarRequest>(this as StewardFreeSaleBarRequest, _$identity);
|
||||
|
||||
/// Serializes this StewardFreeSaleBarRequest to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is StewardFreeSaleBarRequest&&(identical(other.buyerKey, buyerKey) || other.buyerKey == buyerKey)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.date, date) || other.date == date)&&(identical(other.clearanceCode, clearanceCode) || other.clearanceCode == clearanceCode)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.key, key) || other.key == key));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,buyerKey,numberOfCarcasses,weightOfCarcasses,date,clearanceCode,productKey,key);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'StewardFreeSaleBarRequest(buyerKey: $buyerKey, numberOfCarcasses: $numberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, date: $date, clearanceCode: $clearanceCode, productKey: $productKey, key: $key)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $StewardFreeSaleBarRequestCopyWith<$Res> {
|
||||
factory $StewardFreeSaleBarRequestCopyWith(StewardFreeSaleBarRequest value, $Res Function(StewardFreeSaleBarRequest) _then) = _$StewardFreeSaleBarRequestCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String? buyerKey, int? numberOfCarcasses, int? weightOfCarcasses, String? date, String? clearanceCode, String? productKey, String? key
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$StewardFreeSaleBarRequestCopyWithImpl<$Res>
|
||||
implements $StewardFreeSaleBarRequestCopyWith<$Res> {
|
||||
_$StewardFreeSaleBarRequestCopyWithImpl(this._self, this._then);
|
||||
|
||||
final StewardFreeSaleBarRequest _self;
|
||||
final $Res Function(StewardFreeSaleBarRequest) _then;
|
||||
|
||||
/// Create a copy of StewardFreeSaleBarRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? buyerKey = freezed,Object? numberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? date = freezed,Object? clearanceCode = freezed,Object? productKey = freezed,Object? key = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
buyerKey: freezed == buyerKey ? _self.buyerKey : buyerKey // ignore: cast_nullable_to_non_nullable
|
||||
as String?,numberOfCarcasses: freezed == numberOfCarcasses ? _self.numberOfCarcasses : numberOfCarcasses // ignore: cast_nullable_to_non_nullable
|
||||
as int?,weightOfCarcasses: freezed == weightOfCarcasses ? _self.weightOfCarcasses : weightOfCarcasses // ignore: cast_nullable_to_non_nullable
|
||||
as int?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
||||
as String?,clearanceCode: freezed == clearanceCode ? _self.clearanceCode : clearanceCode // ignore: cast_nullable_to_non_nullable
|
||||
as String?,productKey: freezed == productKey ? _self.productKey : productKey // ignore: cast_nullable_to_non_nullable
|
||||
as String?,key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _StewardFreeSaleBarRequest implements StewardFreeSaleBarRequest {
|
||||
const _StewardFreeSaleBarRequest({this.buyerKey, this.numberOfCarcasses, this.weightOfCarcasses, this.date, this.clearanceCode, this.productKey, this.key});
|
||||
factory _StewardFreeSaleBarRequest.fromJson(Map<String, dynamic> json) => _$StewardFreeSaleBarRequestFromJson(json);
|
||||
|
||||
@override final String? buyerKey;
|
||||
@override final int? numberOfCarcasses;
|
||||
@override final int? weightOfCarcasses;
|
||||
@override final String? date;
|
||||
@override final String? clearanceCode;
|
||||
@override final String? productKey;
|
||||
@override final String? key;
|
||||
|
||||
/// Create a copy of StewardFreeSaleBarRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$StewardFreeSaleBarRequestCopyWith<_StewardFreeSaleBarRequest> get copyWith => __$StewardFreeSaleBarRequestCopyWithImpl<_StewardFreeSaleBarRequest>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$StewardFreeSaleBarRequestToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _StewardFreeSaleBarRequest&&(identical(other.buyerKey, buyerKey) || other.buyerKey == buyerKey)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.date, date) || other.date == date)&&(identical(other.clearanceCode, clearanceCode) || other.clearanceCode == clearanceCode)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.key, key) || other.key == key));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,buyerKey,numberOfCarcasses,weightOfCarcasses,date,clearanceCode,productKey,key);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'StewardFreeSaleBarRequest(buyerKey: $buyerKey, numberOfCarcasses: $numberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, date: $date, clearanceCode: $clearanceCode, productKey: $productKey, key: $key)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$StewardFreeSaleBarRequestCopyWith<$Res> implements $StewardFreeSaleBarRequestCopyWith<$Res> {
|
||||
factory _$StewardFreeSaleBarRequestCopyWith(_StewardFreeSaleBarRequest value, $Res Function(_StewardFreeSaleBarRequest) _then) = __$StewardFreeSaleBarRequestCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String? buyerKey, int? numberOfCarcasses, int? weightOfCarcasses, String? date, String? clearanceCode, String? productKey, String? key
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$StewardFreeSaleBarRequestCopyWithImpl<$Res>
|
||||
implements _$StewardFreeSaleBarRequestCopyWith<$Res> {
|
||||
__$StewardFreeSaleBarRequestCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _StewardFreeSaleBarRequest _self;
|
||||
final $Res Function(_StewardFreeSaleBarRequest) _then;
|
||||
|
||||
/// Create a copy of StewardFreeSaleBarRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? buyerKey = freezed,Object? numberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? date = freezed,Object? clearanceCode = freezed,Object? productKey = freezed,Object? key = freezed,}) {
|
||||
return _then(_StewardFreeSaleBarRequest(
|
||||
buyerKey: freezed == buyerKey ? _self.buyerKey : buyerKey // ignore: cast_nullable_to_non_nullable
|
||||
as String?,numberOfCarcasses: freezed == numberOfCarcasses ? _self.numberOfCarcasses : numberOfCarcasses // ignore: cast_nullable_to_non_nullable
|
||||
as int?,weightOfCarcasses: freezed == weightOfCarcasses ? _self.weightOfCarcasses : weightOfCarcasses // ignore: cast_nullable_to_non_nullable
|
||||
as int?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
||||
as String?,clearanceCode: freezed == clearanceCode ? _self.clearanceCode : clearanceCode // ignore: cast_nullable_to_non_nullable
|
||||
as String?,productKey: freezed == productKey ? _self.productKey : productKey // ignore: cast_nullable_to_non_nullable
|
||||
as String?,key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
@@ -0,0 +1,31 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'steward_free_sale_bar_request.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_StewardFreeSaleBarRequest _$StewardFreeSaleBarRequestFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _StewardFreeSaleBarRequest(
|
||||
buyerKey: json['buyer_key'] as String?,
|
||||
numberOfCarcasses: (json['number_of_carcasses'] as num?)?.toInt(),
|
||||
weightOfCarcasses: (json['weight_of_carcasses'] as num?)?.toInt(),
|
||||
date: json['date'] as String?,
|
||||
clearanceCode: json['clearance_code'] as String?,
|
||||
productKey: json['product_key'] as String?,
|
||||
key: json['key'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$StewardFreeSaleBarRequestToJson(
|
||||
_StewardFreeSaleBarRequest instance,
|
||||
) => <String, dynamic>{
|
||||
'buyer_key': instance.buyerKey,
|
||||
'number_of_carcasses': instance.numberOfCarcasses,
|
||||
'weight_of_carcasses': instance.weightOfCarcasses,
|
||||
'date': instance.date,
|
||||
'clearance_code': instance.clearanceCode,
|
||||
'product_key': instance.productKey,
|
||||
'key': instance.key,
|
||||
};
|
||||
@@ -0,0 +1,87 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'steward_free_sale_bar.freezed.dart';
|
||||
part 'steward_free_sale_bar.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class StewardFreeSaleBar with _$StewardFreeSaleBar {
|
||||
const factory StewardFreeSaleBar({
|
||||
int? id,
|
||||
Buyer? buyer,
|
||||
String? key,
|
||||
String? createDate,
|
||||
String? modifyDate,
|
||||
bool? trash,
|
||||
String? buyerName,
|
||||
String? buyerMobile,
|
||||
String? province,
|
||||
String? city,
|
||||
String? driverName,
|
||||
String? driverMobile,
|
||||
String? typeCar,
|
||||
String? pelak,
|
||||
String? clearanceCode,
|
||||
int? numberOfCarcasses,
|
||||
double? weightOfCarcasses,
|
||||
String? date,
|
||||
bool? temporaryTrash,
|
||||
bool? temporaryDeleted,
|
||||
String? createdBy,
|
||||
String? modifiedBy,
|
||||
dynamic steward,
|
||||
dynamic guild,
|
||||
dynamic product,
|
||||
}) = _StewardFreeSaleBar;
|
||||
|
||||
factory StewardFreeSaleBar.fromJson(Map<String, dynamic> json) =>
|
||||
_$StewardFreeSaleBarFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class Buyer with _$Buyer {
|
||||
const factory Buyer({
|
||||
String? key,
|
||||
String? fullname,
|
||||
String? firstName,
|
||||
String? lastName,
|
||||
String? mobile,
|
||||
String? unitName,
|
||||
String? city,
|
||||
String? province,
|
||||
bool? active,
|
||||
BuyerSteward? steward,
|
||||
}) = _Buyer;
|
||||
|
||||
factory Buyer.fromJson(Map<String, dynamic> json) => _$BuyerFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class BuyerSteward with _$BuyerSteward {
|
||||
const factory BuyerSteward({
|
||||
String? key,
|
||||
String? guildsName,
|
||||
BuyerStewardUser? user,
|
||||
String? typeActivity,
|
||||
String? areaActivity,
|
||||
}) = _BuyerSteward;
|
||||
|
||||
factory BuyerSteward.fromJson(Map<String, dynamic> json) =>
|
||||
_$BuyerStewardFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class BuyerStewardUser with _$BuyerStewardUser {
|
||||
const factory BuyerStewardUser({
|
||||
String? fullname,
|
||||
String? firstName,
|
||||
String? lastName,
|
||||
String? mobile,
|
||||
String? nationalId,
|
||||
String? provinceName,
|
||||
String? cityName,
|
||||
String? password,
|
||||
}) = _BuyerStewardUser;
|
||||
|
||||
factory BuyerStewardUser.fromJson(Map<String, dynamic> json) =>
|
||||
_$BuyerStewardUserFromJson(json);
|
||||
}
|
||||
@@ -0,0 +1,751 @@
|
||||
// dart format width=80
|
||||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// 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 'steward_free_sale_bar.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// FreezedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// dart format off
|
||||
T _$identity<T>(T value) => value;
|
||||
|
||||
/// @nodoc
|
||||
mixin _$StewardFreeSaleBar {
|
||||
|
||||
int? get id; Buyer? get buyer; String? get key; String? get createDate; String? get modifyDate; bool? get trash; String? get buyerName; String? get buyerMobile; String? get province; String? get city; String? get driverName; String? get driverMobile; String? get typeCar; String? get pelak; String? get clearanceCode; int? get numberOfCarcasses; double? get weightOfCarcasses; String? get date; bool? get temporaryTrash; bool? get temporaryDeleted; String? get createdBy; String? get modifiedBy; dynamic get steward; dynamic get guild; dynamic get product;
|
||||
/// Create a copy of StewardFreeSaleBar
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$StewardFreeSaleBarCopyWith<StewardFreeSaleBar> get copyWith => _$StewardFreeSaleBarCopyWithImpl<StewardFreeSaleBar>(this as StewardFreeSaleBar, _$identity);
|
||||
|
||||
/// Serializes this StewardFreeSaleBar to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is StewardFreeSaleBar&&(identical(other.id, id) || other.id == id)&&(identical(other.buyer, buyer) || other.buyer == buyer)&&(identical(other.key, key) || other.key == key)&&(identical(other.createDate, createDate) || other.createDate == createDate)&&(identical(other.modifyDate, modifyDate) || other.modifyDate == modifyDate)&&(identical(other.trash, trash) || other.trash == trash)&&(identical(other.buyerName, buyerName) || other.buyerName == buyerName)&&(identical(other.buyerMobile, buyerMobile) || other.buyerMobile == buyerMobile)&&(identical(other.province, province) || other.province == province)&&(identical(other.city, city) || other.city == city)&&(identical(other.driverName, driverName) || other.driverName == driverName)&&(identical(other.driverMobile, driverMobile) || other.driverMobile == driverMobile)&&(identical(other.typeCar, typeCar) || other.typeCar == typeCar)&&(identical(other.pelak, pelak) || other.pelak == pelak)&&(identical(other.clearanceCode, clearanceCode) || other.clearanceCode == clearanceCode)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.date, date) || other.date == date)&&(identical(other.temporaryTrash, temporaryTrash) || other.temporaryTrash == temporaryTrash)&&(identical(other.temporaryDeleted, temporaryDeleted) || other.temporaryDeleted == temporaryDeleted)&&(identical(other.createdBy, createdBy) || other.createdBy == createdBy)&&(identical(other.modifiedBy, modifiedBy) || other.modifiedBy == modifiedBy)&&const DeepCollectionEquality().equals(other.steward, steward)&&const DeepCollectionEquality().equals(other.guild, guild)&&const DeepCollectionEquality().equals(other.product, product));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hashAll([runtimeType,id,buyer,key,createDate,modifyDate,trash,buyerName,buyerMobile,province,city,driverName,driverMobile,typeCar,pelak,clearanceCode,numberOfCarcasses,weightOfCarcasses,date,temporaryTrash,temporaryDeleted,createdBy,modifiedBy,const DeepCollectionEquality().hash(steward),const DeepCollectionEquality().hash(guild),const DeepCollectionEquality().hash(product)]);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'StewardFreeSaleBar(id: $id, buyer: $buyer, key: $key, createDate: $createDate, modifyDate: $modifyDate, trash: $trash, buyerName: $buyerName, buyerMobile: $buyerMobile, province: $province, city: $city, driverName: $driverName, driverMobile: $driverMobile, typeCar: $typeCar, pelak: $pelak, clearanceCode: $clearanceCode, numberOfCarcasses: $numberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, date: $date, temporaryTrash: $temporaryTrash, temporaryDeleted: $temporaryDeleted, createdBy: $createdBy, modifiedBy: $modifiedBy, steward: $steward, guild: $guild, product: $product)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $StewardFreeSaleBarCopyWith<$Res> {
|
||||
factory $StewardFreeSaleBarCopyWith(StewardFreeSaleBar value, $Res Function(StewardFreeSaleBar) _then) = _$StewardFreeSaleBarCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
int? id, Buyer? buyer, String? key, String? createDate, String? modifyDate, bool? trash, String? buyerName, String? buyerMobile, String? province, String? city, String? driverName, String? driverMobile, String? typeCar, String? pelak, String? clearanceCode, int? numberOfCarcasses, double? weightOfCarcasses, String? date, bool? temporaryTrash, bool? temporaryDeleted, String? createdBy, String? modifiedBy, dynamic steward, dynamic guild, dynamic product
|
||||
});
|
||||
|
||||
|
||||
$BuyerCopyWith<$Res>? get buyer;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$StewardFreeSaleBarCopyWithImpl<$Res>
|
||||
implements $StewardFreeSaleBarCopyWith<$Res> {
|
||||
_$StewardFreeSaleBarCopyWithImpl(this._self, this._then);
|
||||
|
||||
final StewardFreeSaleBar _self;
|
||||
final $Res Function(StewardFreeSaleBar) _then;
|
||||
|
||||
/// Create a copy of StewardFreeSaleBar
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? id = freezed,Object? buyer = freezed,Object? key = freezed,Object? createDate = freezed,Object? modifyDate = freezed,Object? trash = freezed,Object? buyerName = freezed,Object? buyerMobile = freezed,Object? province = freezed,Object? city = freezed,Object? driverName = freezed,Object? driverMobile = freezed,Object? typeCar = freezed,Object? pelak = freezed,Object? clearanceCode = freezed,Object? numberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? date = freezed,Object? temporaryTrash = freezed,Object? temporaryDeleted = freezed,Object? createdBy = freezed,Object? modifiedBy = freezed,Object? steward = freezed,Object? guild = freezed,Object? product = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as int?,buyer: freezed == buyer ? _self.buyer : buyer // ignore: cast_nullable_to_non_nullable
|
||||
as Buyer?,key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
|
||||
as String?,createDate: freezed == createDate ? _self.createDate : createDate // ignore: cast_nullable_to_non_nullable
|
||||
as String?,modifyDate: freezed == modifyDate ? _self.modifyDate : modifyDate // ignore: cast_nullable_to_non_nullable
|
||||
as String?,trash: freezed == trash ? _self.trash : trash // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,buyerName: freezed == buyerName ? _self.buyerName : buyerName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,buyerMobile: freezed == buyerMobile ? _self.buyerMobile : buyerMobile // ignore: cast_nullable_to_non_nullable
|
||||
as String?,province: freezed == province ? _self.province : province // ignore: cast_nullable_to_non_nullable
|
||||
as String?,city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable
|
||||
as String?,driverName: freezed == driverName ? _self.driverName : driverName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,driverMobile: freezed == driverMobile ? _self.driverMobile : driverMobile // ignore: cast_nullable_to_non_nullable
|
||||
as String?,typeCar: freezed == typeCar ? _self.typeCar : typeCar // ignore: cast_nullable_to_non_nullable
|
||||
as String?,pelak: freezed == pelak ? _self.pelak : pelak // ignore: cast_nullable_to_non_nullable
|
||||
as String?,clearanceCode: freezed == clearanceCode ? _self.clearanceCode : clearanceCode // ignore: cast_nullable_to_non_nullable
|
||||
as String?,numberOfCarcasses: freezed == numberOfCarcasses ? _self.numberOfCarcasses : numberOfCarcasses // ignore: cast_nullable_to_non_nullable
|
||||
as int?,weightOfCarcasses: freezed == weightOfCarcasses ? _self.weightOfCarcasses : weightOfCarcasses // ignore: cast_nullable_to_non_nullable
|
||||
as double?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
||||
as String?,temporaryTrash: freezed == temporaryTrash ? _self.temporaryTrash : temporaryTrash // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,temporaryDeleted: freezed == temporaryDeleted ? _self.temporaryDeleted : temporaryDeleted // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,createdBy: freezed == createdBy ? _self.createdBy : createdBy // ignore: cast_nullable_to_non_nullable
|
||||
as String?,modifiedBy: freezed == modifiedBy ? _self.modifiedBy : modifiedBy // ignore: cast_nullable_to_non_nullable
|
||||
as String?,steward: freezed == steward ? _self.steward : steward // ignore: cast_nullable_to_non_nullable
|
||||
as dynamic,guild: freezed == guild ? _self.guild : guild // ignore: cast_nullable_to_non_nullable
|
||||
as dynamic,product: freezed == product ? _self.product : product // ignore: cast_nullable_to_non_nullable
|
||||
as dynamic,
|
||||
));
|
||||
}
|
||||
/// Create a copy of StewardFreeSaleBar
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$BuyerCopyWith<$Res>? get buyer {
|
||||
if (_self.buyer == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $BuyerCopyWith<$Res>(_self.buyer!, (value) {
|
||||
return _then(_self.copyWith(buyer: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _StewardFreeSaleBar implements StewardFreeSaleBar {
|
||||
const _StewardFreeSaleBar({this.id, this.buyer, this.key, this.createDate, this.modifyDate, this.trash, this.buyerName, this.buyerMobile, this.province, this.city, this.driverName, this.driverMobile, this.typeCar, this.pelak, this.clearanceCode, this.numberOfCarcasses, this.weightOfCarcasses, this.date, this.temporaryTrash, this.temporaryDeleted, this.createdBy, this.modifiedBy, this.steward, this.guild, this.product});
|
||||
factory _StewardFreeSaleBar.fromJson(Map<String, dynamic> json) => _$StewardFreeSaleBarFromJson(json);
|
||||
|
||||
@override final int? id;
|
||||
@override final Buyer? buyer;
|
||||
@override final String? key;
|
||||
@override final String? createDate;
|
||||
@override final String? modifyDate;
|
||||
@override final bool? trash;
|
||||
@override final String? buyerName;
|
||||
@override final String? buyerMobile;
|
||||
@override final String? province;
|
||||
@override final String? city;
|
||||
@override final String? driverName;
|
||||
@override final String? driverMobile;
|
||||
@override final String? typeCar;
|
||||
@override final String? pelak;
|
||||
@override final String? clearanceCode;
|
||||
@override final int? numberOfCarcasses;
|
||||
@override final double? weightOfCarcasses;
|
||||
@override final String? date;
|
||||
@override final bool? temporaryTrash;
|
||||
@override final bool? temporaryDeleted;
|
||||
@override final String? createdBy;
|
||||
@override final String? modifiedBy;
|
||||
@override final dynamic steward;
|
||||
@override final dynamic guild;
|
||||
@override final dynamic product;
|
||||
|
||||
/// Create a copy of StewardFreeSaleBar
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$StewardFreeSaleBarCopyWith<_StewardFreeSaleBar> get copyWith => __$StewardFreeSaleBarCopyWithImpl<_StewardFreeSaleBar>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$StewardFreeSaleBarToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _StewardFreeSaleBar&&(identical(other.id, id) || other.id == id)&&(identical(other.buyer, buyer) || other.buyer == buyer)&&(identical(other.key, key) || other.key == key)&&(identical(other.createDate, createDate) || other.createDate == createDate)&&(identical(other.modifyDate, modifyDate) || other.modifyDate == modifyDate)&&(identical(other.trash, trash) || other.trash == trash)&&(identical(other.buyerName, buyerName) || other.buyerName == buyerName)&&(identical(other.buyerMobile, buyerMobile) || other.buyerMobile == buyerMobile)&&(identical(other.province, province) || other.province == province)&&(identical(other.city, city) || other.city == city)&&(identical(other.driverName, driverName) || other.driverName == driverName)&&(identical(other.driverMobile, driverMobile) || other.driverMobile == driverMobile)&&(identical(other.typeCar, typeCar) || other.typeCar == typeCar)&&(identical(other.pelak, pelak) || other.pelak == pelak)&&(identical(other.clearanceCode, clearanceCode) || other.clearanceCode == clearanceCode)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.date, date) || other.date == date)&&(identical(other.temporaryTrash, temporaryTrash) || other.temporaryTrash == temporaryTrash)&&(identical(other.temporaryDeleted, temporaryDeleted) || other.temporaryDeleted == temporaryDeleted)&&(identical(other.createdBy, createdBy) || other.createdBy == createdBy)&&(identical(other.modifiedBy, modifiedBy) || other.modifiedBy == modifiedBy)&&const DeepCollectionEquality().equals(other.steward, steward)&&const DeepCollectionEquality().equals(other.guild, guild)&&const DeepCollectionEquality().equals(other.product, product));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hashAll([runtimeType,id,buyer,key,createDate,modifyDate,trash,buyerName,buyerMobile,province,city,driverName,driverMobile,typeCar,pelak,clearanceCode,numberOfCarcasses,weightOfCarcasses,date,temporaryTrash,temporaryDeleted,createdBy,modifiedBy,const DeepCollectionEquality().hash(steward),const DeepCollectionEquality().hash(guild),const DeepCollectionEquality().hash(product)]);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'StewardFreeSaleBar(id: $id, buyer: $buyer, key: $key, createDate: $createDate, modifyDate: $modifyDate, trash: $trash, buyerName: $buyerName, buyerMobile: $buyerMobile, province: $province, city: $city, driverName: $driverName, driverMobile: $driverMobile, typeCar: $typeCar, pelak: $pelak, clearanceCode: $clearanceCode, numberOfCarcasses: $numberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, date: $date, temporaryTrash: $temporaryTrash, temporaryDeleted: $temporaryDeleted, createdBy: $createdBy, modifiedBy: $modifiedBy, steward: $steward, guild: $guild, product: $product)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$StewardFreeSaleBarCopyWith<$Res> implements $StewardFreeSaleBarCopyWith<$Res> {
|
||||
factory _$StewardFreeSaleBarCopyWith(_StewardFreeSaleBar value, $Res Function(_StewardFreeSaleBar) _then) = __$StewardFreeSaleBarCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
int? id, Buyer? buyer, String? key, String? createDate, String? modifyDate, bool? trash, String? buyerName, String? buyerMobile, String? province, String? city, String? driverName, String? driverMobile, String? typeCar, String? pelak, String? clearanceCode, int? numberOfCarcasses, double? weightOfCarcasses, String? date, bool? temporaryTrash, bool? temporaryDeleted, String? createdBy, String? modifiedBy, dynamic steward, dynamic guild, dynamic product
|
||||
});
|
||||
|
||||
|
||||
@override $BuyerCopyWith<$Res>? get buyer;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$StewardFreeSaleBarCopyWithImpl<$Res>
|
||||
implements _$StewardFreeSaleBarCopyWith<$Res> {
|
||||
__$StewardFreeSaleBarCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _StewardFreeSaleBar _self;
|
||||
final $Res Function(_StewardFreeSaleBar) _then;
|
||||
|
||||
/// Create a copy of StewardFreeSaleBar
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? id = freezed,Object? buyer = freezed,Object? key = freezed,Object? createDate = freezed,Object? modifyDate = freezed,Object? trash = freezed,Object? buyerName = freezed,Object? buyerMobile = freezed,Object? province = freezed,Object? city = freezed,Object? driverName = freezed,Object? driverMobile = freezed,Object? typeCar = freezed,Object? pelak = freezed,Object? clearanceCode = freezed,Object? numberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? date = freezed,Object? temporaryTrash = freezed,Object? temporaryDeleted = freezed,Object? createdBy = freezed,Object? modifiedBy = freezed,Object? steward = freezed,Object? guild = freezed,Object? product = freezed,}) {
|
||||
return _then(_StewardFreeSaleBar(
|
||||
id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
|
||||
as int?,buyer: freezed == buyer ? _self.buyer : buyer // ignore: cast_nullable_to_non_nullable
|
||||
as Buyer?,key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
|
||||
as String?,createDate: freezed == createDate ? _self.createDate : createDate // ignore: cast_nullable_to_non_nullable
|
||||
as String?,modifyDate: freezed == modifyDate ? _self.modifyDate : modifyDate // ignore: cast_nullable_to_non_nullable
|
||||
as String?,trash: freezed == trash ? _self.trash : trash // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,buyerName: freezed == buyerName ? _self.buyerName : buyerName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,buyerMobile: freezed == buyerMobile ? _self.buyerMobile : buyerMobile // ignore: cast_nullable_to_non_nullable
|
||||
as String?,province: freezed == province ? _self.province : province // ignore: cast_nullable_to_non_nullable
|
||||
as String?,city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable
|
||||
as String?,driverName: freezed == driverName ? _self.driverName : driverName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,driverMobile: freezed == driverMobile ? _self.driverMobile : driverMobile // ignore: cast_nullable_to_non_nullable
|
||||
as String?,typeCar: freezed == typeCar ? _self.typeCar : typeCar // ignore: cast_nullable_to_non_nullable
|
||||
as String?,pelak: freezed == pelak ? _self.pelak : pelak // ignore: cast_nullable_to_non_nullable
|
||||
as String?,clearanceCode: freezed == clearanceCode ? _self.clearanceCode : clearanceCode // ignore: cast_nullable_to_non_nullable
|
||||
as String?,numberOfCarcasses: freezed == numberOfCarcasses ? _self.numberOfCarcasses : numberOfCarcasses // ignore: cast_nullable_to_non_nullable
|
||||
as int?,weightOfCarcasses: freezed == weightOfCarcasses ? _self.weightOfCarcasses : weightOfCarcasses // ignore: cast_nullable_to_non_nullable
|
||||
as double?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
||||
as String?,temporaryTrash: freezed == temporaryTrash ? _self.temporaryTrash : temporaryTrash // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,temporaryDeleted: freezed == temporaryDeleted ? _self.temporaryDeleted : temporaryDeleted // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,createdBy: freezed == createdBy ? _self.createdBy : createdBy // ignore: cast_nullable_to_non_nullable
|
||||
as String?,modifiedBy: freezed == modifiedBy ? _self.modifiedBy : modifiedBy // ignore: cast_nullable_to_non_nullable
|
||||
as String?,steward: freezed == steward ? _self.steward : steward // ignore: cast_nullable_to_non_nullable
|
||||
as dynamic,guild: freezed == guild ? _self.guild : guild // ignore: cast_nullable_to_non_nullable
|
||||
as dynamic,product: freezed == product ? _self.product : product // ignore: cast_nullable_to_non_nullable
|
||||
as dynamic,
|
||||
));
|
||||
}
|
||||
|
||||
/// Create a copy of StewardFreeSaleBar
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$BuyerCopyWith<$Res>? get buyer {
|
||||
if (_self.buyer == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $BuyerCopyWith<$Res>(_self.buyer!, (value) {
|
||||
return _then(_self.copyWith(buyer: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// @nodoc
|
||||
mixin _$Buyer {
|
||||
|
||||
String? get key; String? get fullname; String? get firstName; String? get lastName; String? get mobile; String? get unitName; String? get city; String? get province; bool? get active; BuyerSteward? get steward;
|
||||
/// Create a copy of Buyer
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$BuyerCopyWith<Buyer> get copyWith => _$BuyerCopyWithImpl<Buyer>(this as Buyer, _$identity);
|
||||
|
||||
/// Serializes this Buyer to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is Buyer&&(identical(other.key, key) || other.key == key)&&(identical(other.fullname, fullname) || other.fullname == fullname)&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.mobile, mobile) || other.mobile == mobile)&&(identical(other.unitName, unitName) || other.unitName == unitName)&&(identical(other.city, city) || other.city == city)&&(identical(other.province, province) || other.province == province)&&(identical(other.active, active) || other.active == active)&&(identical(other.steward, steward) || other.steward == steward));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,key,fullname,firstName,lastName,mobile,unitName,city,province,active,steward);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'Buyer(key: $key, fullname: $fullname, firstName: $firstName, lastName: $lastName, mobile: $mobile, unitName: $unitName, city: $city, province: $province, active: $active, steward: $steward)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $BuyerCopyWith<$Res> {
|
||||
factory $BuyerCopyWith(Buyer value, $Res Function(Buyer) _then) = _$BuyerCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String? key, String? fullname, String? firstName, String? lastName, String? mobile, String? unitName, String? city, String? province, bool? active, BuyerSteward? steward
|
||||
});
|
||||
|
||||
|
||||
$BuyerStewardCopyWith<$Res>? get steward;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$BuyerCopyWithImpl<$Res>
|
||||
implements $BuyerCopyWith<$Res> {
|
||||
_$BuyerCopyWithImpl(this._self, this._then);
|
||||
|
||||
final Buyer _self;
|
||||
final $Res Function(Buyer) _then;
|
||||
|
||||
/// Create a copy of Buyer
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? key = freezed,Object? fullname = freezed,Object? firstName = freezed,Object? lastName = freezed,Object? mobile = freezed,Object? unitName = freezed,Object? city = freezed,Object? province = freezed,Object? active = freezed,Object? steward = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
|
||||
as String?,fullname: freezed == fullname ? _self.fullname : fullname // ignore: cast_nullable_to_non_nullable
|
||||
as String?,firstName: freezed == firstName ? _self.firstName : firstName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,lastName: freezed == lastName ? _self.lastName : lastName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,mobile: freezed == mobile ? _self.mobile : mobile // ignore: cast_nullable_to_non_nullable
|
||||
as String?,unitName: freezed == unitName ? _self.unitName : unitName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable
|
||||
as String?,province: freezed == province ? _self.province : province // ignore: cast_nullable_to_non_nullable
|
||||
as String?,active: freezed == active ? _self.active : active // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,steward: freezed == steward ? _self.steward : steward // ignore: cast_nullable_to_non_nullable
|
||||
as BuyerSteward?,
|
||||
));
|
||||
}
|
||||
/// Create a copy of Buyer
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$BuyerStewardCopyWith<$Res>? get steward {
|
||||
if (_self.steward == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $BuyerStewardCopyWith<$Res>(_self.steward!, (value) {
|
||||
return _then(_self.copyWith(steward: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _Buyer implements Buyer {
|
||||
const _Buyer({this.key, this.fullname, this.firstName, this.lastName, this.mobile, this.unitName, this.city, this.province, this.active, this.steward});
|
||||
factory _Buyer.fromJson(Map<String, dynamic> json) => _$BuyerFromJson(json);
|
||||
|
||||
@override final String? key;
|
||||
@override final String? fullname;
|
||||
@override final String? firstName;
|
||||
@override final String? lastName;
|
||||
@override final String? mobile;
|
||||
@override final String? unitName;
|
||||
@override final String? city;
|
||||
@override final String? province;
|
||||
@override final bool? active;
|
||||
@override final BuyerSteward? steward;
|
||||
|
||||
/// Create a copy of Buyer
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$BuyerCopyWith<_Buyer> get copyWith => __$BuyerCopyWithImpl<_Buyer>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$BuyerToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Buyer&&(identical(other.key, key) || other.key == key)&&(identical(other.fullname, fullname) || other.fullname == fullname)&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.mobile, mobile) || other.mobile == mobile)&&(identical(other.unitName, unitName) || other.unitName == unitName)&&(identical(other.city, city) || other.city == city)&&(identical(other.province, province) || other.province == province)&&(identical(other.active, active) || other.active == active)&&(identical(other.steward, steward) || other.steward == steward));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,key,fullname,firstName,lastName,mobile,unitName,city,province,active,steward);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'Buyer(key: $key, fullname: $fullname, firstName: $firstName, lastName: $lastName, mobile: $mobile, unitName: $unitName, city: $city, province: $province, active: $active, steward: $steward)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$BuyerCopyWith<$Res> implements $BuyerCopyWith<$Res> {
|
||||
factory _$BuyerCopyWith(_Buyer value, $Res Function(_Buyer) _then) = __$BuyerCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String? key, String? fullname, String? firstName, String? lastName, String? mobile, String? unitName, String? city, String? province, bool? active, BuyerSteward? steward
|
||||
});
|
||||
|
||||
|
||||
@override $BuyerStewardCopyWith<$Res>? get steward;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$BuyerCopyWithImpl<$Res>
|
||||
implements _$BuyerCopyWith<$Res> {
|
||||
__$BuyerCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _Buyer _self;
|
||||
final $Res Function(_Buyer) _then;
|
||||
|
||||
/// Create a copy of Buyer
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? key = freezed,Object? fullname = freezed,Object? firstName = freezed,Object? lastName = freezed,Object? mobile = freezed,Object? unitName = freezed,Object? city = freezed,Object? province = freezed,Object? active = freezed,Object? steward = freezed,}) {
|
||||
return _then(_Buyer(
|
||||
key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
|
||||
as String?,fullname: freezed == fullname ? _self.fullname : fullname // ignore: cast_nullable_to_non_nullable
|
||||
as String?,firstName: freezed == firstName ? _self.firstName : firstName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,lastName: freezed == lastName ? _self.lastName : lastName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,mobile: freezed == mobile ? _self.mobile : mobile // ignore: cast_nullable_to_non_nullable
|
||||
as String?,unitName: freezed == unitName ? _self.unitName : unitName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable
|
||||
as String?,province: freezed == province ? _self.province : province // ignore: cast_nullable_to_non_nullable
|
||||
as String?,active: freezed == active ? _self.active : active // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,steward: freezed == steward ? _self.steward : steward // ignore: cast_nullable_to_non_nullable
|
||||
as BuyerSteward?,
|
||||
));
|
||||
}
|
||||
|
||||
/// Create a copy of Buyer
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$BuyerStewardCopyWith<$Res>? get steward {
|
||||
if (_self.steward == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $BuyerStewardCopyWith<$Res>(_self.steward!, (value) {
|
||||
return _then(_self.copyWith(steward: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// @nodoc
|
||||
mixin _$BuyerSteward {
|
||||
|
||||
String? get key; String? get guildsName; BuyerStewardUser? get user; String? get typeActivity; String? get areaActivity;
|
||||
/// Create a copy of BuyerSteward
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$BuyerStewardCopyWith<BuyerSteward> get copyWith => _$BuyerStewardCopyWithImpl<BuyerSteward>(this as BuyerSteward, _$identity);
|
||||
|
||||
/// Serializes this BuyerSteward to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is BuyerSteward&&(identical(other.key, key) || other.key == key)&&(identical(other.guildsName, guildsName) || other.guildsName == guildsName)&&(identical(other.user, user) || other.user == user)&&(identical(other.typeActivity, typeActivity) || other.typeActivity == typeActivity)&&(identical(other.areaActivity, areaActivity) || other.areaActivity == areaActivity));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,key,guildsName,user,typeActivity,areaActivity);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'BuyerSteward(key: $key, guildsName: $guildsName, user: $user, typeActivity: $typeActivity, areaActivity: $areaActivity)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $BuyerStewardCopyWith<$Res> {
|
||||
factory $BuyerStewardCopyWith(BuyerSteward value, $Res Function(BuyerSteward) _then) = _$BuyerStewardCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String? key, String? guildsName, BuyerStewardUser? user, String? typeActivity, String? areaActivity
|
||||
});
|
||||
|
||||
|
||||
$BuyerStewardUserCopyWith<$Res>? get user;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$BuyerStewardCopyWithImpl<$Res>
|
||||
implements $BuyerStewardCopyWith<$Res> {
|
||||
_$BuyerStewardCopyWithImpl(this._self, this._then);
|
||||
|
||||
final BuyerSteward _self;
|
||||
final $Res Function(BuyerSteward) _then;
|
||||
|
||||
/// Create a copy of BuyerSteward
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? key = freezed,Object? guildsName = freezed,Object? user = freezed,Object? typeActivity = freezed,Object? areaActivity = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
|
||||
as String?,guildsName: freezed == guildsName ? _self.guildsName : guildsName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,user: freezed == user ? _self.user : user // ignore: cast_nullable_to_non_nullable
|
||||
as BuyerStewardUser?,typeActivity: freezed == typeActivity ? _self.typeActivity : typeActivity // ignore: cast_nullable_to_non_nullable
|
||||
as String?,areaActivity: freezed == areaActivity ? _self.areaActivity : areaActivity // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
/// Create a copy of BuyerSteward
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$BuyerStewardUserCopyWith<$Res>? get user {
|
||||
if (_self.user == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $BuyerStewardUserCopyWith<$Res>(_self.user!, (value) {
|
||||
return _then(_self.copyWith(user: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _BuyerSteward implements BuyerSteward {
|
||||
const _BuyerSteward({this.key, this.guildsName, this.user, this.typeActivity, this.areaActivity});
|
||||
factory _BuyerSteward.fromJson(Map<String, dynamic> json) => _$BuyerStewardFromJson(json);
|
||||
|
||||
@override final String? key;
|
||||
@override final String? guildsName;
|
||||
@override final BuyerStewardUser? user;
|
||||
@override final String? typeActivity;
|
||||
@override final String? areaActivity;
|
||||
|
||||
/// Create a copy of BuyerSteward
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$BuyerStewardCopyWith<_BuyerSteward> get copyWith => __$BuyerStewardCopyWithImpl<_BuyerSteward>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$BuyerStewardToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _BuyerSteward&&(identical(other.key, key) || other.key == key)&&(identical(other.guildsName, guildsName) || other.guildsName == guildsName)&&(identical(other.user, user) || other.user == user)&&(identical(other.typeActivity, typeActivity) || other.typeActivity == typeActivity)&&(identical(other.areaActivity, areaActivity) || other.areaActivity == areaActivity));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,key,guildsName,user,typeActivity,areaActivity);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'BuyerSteward(key: $key, guildsName: $guildsName, user: $user, typeActivity: $typeActivity, areaActivity: $areaActivity)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$BuyerStewardCopyWith<$Res> implements $BuyerStewardCopyWith<$Res> {
|
||||
factory _$BuyerStewardCopyWith(_BuyerSteward value, $Res Function(_BuyerSteward) _then) = __$BuyerStewardCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String? key, String? guildsName, BuyerStewardUser? user, String? typeActivity, String? areaActivity
|
||||
});
|
||||
|
||||
|
||||
@override $BuyerStewardUserCopyWith<$Res>? get user;
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$BuyerStewardCopyWithImpl<$Res>
|
||||
implements _$BuyerStewardCopyWith<$Res> {
|
||||
__$BuyerStewardCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _BuyerSteward _self;
|
||||
final $Res Function(_BuyerSteward) _then;
|
||||
|
||||
/// Create a copy of BuyerSteward
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? key = freezed,Object? guildsName = freezed,Object? user = freezed,Object? typeActivity = freezed,Object? areaActivity = freezed,}) {
|
||||
return _then(_BuyerSteward(
|
||||
key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
|
||||
as String?,guildsName: freezed == guildsName ? _self.guildsName : guildsName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,user: freezed == user ? _self.user : user // ignore: cast_nullable_to_non_nullable
|
||||
as BuyerStewardUser?,typeActivity: freezed == typeActivity ? _self.typeActivity : typeActivity // ignore: cast_nullable_to_non_nullable
|
||||
as String?,areaActivity: freezed == areaActivity ? _self.areaActivity : areaActivity // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
/// Create a copy of BuyerSteward
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$BuyerStewardUserCopyWith<$Res>? get user {
|
||||
if (_self.user == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $BuyerStewardUserCopyWith<$Res>(_self.user!, (value) {
|
||||
return _then(_self.copyWith(user: value));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// @nodoc
|
||||
mixin _$BuyerStewardUser {
|
||||
|
||||
String? get fullname; String? get firstName; String? get lastName; String? get mobile; String? get nationalId; String? get provinceName; String? get cityName; String? get password;
|
||||
/// Create a copy of BuyerStewardUser
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
$BuyerStewardUserCopyWith<BuyerStewardUser> get copyWith => _$BuyerStewardUserCopyWithImpl<BuyerStewardUser>(this as BuyerStewardUser, _$identity);
|
||||
|
||||
/// Serializes this BuyerStewardUser to a JSON map.
|
||||
Map<String, dynamic> toJson();
|
||||
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is BuyerStewardUser&&(identical(other.fullname, fullname) || other.fullname == fullname)&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.mobile, mobile) || other.mobile == mobile)&&(identical(other.nationalId, nationalId) || other.nationalId == nationalId)&&(identical(other.provinceName, provinceName) || other.provinceName == provinceName)&&(identical(other.cityName, cityName) || other.cityName == cityName)&&(identical(other.password, password) || other.password == password));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,fullname,firstName,lastName,mobile,nationalId,provinceName,cityName,password);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'BuyerStewardUser(fullname: $fullname, firstName: $firstName, lastName: $lastName, mobile: $mobile, nationalId: $nationalId, provinceName: $provinceName, cityName: $cityName, password: $password)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class $BuyerStewardUserCopyWith<$Res> {
|
||||
factory $BuyerStewardUserCopyWith(BuyerStewardUser value, $Res Function(BuyerStewardUser) _then) = _$BuyerStewardUserCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String? fullname, String? firstName, String? lastName, String? mobile, String? nationalId, String? provinceName, String? cityName, String? password
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class _$BuyerStewardUserCopyWithImpl<$Res>
|
||||
implements $BuyerStewardUserCopyWith<$Res> {
|
||||
_$BuyerStewardUserCopyWithImpl(this._self, this._then);
|
||||
|
||||
final BuyerStewardUser _self;
|
||||
final $Res Function(BuyerStewardUser) _then;
|
||||
|
||||
/// Create a copy of BuyerStewardUser
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? fullname = freezed,Object? firstName = freezed,Object? lastName = freezed,Object? mobile = freezed,Object? nationalId = freezed,Object? provinceName = freezed,Object? cityName = freezed,Object? password = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
fullname: freezed == fullname ? _self.fullname : fullname // ignore: cast_nullable_to_non_nullable
|
||||
as String?,firstName: freezed == firstName ? _self.firstName : firstName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,lastName: freezed == lastName ? _self.lastName : lastName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,mobile: freezed == mobile ? _self.mobile : mobile // ignore: cast_nullable_to_non_nullable
|
||||
as String?,nationalId: freezed == nationalId ? _self.nationalId : nationalId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,provinceName: freezed == provinceName ? _self.provinceName : provinceName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,cityName: freezed == cityName ? _self.cityName : cityName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,password: freezed == password ? _self.password : password // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
|
||||
class _BuyerStewardUser implements BuyerStewardUser {
|
||||
const _BuyerStewardUser({this.fullname, this.firstName, this.lastName, this.mobile, this.nationalId, this.provinceName, this.cityName, this.password});
|
||||
factory _BuyerStewardUser.fromJson(Map<String, dynamic> json) => _$BuyerStewardUserFromJson(json);
|
||||
|
||||
@override final String? fullname;
|
||||
@override final String? firstName;
|
||||
@override final String? lastName;
|
||||
@override final String? mobile;
|
||||
@override final String? nationalId;
|
||||
@override final String? provinceName;
|
||||
@override final String? cityName;
|
||||
@override final String? password;
|
||||
|
||||
/// Create a copy of BuyerStewardUser
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@pragma('vm:prefer-inline')
|
||||
_$BuyerStewardUserCopyWith<_BuyerStewardUser> get copyWith => __$BuyerStewardUserCopyWithImpl<_BuyerStewardUser>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$BuyerStewardUserToJson(this, );
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _BuyerStewardUser&&(identical(other.fullname, fullname) || other.fullname == fullname)&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.mobile, mobile) || other.mobile == mobile)&&(identical(other.nationalId, nationalId) || other.nationalId == nationalId)&&(identical(other.provinceName, provinceName) || other.provinceName == provinceName)&&(identical(other.cityName, cityName) || other.cityName == cityName)&&(identical(other.password, password) || other.password == password));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,fullname,firstName,lastName,mobile,nationalId,provinceName,cityName,password);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'BuyerStewardUser(fullname: $fullname, firstName: $firstName, lastName: $lastName, mobile: $mobile, nationalId: $nationalId, provinceName: $provinceName, cityName: $cityName, password: $password)';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract mixin class _$BuyerStewardUserCopyWith<$Res> implements $BuyerStewardUserCopyWith<$Res> {
|
||||
factory _$BuyerStewardUserCopyWith(_BuyerStewardUser value, $Res Function(_BuyerStewardUser) _then) = __$BuyerStewardUserCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String? fullname, String? firstName, String? lastName, String? mobile, String? nationalId, String? provinceName, String? cityName, String? password
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// @nodoc
|
||||
class __$BuyerStewardUserCopyWithImpl<$Res>
|
||||
implements _$BuyerStewardUserCopyWith<$Res> {
|
||||
__$BuyerStewardUserCopyWithImpl(this._self, this._then);
|
||||
|
||||
final _BuyerStewardUser _self;
|
||||
final $Res Function(_BuyerStewardUser) _then;
|
||||
|
||||
/// Create a copy of BuyerStewardUser
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? fullname = freezed,Object? firstName = freezed,Object? lastName = freezed,Object? mobile = freezed,Object? nationalId = freezed,Object? provinceName = freezed,Object? cityName = freezed,Object? password = freezed,}) {
|
||||
return _then(_BuyerStewardUser(
|
||||
fullname: freezed == fullname ? _self.fullname : fullname // ignore: cast_nullable_to_non_nullable
|
||||
as String?,firstName: freezed == firstName ? _self.firstName : firstName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,lastName: freezed == lastName ? _self.lastName : lastName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,mobile: freezed == mobile ? _self.mobile : mobile // ignore: cast_nullable_to_non_nullable
|
||||
as String?,nationalId: freezed == nationalId ? _self.nationalId : nationalId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,provinceName: freezed == provinceName ? _self.provinceName : provinceName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,cityName: freezed == cityName ? _self.cityName : cityName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,password: freezed == password ? _self.password : password // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// dart format on
|
||||
@@ -0,0 +1,139 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'steward_free_sale_bar.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_StewardFreeSaleBar _$StewardFreeSaleBarFromJson(Map<String, dynamic> json) =>
|
||||
_StewardFreeSaleBar(
|
||||
id: (json['id'] as num?)?.toInt(),
|
||||
buyer: json['buyer'] == null
|
||||
? null
|
||||
: Buyer.fromJson(json['buyer'] 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?,
|
||||
buyerName: json['buyer_name'] as String?,
|
||||
buyerMobile: json['buyer_mobile'] as String?,
|
||||
province: json['province'] as String?,
|
||||
city: json['city'] as String?,
|
||||
driverName: json['driver_name'] as String?,
|
||||
driverMobile: json['driver_mobile'] as String?,
|
||||
typeCar: json['type_car'] as String?,
|
||||
pelak: json['pelak'] as String?,
|
||||
clearanceCode: json['clearance_code'] as String?,
|
||||
numberOfCarcasses: (json['number_of_carcasses'] as num?)?.toInt(),
|
||||
weightOfCarcasses: (json['weight_of_carcasses'] as num?)?.toDouble(),
|
||||
date: json['date'] as String?,
|
||||
temporaryTrash: json['temporary_trash'] as bool?,
|
||||
temporaryDeleted: json['temporary_deleted'] as bool?,
|
||||
createdBy: json['created_by'] as String?,
|
||||
modifiedBy: json['modified_by'] as String?,
|
||||
steward: json['steward'],
|
||||
guild: json['guild'],
|
||||
product: json['product'],
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$StewardFreeSaleBarToJson(_StewardFreeSaleBar instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'buyer': instance.buyer,
|
||||
'key': instance.key,
|
||||
'create_date': instance.createDate,
|
||||
'modify_date': instance.modifyDate,
|
||||
'trash': instance.trash,
|
||||
'buyer_name': instance.buyerName,
|
||||
'buyer_mobile': instance.buyerMobile,
|
||||
'province': instance.province,
|
||||
'city': instance.city,
|
||||
'driver_name': instance.driverName,
|
||||
'driver_mobile': instance.driverMobile,
|
||||
'type_car': instance.typeCar,
|
||||
'pelak': instance.pelak,
|
||||
'clearance_code': instance.clearanceCode,
|
||||
'number_of_carcasses': instance.numberOfCarcasses,
|
||||
'weight_of_carcasses': instance.weightOfCarcasses,
|
||||
'date': instance.date,
|
||||
'temporary_trash': instance.temporaryTrash,
|
||||
'temporary_deleted': instance.temporaryDeleted,
|
||||
'created_by': instance.createdBy,
|
||||
'modified_by': instance.modifiedBy,
|
||||
'steward': instance.steward,
|
||||
'guild': instance.guild,
|
||||
'product': instance.product,
|
||||
};
|
||||
|
||||
_Buyer _$BuyerFromJson(Map<String, dynamic> json) => _Buyer(
|
||||
key: json['key'] as String?,
|
||||
fullname: json['fullname'] as String?,
|
||||
firstName: json['first_name'] as String?,
|
||||
lastName: json['last_name'] as String?,
|
||||
mobile: json['mobile'] as String?,
|
||||
unitName: json['unit_name'] as String?,
|
||||
city: json['city'] as String?,
|
||||
province: json['province'] as String?,
|
||||
active: json['active'] as bool?,
|
||||
steward: json['steward'] == null
|
||||
? null
|
||||
: BuyerSteward.fromJson(json['steward'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$BuyerToJson(_Buyer instance) => <String, dynamic>{
|
||||
'key': instance.key,
|
||||
'fullname': instance.fullname,
|
||||
'first_name': instance.firstName,
|
||||
'last_name': instance.lastName,
|
||||
'mobile': instance.mobile,
|
||||
'unit_name': instance.unitName,
|
||||
'city': instance.city,
|
||||
'province': instance.province,
|
||||
'active': instance.active,
|
||||
'steward': instance.steward,
|
||||
};
|
||||
|
||||
_BuyerSteward _$BuyerStewardFromJson(Map<String, dynamic> json) =>
|
||||
_BuyerSteward(
|
||||
key: json['key'] as String?,
|
||||
guildsName: json['guilds_name'] as String?,
|
||||
user: json['user'] == null
|
||||
? null
|
||||
: BuyerStewardUser.fromJson(json['user'] as Map<String, dynamic>),
|
||||
typeActivity: json['type_activity'] as String?,
|
||||
areaActivity: json['area_activity'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$BuyerStewardToJson(_BuyerSteward instance) =>
|
||||
<String, dynamic>{
|
||||
'key': instance.key,
|
||||
'guilds_name': instance.guildsName,
|
||||
'user': instance.user,
|
||||
'type_activity': instance.typeActivity,
|
||||
'area_activity': instance.areaActivity,
|
||||
};
|
||||
|
||||
_BuyerStewardUser _$BuyerStewardUserFromJson(Map<String, dynamic> json) =>
|
||||
_BuyerStewardUser(
|
||||
fullname: json['fullname'] as String?,
|
||||
firstName: json['first_name'] as String?,
|
||||
lastName: json['last_name'] as String?,
|
||||
mobile: json['mobile'] as String?,
|
||||
nationalId: json['national_id'] as String?,
|
||||
provinceName: json['province_name'] as String?,
|
||||
cityName: json['city_name'] as String?,
|
||||
password: json['password'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$BuyerStewardUserToJson(_BuyerStewardUser instance) =>
|
||||
<String, dynamic>{
|
||||
'fullname': instance.fullname,
|
||||
'first_name': instance.firstName,
|
||||
'last_name': instance.lastName,
|
||||
'mobile': instance.mobile,
|
||||
'national_id': instance.nationalId,
|
||||
'province_name': instance.provinceName,
|
||||
'city_name': instance.cityName,
|
||||
'password': instance.password,
|
||||
};
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'package:rasadyar_chicken/data/models/request/steward_free_sale_bar/steward_free_sale_bar_request.dart';
|
||||
import 'package:rasadyar_chicken/data/models/request/submit_steward_allocation/submit_steward_allocation.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/allocated_made/allocated_made.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/bar_information/bar_information.dart';
|
||||
@@ -13,38 +14,72 @@ import 'package:rasadyar_chicken/data/models/response/pagination_model/paginatio
|
||||
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/steward_free_bar/steward_free_bar.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/steward_free_bar_dashboard/steward_free_bar_dashboard.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/waiting_arrival/waiting_arrival.dart' hide ProductModel;
|
||||
import 'package:rasadyar_chicken/data/models/response/steward_free_sale_bar/steward_free_sale_bar.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/waiting_arrival/waiting_arrival.dart'
|
||||
hide ProductModel;
|
||||
|
||||
import '../models/request/create_steward_free_bar/create_steward_free_bar.dart';
|
||||
|
||||
abstract class ChickenRepository {
|
||||
Future<List<InventoryModel>?> getInventory({required String token});
|
||||
|
||||
Future<KillHouseDistributionInfo?> getKillHouseDistributionInfo({required String token});
|
||||
Future<KillHouseDistributionInfo?> getKillHouseDistributionInfo({
|
||||
required String token,
|
||||
});
|
||||
|
||||
Future<BarInformation?> getGeneralBarInformation({required String token, Map<String, dynamic>? queryParameters});
|
||||
Future<BarInformation?> getGeneralBarInformation({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<WaitingArrivalModel?> getWaitingArrivals({required String token, int? page});
|
||||
Future<WaitingArrivalModel?> getWaitingArrivals({
|
||||
required String token,
|
||||
int? page,
|
||||
});
|
||||
|
||||
Future<void> setSateForArrivals({required String token, required Map<String, dynamic> request});
|
||||
Future<void> setSateForArrivals({
|
||||
required String token,
|
||||
required Map<String, dynamic> request,
|
||||
});
|
||||
|
||||
Future<ImportedLoadsModel?> getImportedLoadsModel({required String token, required int page});
|
||||
Future<ImportedLoadsModel?> getImportedLoadsModel({
|
||||
required String token,
|
||||
required int page,
|
||||
});
|
||||
|
||||
Future<AllocatedMadeModel?> getAllocatedMade({required String token, required int page});
|
||||
Future<AllocatedMadeModel?> getAllocatedMade({
|
||||
required String token,
|
||||
required int page,
|
||||
});
|
||||
|
||||
Future<void> confirmAllocation({required String token, required Map<String, dynamic> allocation});
|
||||
Future<void> confirmAllocation({
|
||||
required String token,
|
||||
required Map<String, dynamic> allocation,
|
||||
});
|
||||
|
||||
Future<void> denyAllocation({required String token, required String allocationToken});
|
||||
Future<void> denyAllocation({
|
||||
required String token,
|
||||
required String allocationToken,
|
||||
});
|
||||
|
||||
Future<void> confirmAllAllocation({required String token, required List<String> allocationTokens});
|
||||
Future<void> confirmAllAllocation({
|
||||
required String token,
|
||||
required List<String> allocationTokens,
|
||||
});
|
||||
|
||||
Future<List<ProductModel>?> getRolesProducts({required String token});
|
||||
|
||||
Future<List<GuildModel>?> getGuilds({required String token, required bool isFree});
|
||||
Future<List<GuildModel>?> getGuilds({
|
||||
required String token,
|
||||
required bool isFree,
|
||||
});
|
||||
|
||||
Future<GuildProfile?> getProfile({required String token});
|
||||
|
||||
Future<void> postSubmitStewardAllocation({required String token, required SubmitStewardAllocation request});
|
||||
Future<void> postSubmitStewardAllocation({
|
||||
required String token,
|
||||
required SubmitStewardAllocation request,
|
||||
});
|
||||
|
||||
Future<StewardFreeBarDashboard?> getStewardDashboard({
|
||||
required String token,
|
||||
@@ -58,26 +93,50 @@ abstract class ChickenRepository {
|
||||
required String endDate,
|
||||
});
|
||||
|
||||
Future<PaginationModel<StewardFreeBar>?> getStewardPurchasesOutSideOfTheProvince({
|
||||
Future<PaginationModel<StewardFreeBar>?>
|
||||
getStewardPurchasesOutSideOfTheProvince({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<void> createStewardPurchasesOutSideOfTheProvince({
|
||||
required String token,
|
||||
required CreateStewardFreeBar body,
|
||||
});
|
||||
|
||||
Future<void> createStewardPurchasesOutSideOfTheProvince({required String token, required CreateStewardFreeBar body});
|
||||
Future<void> deleteStewardPurchasesOutSideOfTheProvince({
|
||||
required String token,
|
||||
required String stewardFreeBarKey,
|
||||
});
|
||||
|
||||
Future<void> deleteStewardPurchasesOutSideOfTheProvince({required String token, required String stewardFreeBarKey});
|
||||
|
||||
Future<PaginationModel<OutProvinceCarcassesBuyer>?> getOutProvinceCarcassesBuyer({
|
||||
Future<PaginationModel<OutProvinceCarcassesBuyer>?>
|
||||
getOutProvinceCarcassesBuyer({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
|
||||
Future<void> createOutProvinceCarcassesBuyer({required String token, required OutProvinceCarcassesBuyer body});
|
||||
|
||||
Future<void> createOutProvinceCarcassesBuyer({
|
||||
required String token,
|
||||
required OutProvinceCarcassesBuyer body,
|
||||
});
|
||||
|
||||
Future<List<IranProvinceCityModel>?> getProvince();
|
||||
|
||||
Future<List<IranProvinceCityModel>?> getCity({required String provinceName});
|
||||
|
||||
Future<PaginationModel<StewardFreeSaleBar>?> getStewardFreeSaleBar({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<void> createOutProvinceStewardFreeBar({
|
||||
required String token,
|
||||
required StewardFreeSaleBarRequest body,
|
||||
});
|
||||
|
||||
Future<void> updateOutProvinceStewardFreeBar({
|
||||
required String token,
|
||||
required StewardFreeSaleBarRequest body,
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:rasadyar_chicken/data/models/request/create_steward_free_bar/create_steward_free_bar.dart';
|
||||
import 'package:rasadyar_chicken/data/models/request/steward_free_sale_bar/steward_free_sale_bar_request.dart';
|
||||
import 'package:rasadyar_chicken/data/models/request/submit_steward_allocation/submit_steward_allocation.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/allocated_made/allocated_made.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/bar_information/bar_information.dart';
|
||||
@@ -14,7 +15,9 @@ import 'package:rasadyar_chicken/data/models/response/pagination_model/paginatio
|
||||
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/steward_free_bar/steward_free_bar.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/steward_free_bar_dashboard/steward_free_bar_dashboard.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/waiting_arrival/waiting_arrival.dart' hide ProductModel;
|
||||
import 'package:rasadyar_chicken/data/models/response/steward_free_sale_bar/steward_free_sale_bar.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/waiting_arrival/waiting_arrival.dart'
|
||||
hide ProductModel;
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
import 'chicken_repository.dart';
|
||||
@@ -29,14 +32,18 @@ class ChickenRepositoryImpl implements ChickenRepository {
|
||||
var res = await _httpClient.get(
|
||||
'/roles-products/?role=Steward',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
fromJsonList: (json) => (json).map((item) => InventoryModel.fromJson(item as Map<String, dynamic>)).toList(),
|
||||
fromJsonList: (json) => (json)
|
||||
.map((item) => InventoryModel.fromJson(item as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<KillHouseDistributionInfo?> getKillHouseDistributionInfo({required String token}) async {
|
||||
Future<KillHouseDistributionInfo?> getKillHouseDistributionInfo({
|
||||
required String token,
|
||||
}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/kill-house-distribution-info/?role=Steward',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
@@ -61,7 +68,10 @@ class ChickenRepositoryImpl implements ChickenRepository {
|
||||
}
|
||||
|
||||
@override
|
||||
Future<WaitingArrivalModel?> getWaitingArrivals({required String token, int? page}) async {
|
||||
Future<WaitingArrivalModel?> getWaitingArrivals({
|
||||
required String token,
|
||||
int? page,
|
||||
}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/steward-allocation/?search=filter&value=&role=Steward&page=${page ?? 1}&page_size=10&type=not_entered',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
@@ -71,12 +81,22 @@ class ChickenRepositoryImpl implements ChickenRepository {
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> setSateForArrivals({required String token, required Map<String, dynamic> request}) async {
|
||||
await _httpClient.put('/steward-allocation/0/', headers: {'Authorization': 'Bearer $token'}, data: request);
|
||||
Future<void> setSateForArrivals({
|
||||
required String token,
|
||||
required Map<String, dynamic> request,
|
||||
}) async {
|
||||
await _httpClient.put(
|
||||
'/steward-allocation/0/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
data: request,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<ImportedLoadsModel?> getImportedLoadsModel({required String token, required int page}) async {
|
||||
Future<ImportedLoadsModel?> getImportedLoadsModel({
|
||||
required String token,
|
||||
required int page,
|
||||
}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/steward-allocation/?role=Steward&search=filter&page=$page&page_size=10&value=&type=entered',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
@@ -86,7 +106,10 @@ class ChickenRepositoryImpl implements ChickenRepository {
|
||||
}
|
||||
|
||||
@override
|
||||
Future<AllocatedMadeModel?> getAllocatedMade({required String token, required int page}) async {
|
||||
Future<AllocatedMadeModel?> getAllocatedMade({
|
||||
required String token,
|
||||
required int page,
|
||||
}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/steward-allocation/?search=filter&value=&role=Steward&page=$page&page_size=100',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
@@ -96,7 +119,10 @@ class ChickenRepositoryImpl implements ChickenRepository {
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> confirmAllocation({required String token, required Map<String, dynamic> allocation}) async {
|
||||
Future<void> confirmAllocation({
|
||||
required String token,
|
||||
required Map<String, dynamic> allocation,
|
||||
}) async {
|
||||
var res = await _httpClient.put(
|
||||
'/steward-allocation/0/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
@@ -105,7 +131,10 @@ class ChickenRepositoryImpl implements ChickenRepository {
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> denyAllocation({required String token, required String allocationToken}) async {
|
||||
Future<void> denyAllocation({
|
||||
required String token,
|
||||
required String allocationToken,
|
||||
}) async {
|
||||
await _httpClient.delete(
|
||||
'/steward-allocation/0/?steward_allocation_key=$allocationToken',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
@@ -113,7 +142,10 @@ class ChickenRepositoryImpl implements ChickenRepository {
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> confirmAllAllocation({required String token, required List<String> allocationTokens}) async {
|
||||
Future<void> confirmAllAllocation({
|
||||
required String token,
|
||||
required List<String> allocationTokens,
|
||||
}) async {
|
||||
await _httpClient.put(
|
||||
'/steward-allocation/0/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
@@ -126,18 +158,25 @@ class ChickenRepositoryImpl implements ChickenRepository {
|
||||
var res = await _httpClient.get(
|
||||
'/roles-products/?role=Steward',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
fromJsonList: (json) => json.map((item) => ProductModel.fromJson(item as Map<String, dynamic>)).toList(),
|
||||
fromJsonList: (json) => json
|
||||
.map((item) => ProductModel.fromJson(item as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<List<GuildModel>?> getGuilds({required String token, required bool isFree}) async {
|
||||
Future<List<GuildModel>?> getGuilds({
|
||||
required String token,
|
||||
required bool isFree,
|
||||
}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/guilds/?role=Steward&free=$isFree',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
|
||||
fromJsonList: (json) => json.map((item) => GuildModel.fromJson(item as Map<String, dynamic>)).toList(),
|
||||
fromJsonList: (json) => json
|
||||
.map((item) => GuildModel.fromJson(item as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
@@ -153,8 +192,15 @@ class ChickenRepositoryImpl implements ChickenRepository {
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> postSubmitStewardAllocation({required String token, required SubmitStewardAllocation request}) async {
|
||||
await _httpClient.post('/steward-allocation/', headers: {'Authorization': 'Bearer $token'}, data: request.toJson());
|
||||
Future<void> postSubmitStewardAllocation({
|
||||
required String token,
|
||||
required SubmitStewardAllocation request,
|
||||
}) async {
|
||||
await _httpClient.post(
|
||||
'/steward-allocation/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
data: request.toJson(),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -186,7 +232,8 @@ class ChickenRepositoryImpl implements ChickenRepository {
|
||||
}
|
||||
|
||||
@override
|
||||
Future<PaginationModel<StewardFreeBar>?> getStewardPurchasesOutSideOfTheProvince({
|
||||
Future<PaginationModel<StewardFreeBar>?>
|
||||
getStewardPurchasesOutSideOfTheProvince({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
@@ -203,11 +250,18 @@ class ChickenRepositoryImpl implements ChickenRepository {
|
||||
}
|
||||
|
||||
@override
|
||||
Future<List<IranProvinceCityModel>?> getCity({required String provinceName}) async {
|
||||
Future<List<IranProvinceCityModel>?> getCity({
|
||||
required String provinceName,
|
||||
}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/iran_city/?',
|
||||
queryParameters: {'name': provinceName},
|
||||
fromJsonList: (json) => json.map((item) => IranProvinceCityModel.fromJson(item as Map<String, dynamic>)).toList(),
|
||||
fromJsonList: (json) => json
|
||||
.map(
|
||||
(item) =>
|
||||
IranProvinceCityModel.fromJson(item as Map<String, dynamic>),
|
||||
)
|
||||
.toList(),
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
@@ -216,7 +270,12 @@ class ChickenRepositoryImpl implements ChickenRepository {
|
||||
Future<List<IranProvinceCityModel>?> getProvince() async {
|
||||
var res = await _httpClient.get(
|
||||
'/iran_province/',
|
||||
fromJsonList: (json) => json.map((item) => IranProvinceCityModel.fromJson(item as Map<String, dynamic>)).toList(),
|
||||
fromJsonList: (json) => json
|
||||
.map(
|
||||
(item) =>
|
||||
IranProvinceCityModel.fromJson(item as Map<String, dynamic>),
|
||||
)
|
||||
.toList(),
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
@@ -246,7 +305,8 @@ class ChickenRepositoryImpl implements ChickenRepository {
|
||||
}
|
||||
|
||||
@override
|
||||
Future<PaginationModel<OutProvinceCarcassesBuyer>?> getOutProvinceCarcassesBuyer({
|
||||
Future<PaginationModel<OutProvinceCarcassesBuyer>?>
|
||||
getOutProvinceCarcassesBuyer({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
@@ -256,18 +316,68 @@ class ChickenRepositoryImpl implements ChickenRepository {
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
fromJson: (json) => PaginationModel<OutProvinceCarcassesBuyer>.fromJson(
|
||||
json,
|
||||
(json) => OutProvinceCarcassesBuyer.fromJson(json as Map<String, dynamic>),
|
||||
(json) =>
|
||||
OutProvinceCarcassesBuyer.fromJson(json as Map<String, dynamic>),
|
||||
),
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> createOutProvinceCarcassesBuyer({required String token, required OutProvinceCarcassesBuyer body}) async {
|
||||
Future<void> createOutProvinceCarcassesBuyer({
|
||||
required String token,
|
||||
required OutProvinceCarcassesBuyer body,
|
||||
}) async {
|
||||
await _httpClient.post(
|
||||
'/out-province-carcasses-buyer/',
|
||||
data: body.toJson()..removeWhere((key, value) => value == null),
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<PaginationModel<StewardFreeSaleBar>?> getStewardFreeSaleBar({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/steward_free_sale_bar/?',
|
||||
queryParameters: queryParameters,
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
fromJson: (json) => PaginationModel<StewardFreeSaleBar>.fromJson(
|
||||
json,
|
||||
(json) => StewardFreeSaleBar.fromJson(json as Map<String, dynamic>),
|
||||
),
|
||||
);
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> createOutProvinceStewardFreeBar({
|
||||
required String token,
|
||||
required StewardFreeSaleBarRequest body,
|
||||
}) async {
|
||||
await _httpClient.post(
|
||||
'/steward_free_sale_bar/',
|
||||
data: body.toJson()..removeWhere((key, value) => value == null),
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> updateOutProvinceStewardFreeBar({
|
||||
required String token,
|
||||
required StewardFreeSaleBarRequest body,
|
||||
}) async {
|
||||
await _httpClient.put(
|
||||
'/steward_free_sale_bar/0/',
|
||||
data: body.toJson()
|
||||
..removeWhere((key, value) => value == null)
|
||||
..addAll({
|
||||
'carcassWeight': body.weightOfCarcasses,
|
||||
'carcassCount': body.numberOfCarcasses,
|
||||
}),
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user