refactor: update data source and repository structure by removing unused files, enhancing model integration, and adjusting import paths for better organization
This commit is contained in:
@@ -26,10 +26,10 @@ import 'package:rasadyar_chicken/data/models/response/waiting_arrival/waiting_ar
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
abstract class ChickenRemoteDatasource {
|
||||
Future<List<ProductModel>?> getRolesProduct({
|
||||
Future<List<ProductModel>?> getRolesProducts({
|
||||
required String token,
|
||||
required String role,
|
||||
CancelToken? cancelToken,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
Future<KillHouseDistributionInfo?> getKillHouseDistributionInfo({
|
||||
required String token,
|
||||
@@ -75,11 +75,6 @@ abstract class ChickenRemoteDatasource {
|
||||
required List<String> allocationTokens,
|
||||
});
|
||||
|
||||
Future<List<ProductModel>?> getRolesProducts({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<List<GuildModel>?> getGuilds({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
|
||||
@@ -32,24 +32,6 @@ class ChickenRemoteDatasourceImp implements ChickenRemoteDatasource {
|
||||
|
||||
ChickenRemoteDatasourceImp(this._httpClient);
|
||||
|
||||
@override
|
||||
Future<List<ProductModel>?> getRolesProduct({
|
||||
required String token,
|
||||
required String role,
|
||||
CancelToken? cancelToken,
|
||||
}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/roles-products/?role=$role',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
queryParameters: {'role': role},
|
||||
fromJsonList: (json) => (json)
|
||||
.map((item) => ProductModel.fromJson(item as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<KillHouseDistributionInfo?> getKillHouseDistributionInfo({
|
||||
required String token,
|
||||
@@ -178,11 +160,13 @@ class ChickenRemoteDatasourceImp implements ChickenRemoteDatasource {
|
||||
@override
|
||||
Future<List<ProductModel>?> getRolesProducts({
|
||||
required String token,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/roles-products/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
cancelToken: cancelToken,
|
||||
queryParameters: queryParameters,
|
||||
fromJsonList: (json) => json
|
||||
.map((item) => ProductModel.fromJson(item as Map<String, dynamic>))
|
||||
|
||||
@@ -2,14 +2,11 @@ import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/response/kill_house/kill_house_response.dart';
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/response/kill_request_list/kill_request_list.dart'
|
||||
as listModel;
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/warehouse_and_distribution/response/kill_house_sales_info_dashboard.dart';
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/warehouse_and_distribution/response/kill_house_bars/kill_house_bars_response.dart';
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/warehouse_and_distribution/response/kill_house_sales_info_dashboard/kill_house_sales_info_dashboard.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
abstract class KillHouseRemoteDataSource {
|
||||
|
||||
|
||||
|
||||
|
||||
//region requestKill
|
||||
Future<List<KillHouseResponse>?> getKillHouseList({
|
||||
required String token,
|
||||
@@ -45,9 +42,10 @@ abstract class KillHouseRemoteDataSource {
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
Future<PaginationModel<KillHouseBarsResponse>?> getBarsForKillHouse({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
//endregion
|
||||
}
|
||||
|
||||
@@ -3,7 +3,8 @@ import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/response/kill_house/kill_house_response.dart';
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/response/kill_request_list/kill_request_list.dart'
|
||||
as listModel;
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/warehouse_and_distribution/response/kill_house_sales_info_dashboard.dart';
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/warehouse_and_distribution/response/kill_house_bars/kill_house_bars_response.dart';
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/warehouse_and_distribution/response/kill_house_sales_info_dashboard/kill_house_sales_info_dashboard.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
class KillHouseRemoteDataSourceImpl extends KillHouseRemoteDataSource {
|
||||
@@ -109,5 +110,24 @@ class KillHouseRemoteDataSourceImpl extends KillHouseRemoteDataSource {
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<PaginationModel<KillHouseBarsResponse>?> getBarsForKillHouse({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
var res = await _httpClient.get(
|
||||
'/bars_for_kill_house/',
|
||||
headers: {'Authorization': 'Bearer $token'},
|
||||
queryParameters: queryParameters,
|
||||
|
||||
fromJson: (json) => PaginationModel<KillHouseBarsResponse>.fromJson(
|
||||
json,
|
||||
(json) => KillHouseBarsResponse.fromJson(json as Map<String, dynamic>),
|
||||
),
|
||||
);
|
||||
|
||||
return res.data;
|
||||
}
|
||||
|
||||
//endregion
|
||||
}
|
||||
|
||||
@@ -100,7 +100,6 @@ Future<void> setupChickenDI() async {
|
||||
diChicken.registerLazySingleton<KillHouseRepository>(
|
||||
() => KillHouseRepositoryImpl(
|
||||
diChicken.get<KillHouseRemoteDataSource>(),
|
||||
diChicken.get<ChickenRepository>(),
|
||||
),
|
||||
);
|
||||
//endregion
|
||||
|
||||
@@ -0,0 +1,272 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'kill_house_bars_response.freezed.dart';
|
||||
part 'kill_house_bars_response.g.dart';
|
||||
|
||||
@freezed
|
||||
abstract class KillHouseBarsResponse with _$KillHouseBarsResponse {
|
||||
const factory KillHouseBarsResponse({
|
||||
KillHouseUserModel? killhouseUser,
|
||||
KillHouseUserModel? killer,
|
||||
AddCarModel? addCar,
|
||||
PoultryRequestModel? poultryRequest,
|
||||
WeightInfoModel? weightInfo,
|
||||
String? key,
|
||||
String? createDate,
|
||||
bool? trash,
|
||||
int? quantity,
|
||||
int? barCode,
|
||||
int? quarantineQuantity,
|
||||
String? quarantineCodeState,
|
||||
double? fee,
|
||||
String? time,
|
||||
String? state,
|
||||
String? vetState,
|
||||
String? activeState,
|
||||
String? assignmentStateArchive,
|
||||
String? showKillHouse,
|
||||
CarModel? car,
|
||||
String? killHouseMessage,
|
||||
String? allocationState,
|
||||
bool? auction,
|
||||
String? role,
|
||||
String? clearanceCode,
|
||||
String? trafficCode,
|
||||
RegistrarClearanceCode? registrarClearanceCode,
|
||||
String? editorTrafficCode,
|
||||
String? barRemover,
|
||||
int? extraKilledQuantity,
|
||||
int? acceptedRealQuantity,
|
||||
double? acceptedRealWeight,
|
||||
double? extraKilledWeight,
|
||||
int? vetAcceptedRealQuantity,
|
||||
double? vetAcceptedRealWeight,
|
||||
int? acceptedAssignmentRealQuantity,
|
||||
double? acceptedAssignmentRealWeight,
|
||||
String? message,
|
||||
bool? wareHouseConfirmation,
|
||||
int? wareHouseAcceptedRealQuantity,
|
||||
double? wareHouseAcceptedRealWeight,
|
||||
String? dateOfWareHouse,
|
||||
bool? freezing,
|
||||
bool? archiveWage,
|
||||
double? weightLoss,
|
||||
String? wareHouseInputType,
|
||||
String? documentStatus,
|
||||
String? aggregateCode,
|
||||
bool? aggregateStatus,
|
||||
bool? calculateStatus,
|
||||
bool? temporaryTrash,
|
||||
bool? temporaryDeleted,
|
||||
String? enteredMessage,
|
||||
String? inquiryDate,
|
||||
String? inquiryOrigin,
|
||||
String? inquiryDestination,
|
||||
String? inquiryDriver,
|
||||
String? inquiryPelak,
|
||||
String? settlementType,
|
||||
double? price,
|
||||
String? description,
|
||||
String? barDocumentDescription,
|
||||
String? image,
|
||||
String? priceRegisterar,
|
||||
String? priceRegisterarRole,
|
||||
String? priceRegisterDate,
|
||||
String? priceEditor,
|
||||
String? priceEditorRole,
|
||||
String? priceEditorDate,
|
||||
bool? nonReceipt,
|
||||
bool? nonReceiptReturn,
|
||||
String? nonReceiptReturnMessage,
|
||||
String? nonReceiptMessage,
|
||||
bool? mainNonReceipt,
|
||||
String? nonReceiptState,
|
||||
String? nonReceiptChecker,
|
||||
String? nonReceiptCheckerMessage,
|
||||
String? nonReceiptCheckerMobile,
|
||||
String? nonReceiptCheckDate,
|
||||
String? nonReceiptReturner,
|
||||
String? nonReceiptReturnerMobile,
|
||||
String? nonReceiptReturnDate,
|
||||
bool? fine,
|
||||
double? fineAmount,
|
||||
double? fineCoefficient,
|
||||
String? documentNumber,
|
||||
bool? companyDocument,
|
||||
bool? warehouse,
|
||||
double? warehouseCommitmentWeight,
|
||||
bool? returnTrash,
|
||||
double? amount,
|
||||
int? killRequest,
|
||||
String? realAddCar,
|
||||
String? barDocumentStatus,
|
||||
int? inputWarehouse,
|
||||
}) = _KillHouseBars;
|
||||
|
||||
factory KillHouseBarsResponse.fromJson(Map<String, dynamic> json) =>
|
||||
_$KillHouseBarsFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class KillHouseUserModel with _$KillHouseUserModel {
|
||||
const factory KillHouseUserModel({
|
||||
KillHouseOperatorModel? killHouseOperator,
|
||||
String? name,
|
||||
bool? killer,
|
||||
String? key,
|
||||
double? maximumLoadVolumeIncrease,
|
||||
double? maximumLoadVolumeReduction,
|
||||
}) = _KillHouseUserModel;
|
||||
|
||||
factory KillHouseUserModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$KillHouseUserModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class KillHouseOperatorModel with _$KillHouseOperatorModel {
|
||||
const factory KillHouseOperatorModel({UserDetailModel? user}) =
|
||||
_KillHouseOperatorModel;
|
||||
|
||||
factory KillHouseOperatorModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$KillHouseOperatorModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class UserDetailModel with _$UserDetailModel {
|
||||
const factory UserDetailModel({
|
||||
String? fullname,
|
||||
String? firstName,
|
||||
String? lastName,
|
||||
int? baseOrder,
|
||||
String? mobile,
|
||||
String? nationalId,
|
||||
String? nationalCode,
|
||||
String? key,
|
||||
CityDetailModel? city,
|
||||
String? unitName,
|
||||
String? unitNationalId,
|
||||
String? unitRegistrationNumber,
|
||||
String? unitEconomicalNumber,
|
||||
String? unitProvince,
|
||||
String? unitCity,
|
||||
String? unitPostalCode,
|
||||
String? unitAddress,
|
||||
}) = _UserDetailModel;
|
||||
|
||||
factory UserDetailModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$UserDetailModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class CityDetailModel with _$CityDetailModel {
|
||||
const factory CityDetailModel({
|
||||
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,
|
||||
String? createdBy,
|
||||
String? modifiedBy,
|
||||
int? province,
|
||||
}) = _CityDetailModel;
|
||||
|
||||
factory CityDetailModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$CityDetailModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class AddCarModel with _$AddCarModel {
|
||||
const factory AddCarModel({DriverModel? driver}) = _AddCarModel;
|
||||
|
||||
factory AddCarModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$AddCarModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class DriverModel with _$DriverModel {
|
||||
const factory DriverModel({
|
||||
String? driverName,
|
||||
String? driverMobile,
|
||||
String? typeCar,
|
||||
String? pelak,
|
||||
String? healthCode,
|
||||
}) = _DriverModel;
|
||||
|
||||
factory DriverModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$DriverModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class PoultryRequestModel with _$PoultryRequestModel {
|
||||
const factory PoultryRequestModel({
|
||||
int? poultryReqOrderCode,
|
||||
String? poultryName,
|
||||
String? poultryUserName,
|
||||
String? poultryMobile,
|
||||
String? poultryCity,
|
||||
String? chickenBreed,
|
||||
String? date,
|
||||
bool? freezing,
|
||||
bool? export,
|
||||
bool? freeSaleInProvince,
|
||||
bool? directBuying,
|
||||
}) = _PoultryRequestModel;
|
||||
|
||||
factory PoultryRequestModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$PoultryRequestModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class WeightInfoModel with _$WeightInfoModel {
|
||||
const factory WeightInfoModel({
|
||||
double? indexWeight,
|
||||
double? weight,
|
||||
double? finalIndexWeight,
|
||||
double? killHousePrice,
|
||||
int? weightLoss,
|
||||
double? inputLoss,
|
||||
String? state,
|
||||
}) = _WeightInfoModel;
|
||||
|
||||
factory WeightInfoModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$WeightInfoModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class CarModel with _$CarModel {
|
||||
const factory CarModel({
|
||||
int? id,
|
||||
String? key,
|
||||
String? pelak,
|
||||
//Object? capocity,
|
||||
String? typeCar,
|
||||
String? driverName,
|
||||
String? driverMobile,
|
||||
String? weightWithoutLoad,
|
||||
}) = _CarModel;
|
||||
|
||||
factory CarModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$CarModelFromJson(json);
|
||||
}
|
||||
|
||||
@freezed
|
||||
abstract class RegistrarClearanceCode with _$RegistrarClearanceCode {
|
||||
const factory RegistrarClearanceCode({
|
||||
String? date,
|
||||
String? name,
|
||||
String? role,
|
||||
String? mobile,
|
||||
}) = _RegistrarClearanceCode;
|
||||
|
||||
factory RegistrarClearanceCode.fromJson(Map<String, dynamic> json) =>
|
||||
_$RegistrarClearanceCodeFromJson(json);
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,474 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'kill_house_bars_response.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_KillHouseBars _$KillHouseBarsFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _KillHouseBars(
|
||||
killhouseUser: json['killhouse_user'] == null
|
||||
? null
|
||||
: KillHouseUserModel.fromJson(
|
||||
json['killhouse_user'] as Map<String, dynamic>,
|
||||
),
|
||||
killer: json['killer'] == null
|
||||
? null
|
||||
: KillHouseUserModel.fromJson(json['killer'] as Map<String, dynamic>),
|
||||
addCar: json['add_car'] == null
|
||||
? null
|
||||
: AddCarModel.fromJson(json['add_car'] as Map<String, dynamic>),
|
||||
poultryRequest: json['poultry_request'] == null
|
||||
? null
|
||||
: PoultryRequestModel.fromJson(
|
||||
json['poultry_request'] as Map<String, dynamic>,
|
||||
),
|
||||
weightInfo: json['weight_info'] == null
|
||||
? null
|
||||
: WeightInfoModel.fromJson(json['weight_info'] as Map<String, dynamic>),
|
||||
key: json['key'] as String?,
|
||||
createDate: json['create_date'] as String?,
|
||||
trash: json['trash'] as bool?,
|
||||
quantity: (json['quantity'] as num?)?.toInt(),
|
||||
barCode: (json['bar_code'] as num?)?.toInt(),
|
||||
quarantineQuantity: (json['quarantine_quantity'] as num?)?.toInt(),
|
||||
quarantineCodeState: json['quarantine_code_state'] as String?,
|
||||
fee: (json['fee'] as num?)?.toDouble(),
|
||||
time: json['time'] as String?,
|
||||
state: json['state'] as String?,
|
||||
vetState: json['vet_state'] as String?,
|
||||
activeState: json['active_state'] as String?,
|
||||
assignmentStateArchive: json['assignment_state_archive'] as String?,
|
||||
showKillHouse: json['show_kill_house'] as String?,
|
||||
car: json['car'] == null
|
||||
? null
|
||||
: CarModel.fromJson(json['car'] as Map<String, dynamic>),
|
||||
killHouseMessage: json['kill_house_message'] as String?,
|
||||
allocationState: json['allocation_state'] as String?,
|
||||
auction: json['auction'] as bool?,
|
||||
role: json['role'] as String?,
|
||||
clearanceCode: json['clearance_code'] as String?,
|
||||
trafficCode: json['traffic_code'] as String?,
|
||||
registrarClearanceCode: json['registrar_clearance_code'] == null
|
||||
? null
|
||||
: RegistrarClearanceCode.fromJson(
|
||||
json['registrar_clearance_code'] as Map<String, dynamic>,
|
||||
),
|
||||
editorTrafficCode: json['editor_traffic_code'] as String?,
|
||||
barRemover: json['bar_remover'] as String?,
|
||||
extraKilledQuantity: (json['extra_killed_quantity'] as num?)?.toInt(),
|
||||
acceptedRealQuantity: (json['accepted_real_quantity'] as num?)?.toInt(),
|
||||
acceptedRealWeight: (json['accepted_real_weight'] as num?)?.toDouble(),
|
||||
extraKilledWeight: (json['extra_killed_weight'] as num?)?.toDouble(),
|
||||
vetAcceptedRealQuantity: (json['vet_accepted_real_quantity'] as num?)
|
||||
?.toInt(),
|
||||
vetAcceptedRealWeight: (json['vet_accepted_real_weight'] as num?)?.toDouble(),
|
||||
acceptedAssignmentRealQuantity:
|
||||
(json['accepted_assignment_real_quantity'] as num?)?.toInt(),
|
||||
acceptedAssignmentRealWeight:
|
||||
(json['accepted_assignment_real_weight'] as num?)?.toDouble(),
|
||||
message: json['message'] as String?,
|
||||
wareHouseConfirmation: json['ware_house_confirmation'] as bool?,
|
||||
wareHouseAcceptedRealQuantity:
|
||||
(json['ware_house_accepted_real_quantity'] as num?)?.toInt(),
|
||||
wareHouseAcceptedRealWeight: (json['ware_house_accepted_real_weight'] as num?)
|
||||
?.toDouble(),
|
||||
dateOfWareHouse: json['date_of_ware_house'] as String?,
|
||||
freezing: json['freezing'] as bool?,
|
||||
archiveWage: json['archive_wage'] as bool?,
|
||||
weightLoss: (json['weight_loss'] as num?)?.toDouble(),
|
||||
wareHouseInputType: json['ware_house_input_type'] as String?,
|
||||
documentStatus: json['document_status'] as String?,
|
||||
aggregateCode: json['aggregate_code'] as String?,
|
||||
aggregateStatus: json['aggregate_status'] as bool?,
|
||||
calculateStatus: json['calculate_status'] as bool?,
|
||||
temporaryTrash: json['temporary_trash'] as bool?,
|
||||
temporaryDeleted: json['temporary_deleted'] as bool?,
|
||||
enteredMessage: json['entered_message'] as String?,
|
||||
inquiryDate: json['inquiry_date'] as String?,
|
||||
inquiryOrigin: json['inquiry_origin'] as String?,
|
||||
inquiryDestination: json['inquiry_destination'] as String?,
|
||||
inquiryDriver: json['inquiry_driver'] as String?,
|
||||
inquiryPelak: json['inquiry_pelak'] as String?,
|
||||
settlementType: json['settlement_type'] as String?,
|
||||
price: (json['price'] as num?)?.toDouble(),
|
||||
description: json['description'] as String?,
|
||||
barDocumentDescription: json['bar_document_description'] as String?,
|
||||
image: json['image'] as String?,
|
||||
priceRegisterar: json['price_registerar'] as String?,
|
||||
priceRegisterarRole: json['price_registerar_role'] as String?,
|
||||
priceRegisterDate: json['price_register_date'] as String?,
|
||||
priceEditor: json['price_editor'] as String?,
|
||||
priceEditorRole: json['price_editor_role'] as String?,
|
||||
priceEditorDate: json['price_editor_date'] as String?,
|
||||
nonReceipt: json['non_receipt'] as bool?,
|
||||
nonReceiptReturn: json['non_receipt_return'] as bool?,
|
||||
nonReceiptReturnMessage: json['non_receipt_return_message'] as String?,
|
||||
nonReceiptMessage: json['non_receipt_message'] as String?,
|
||||
mainNonReceipt: json['main_non_receipt'] as bool?,
|
||||
nonReceiptState: json['non_receipt_state'] as String?,
|
||||
nonReceiptChecker: json['non_receipt_checker'] as String?,
|
||||
nonReceiptCheckerMessage: json['non_receipt_checker_message'] as String?,
|
||||
nonReceiptCheckerMobile: json['non_receipt_checker_mobile'] as String?,
|
||||
nonReceiptCheckDate: json['non_receipt_check_date'] as String?,
|
||||
nonReceiptReturner: json['non_receipt_returner'] as String?,
|
||||
nonReceiptReturnerMobile: json['non_receipt_returner_mobile'] as String?,
|
||||
nonReceiptReturnDate: json['non_receipt_return_date'] as String?,
|
||||
fine: json['fine'] as bool?,
|
||||
fineAmount: (json['fine_amount'] as num?)?.toDouble(),
|
||||
fineCoefficient: (json['fine_coefficient'] as num?)?.toDouble(),
|
||||
documentNumber: json['document_number'] as String?,
|
||||
companyDocument: json['company_document'] as bool?,
|
||||
warehouse: json['warehouse'] as bool?,
|
||||
warehouseCommitmentWeight: (json['warehouse_commitment_weight'] as num?)
|
||||
?.toDouble(),
|
||||
returnTrash: json['return_trash'] as bool?,
|
||||
amount: (json['amount'] as num?)?.toDouble(),
|
||||
killRequest: (json['kill_request'] as num?)?.toInt(),
|
||||
realAddCar: json['real_add_car'] as String?,
|
||||
barDocumentStatus: json['bar_document_status'] as String?,
|
||||
inputWarehouse: (json['input_warehouse'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$KillHouseBarsToJson(
|
||||
_KillHouseBars instance,
|
||||
) => <String, dynamic>{
|
||||
'killhouse_user': instance.killhouseUser,
|
||||
'killer': instance.killer,
|
||||
'add_car': instance.addCar,
|
||||
'poultry_request': instance.poultryRequest,
|
||||
'weight_info': instance.weightInfo,
|
||||
'key': instance.key,
|
||||
'create_date': instance.createDate,
|
||||
'trash': instance.trash,
|
||||
'quantity': instance.quantity,
|
||||
'bar_code': instance.barCode,
|
||||
'quarantine_quantity': instance.quarantineQuantity,
|
||||
'quarantine_code_state': instance.quarantineCodeState,
|
||||
'fee': instance.fee,
|
||||
'time': instance.time,
|
||||
'state': instance.state,
|
||||
'vet_state': instance.vetState,
|
||||
'active_state': instance.activeState,
|
||||
'assignment_state_archive': instance.assignmentStateArchive,
|
||||
'show_kill_house': instance.showKillHouse,
|
||||
'car': instance.car,
|
||||
'kill_house_message': instance.killHouseMessage,
|
||||
'allocation_state': instance.allocationState,
|
||||
'auction': instance.auction,
|
||||
'role': instance.role,
|
||||
'clearance_code': instance.clearanceCode,
|
||||
'traffic_code': instance.trafficCode,
|
||||
'registrar_clearance_code': instance.registrarClearanceCode,
|
||||
'editor_traffic_code': instance.editorTrafficCode,
|
||||
'bar_remover': instance.barRemover,
|
||||
'extra_killed_quantity': instance.extraKilledQuantity,
|
||||
'accepted_real_quantity': instance.acceptedRealQuantity,
|
||||
'accepted_real_weight': instance.acceptedRealWeight,
|
||||
'extra_killed_weight': instance.extraKilledWeight,
|
||||
'vet_accepted_real_quantity': instance.vetAcceptedRealQuantity,
|
||||
'vet_accepted_real_weight': instance.vetAcceptedRealWeight,
|
||||
'accepted_assignment_real_quantity': instance.acceptedAssignmentRealQuantity,
|
||||
'accepted_assignment_real_weight': instance.acceptedAssignmentRealWeight,
|
||||
'message': instance.message,
|
||||
'ware_house_confirmation': instance.wareHouseConfirmation,
|
||||
'ware_house_accepted_real_quantity': instance.wareHouseAcceptedRealQuantity,
|
||||
'ware_house_accepted_real_weight': instance.wareHouseAcceptedRealWeight,
|
||||
'date_of_ware_house': instance.dateOfWareHouse,
|
||||
'freezing': instance.freezing,
|
||||
'archive_wage': instance.archiveWage,
|
||||
'weight_loss': instance.weightLoss,
|
||||
'ware_house_input_type': instance.wareHouseInputType,
|
||||
'document_status': instance.documentStatus,
|
||||
'aggregate_code': instance.aggregateCode,
|
||||
'aggregate_status': instance.aggregateStatus,
|
||||
'calculate_status': instance.calculateStatus,
|
||||
'temporary_trash': instance.temporaryTrash,
|
||||
'temporary_deleted': instance.temporaryDeleted,
|
||||
'entered_message': instance.enteredMessage,
|
||||
'inquiry_date': instance.inquiryDate,
|
||||
'inquiry_origin': instance.inquiryOrigin,
|
||||
'inquiry_destination': instance.inquiryDestination,
|
||||
'inquiry_driver': instance.inquiryDriver,
|
||||
'inquiry_pelak': instance.inquiryPelak,
|
||||
'settlement_type': instance.settlementType,
|
||||
'price': instance.price,
|
||||
'description': instance.description,
|
||||
'bar_document_description': instance.barDocumentDescription,
|
||||
'image': instance.image,
|
||||
'price_registerar': instance.priceRegisterar,
|
||||
'price_registerar_role': instance.priceRegisterarRole,
|
||||
'price_register_date': instance.priceRegisterDate,
|
||||
'price_editor': instance.priceEditor,
|
||||
'price_editor_role': instance.priceEditorRole,
|
||||
'price_editor_date': instance.priceEditorDate,
|
||||
'non_receipt': instance.nonReceipt,
|
||||
'non_receipt_return': instance.nonReceiptReturn,
|
||||
'non_receipt_return_message': instance.nonReceiptReturnMessage,
|
||||
'non_receipt_message': instance.nonReceiptMessage,
|
||||
'main_non_receipt': instance.mainNonReceipt,
|
||||
'non_receipt_state': instance.nonReceiptState,
|
||||
'non_receipt_checker': instance.nonReceiptChecker,
|
||||
'non_receipt_checker_message': instance.nonReceiptCheckerMessage,
|
||||
'non_receipt_checker_mobile': instance.nonReceiptCheckerMobile,
|
||||
'non_receipt_check_date': instance.nonReceiptCheckDate,
|
||||
'non_receipt_returner': instance.nonReceiptReturner,
|
||||
'non_receipt_returner_mobile': instance.nonReceiptReturnerMobile,
|
||||
'non_receipt_return_date': instance.nonReceiptReturnDate,
|
||||
'fine': instance.fine,
|
||||
'fine_amount': instance.fineAmount,
|
||||
'fine_coefficient': instance.fineCoefficient,
|
||||
'document_number': instance.documentNumber,
|
||||
'company_document': instance.companyDocument,
|
||||
'warehouse': instance.warehouse,
|
||||
'warehouse_commitment_weight': instance.warehouseCommitmentWeight,
|
||||
'return_trash': instance.returnTrash,
|
||||
'amount': instance.amount,
|
||||
'kill_request': instance.killRequest,
|
||||
'real_add_car': instance.realAddCar,
|
||||
'bar_document_status': instance.barDocumentStatus,
|
||||
'input_warehouse': instance.inputWarehouse,
|
||||
};
|
||||
|
||||
_KillHouseUserModel _$KillHouseUserModelFromJson(Map<String, dynamic> json) =>
|
||||
_KillHouseUserModel(
|
||||
killHouseOperator: json['kill_house_operator'] == null
|
||||
? null
|
||||
: KillHouseOperatorModel.fromJson(
|
||||
json['kill_house_operator'] as Map<String, dynamic>,
|
||||
),
|
||||
name: json['name'] as String?,
|
||||
killer: json['killer'] as bool?,
|
||||
key: json['key'] as String?,
|
||||
maximumLoadVolumeIncrease: (json['maximum_load_volume_increase'] as num?)
|
||||
?.toDouble(),
|
||||
maximumLoadVolumeReduction:
|
||||
(json['maximum_load_volume_reduction'] as num?)?.toDouble(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$KillHouseUserModelToJson(_KillHouseUserModel instance) =>
|
||||
<String, dynamic>{
|
||||
'kill_house_operator': instance.killHouseOperator,
|
||||
'name': instance.name,
|
||||
'killer': instance.killer,
|
||||
'key': instance.key,
|
||||
'maximum_load_volume_increase': instance.maximumLoadVolumeIncrease,
|
||||
'maximum_load_volume_reduction': instance.maximumLoadVolumeReduction,
|
||||
};
|
||||
|
||||
_KillHouseOperatorModel _$KillHouseOperatorModelFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _KillHouseOperatorModel(
|
||||
user: json['user'] == null
|
||||
? null
|
||||
: UserDetailModel.fromJson(json['user'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$KillHouseOperatorModelToJson(
|
||||
_KillHouseOperatorModel instance,
|
||||
) => <String, dynamic>{'user': instance.user};
|
||||
|
||||
_UserDetailModel _$UserDetailModelFromJson(Map<String, dynamic> json) =>
|
||||
_UserDetailModel(
|
||||
fullname: json['fullname'] 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
|
||||
: CityDetailModel.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> _$UserDetailModelToJson(_UserDetailModel instance) =>
|
||||
<String, dynamic>{
|
||||
'fullname': 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,
|
||||
};
|
||||
|
||||
_CityDetailModel _$CityDetailModelFromJson(Map<String, dynamic> json) =>
|
||||
_CityDetailModel(
|
||||
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'] as String?,
|
||||
modifiedBy: json['modified_by'] as String?,
|
||||
province: (json['province'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$CityDetailModelToJson(_CityDetailModel 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,
|
||||
};
|
||||
|
||||
_AddCarModel _$AddCarModelFromJson(Map<String, dynamic> json) => _AddCarModel(
|
||||
driver: json['driver'] == null
|
||||
? null
|
||||
: DriverModel.fromJson(json['driver'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$AddCarModelToJson(_AddCarModel instance) =>
|
||||
<String, dynamic>{'driver': instance.driver};
|
||||
|
||||
_DriverModel _$DriverModelFromJson(Map<String, dynamic> json) => _DriverModel(
|
||||
driverName: json['driver_name'] as String?,
|
||||
driverMobile: json['driver_mobile'] as String?,
|
||||
typeCar: json['type_car'] as String?,
|
||||
pelak: json['pelak'] as String?,
|
||||
healthCode: json['health_code'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$DriverModelToJson(_DriverModel instance) =>
|
||||
<String, dynamic>{
|
||||
'driver_name': instance.driverName,
|
||||
'driver_mobile': instance.driverMobile,
|
||||
'type_car': instance.typeCar,
|
||||
'pelak': instance.pelak,
|
||||
'health_code': instance.healthCode,
|
||||
};
|
||||
|
||||
_PoultryRequestModel _$PoultryRequestModelFromJson(Map<String, dynamic> json) =>
|
||||
_PoultryRequestModel(
|
||||
poultryReqOrderCode: (json['poultry_req_order_code'] as num?)?.toInt(),
|
||||
poultryName: json['poultry_name'] as String?,
|
||||
poultryUserName: json['poultry_user_name'] as String?,
|
||||
poultryMobile: json['poultry_mobile'] as String?,
|
||||
poultryCity: json['poultry_city'] as String?,
|
||||
chickenBreed: json['chicken_breed'] as String?,
|
||||
date: json['date'] as String?,
|
||||
freezing: json['freezing'] as bool?,
|
||||
export: json['export'] as bool?,
|
||||
freeSaleInProvince: json['free_sale_in_province'] as bool?,
|
||||
directBuying: json['direct_buying'] as bool?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$PoultryRequestModelToJson(
|
||||
_PoultryRequestModel instance,
|
||||
) => <String, dynamic>{
|
||||
'poultry_req_order_code': instance.poultryReqOrderCode,
|
||||
'poultry_name': instance.poultryName,
|
||||
'poultry_user_name': instance.poultryUserName,
|
||||
'poultry_mobile': instance.poultryMobile,
|
||||
'poultry_city': instance.poultryCity,
|
||||
'chicken_breed': instance.chickenBreed,
|
||||
'date': instance.date,
|
||||
'freezing': instance.freezing,
|
||||
'export': instance.export,
|
||||
'free_sale_in_province': instance.freeSaleInProvince,
|
||||
'direct_buying': instance.directBuying,
|
||||
};
|
||||
|
||||
_WeightInfoModel _$WeightInfoModelFromJson(Map<String, dynamic> json) =>
|
||||
_WeightInfoModel(
|
||||
indexWeight: (json['index_weight'] as num?)?.toDouble(),
|
||||
weight: (json['weight'] as num?)?.toDouble(),
|
||||
finalIndexWeight: (json['final_index_weight'] as num?)?.toDouble(),
|
||||
killHousePrice: (json['kill_house_price'] as num?)?.toDouble(),
|
||||
weightLoss: (json['weight_loss'] as num?)?.toInt(),
|
||||
inputLoss: (json['input_loss'] as num?)?.toDouble(),
|
||||
state: json['state'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$WeightInfoModelToJson(_WeightInfoModel instance) =>
|
||||
<String, dynamic>{
|
||||
'index_weight': instance.indexWeight,
|
||||
'weight': instance.weight,
|
||||
'final_index_weight': instance.finalIndexWeight,
|
||||
'kill_house_price': instance.killHousePrice,
|
||||
'weight_loss': instance.weightLoss,
|
||||
'input_loss': instance.inputLoss,
|
||||
'state': instance.state,
|
||||
};
|
||||
|
||||
_CarModel _$CarModelFromJson(Map<String, dynamic> json) => _CarModel(
|
||||
id: (json['id'] as num?)?.toInt(),
|
||||
key: json['key'] as String?,
|
||||
pelak: json['pelak'] as String?,
|
||||
typeCar: json['type_car'] as String?,
|
||||
driverName: json['driver_name'] as String?,
|
||||
driverMobile: json['driver_mobile'] as String?,
|
||||
weightWithoutLoad: json['weight_without_load'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$CarModelToJson(_CarModel instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'key': instance.key,
|
||||
'pelak': instance.pelak,
|
||||
'type_car': instance.typeCar,
|
||||
'driver_name': instance.driverName,
|
||||
'driver_mobile': instance.driverMobile,
|
||||
'weight_without_load': instance.weightWithoutLoad,
|
||||
};
|
||||
|
||||
_RegistrarClearanceCode _$RegistrarClearanceCodeFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _RegistrarClearanceCode(
|
||||
date: json['date'] as String?,
|
||||
name: json['name'] as String?,
|
||||
role: json['role'] as String?,
|
||||
mobile: json['mobile'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$RegistrarClearanceCodeToJson(
|
||||
_RegistrarClearanceCode instance,
|
||||
) => <String, dynamic>{
|
||||
'date': instance.date,
|
||||
'name': instance.name,
|
||||
'role': instance.role,
|
||||
'mobile': instance.mobile,
|
||||
};
|
||||
@@ -16,6 +16,7 @@ abstract class CreateStewardFreeBar with _$CreateStewardFreeBar {
|
||||
int? numberOfCarcasses,
|
||||
String? date,
|
||||
String? barImage,
|
||||
String? distributionType,
|
||||
}) = _CreateStewardFreeBar;
|
||||
|
||||
factory CreateStewardFreeBar.fromJson(Map<String, dynamic> json) =>
|
||||
|
||||
@@ -15,7 +15,7 @@ T _$identity<T>(T value) => value;
|
||||
/// @nodoc
|
||||
mixin _$CreateStewardFreeBar {
|
||||
|
||||
String? get productKey; String? get key; String? get killHouseName; String? get killHouseMobile; String? get province; String? get city; int? get weightOfCarcasses; int? get numberOfCarcasses; String? get date; String? get barImage;
|
||||
String? get productKey; String? get key; String? get killHouseName; String? get killHouseMobile; String? get province; String? get city; int? get weightOfCarcasses; int? get numberOfCarcasses; String? get date; String? get barImage; String? get distributionType;
|
||||
/// Create a copy of CreateStewardFreeBar
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -28,16 +28,16 @@ $CreateStewardFreeBarCopyWith<CreateStewardFreeBar> get copyWith => _$CreateStew
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is CreateStewardFreeBar&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.key, key) || other.key == key)&&(identical(other.killHouseName, killHouseName) || other.killHouseName == killHouseName)&&(identical(other.killHouseMobile, killHouseMobile) || other.killHouseMobile == killHouseMobile)&&(identical(other.province, province) || other.province == province)&&(identical(other.city, city) || other.city == city)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.date, date) || other.date == date)&&(identical(other.barImage, barImage) || other.barImage == barImage));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is CreateStewardFreeBar&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.key, key) || other.key == key)&&(identical(other.killHouseName, killHouseName) || other.killHouseName == killHouseName)&&(identical(other.killHouseMobile, killHouseMobile) || other.killHouseMobile == killHouseMobile)&&(identical(other.province, province) || other.province == province)&&(identical(other.city, city) || other.city == city)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.date, date) || other.date == date)&&(identical(other.barImage, barImage) || other.barImage == barImage)&&(identical(other.distributionType, distributionType) || other.distributionType == distributionType));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,productKey,key,killHouseName,killHouseMobile,province,city,weightOfCarcasses,numberOfCarcasses,date,barImage);
|
||||
int get hashCode => Object.hash(runtimeType,productKey,key,killHouseName,killHouseMobile,province,city,weightOfCarcasses,numberOfCarcasses,date,barImage,distributionType);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'CreateStewardFreeBar(productKey: $productKey, key: $key, killHouseName: $killHouseName, killHouseMobile: $killHouseMobile, province: $province, city: $city, weightOfCarcasses: $weightOfCarcasses, numberOfCarcasses: $numberOfCarcasses, date: $date, barImage: $barImage)';
|
||||
return 'CreateStewardFreeBar(productKey: $productKey, key: $key, killHouseName: $killHouseName, killHouseMobile: $killHouseMobile, province: $province, city: $city, weightOfCarcasses: $weightOfCarcasses, numberOfCarcasses: $numberOfCarcasses, date: $date, barImage: $barImage, distributionType: $distributionType)';
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ abstract mixin class $CreateStewardFreeBarCopyWith<$Res> {
|
||||
factory $CreateStewardFreeBarCopyWith(CreateStewardFreeBar value, $Res Function(CreateStewardFreeBar) _then) = _$CreateStewardFreeBarCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String? productKey, String? key, String? killHouseName, String? killHouseMobile, String? province, String? city, int? weightOfCarcasses, int? numberOfCarcasses, String? date, String? barImage
|
||||
String? productKey, String? key, String? killHouseName, String? killHouseMobile, String? province, String? city, int? weightOfCarcasses, int? numberOfCarcasses, String? date, String? barImage, String? distributionType
|
||||
});
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ class _$CreateStewardFreeBarCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of CreateStewardFreeBar
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? productKey = freezed,Object? key = freezed,Object? killHouseName = freezed,Object? killHouseMobile = freezed,Object? province = freezed,Object? city = freezed,Object? weightOfCarcasses = freezed,Object? numberOfCarcasses = freezed,Object? date = freezed,Object? barImage = freezed,}) {
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? productKey = freezed,Object? key = freezed,Object? killHouseName = freezed,Object? killHouseMobile = freezed,Object? province = freezed,Object? city = freezed,Object? weightOfCarcasses = freezed,Object? numberOfCarcasses = freezed,Object? date = freezed,Object? barImage = freezed,Object? distributionType = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
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
|
||||
@@ -77,6 +77,7 @@ as String?,weightOfCarcasses: freezed == weightOfCarcasses ? _self.weightOfCarca
|
||||
as int?,numberOfCarcasses: freezed == numberOfCarcasses ? _self.numberOfCarcasses : numberOfCarcasses // ignore: cast_nullable_to_non_nullable
|
||||
as int?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
||||
as String?,barImage: freezed == barImage ? _self.barImage : barImage // ignore: cast_nullable_to_non_nullable
|
||||
as String?,distributionType: freezed == distributionType ? _self.distributionType : distributionType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
@@ -162,10 +163,10 @@ return $default(_that);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? productKey, String? key, String? killHouseName, String? killHouseMobile, String? province, String? city, int? weightOfCarcasses, int? numberOfCarcasses, String? date, String? barImage)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? productKey, String? key, String? killHouseName, String? killHouseMobile, String? province, String? city, int? weightOfCarcasses, int? numberOfCarcasses, String? date, String? barImage, String? distributionType)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _CreateStewardFreeBar() when $default != null:
|
||||
return $default(_that.productKey,_that.key,_that.killHouseName,_that.killHouseMobile,_that.province,_that.city,_that.weightOfCarcasses,_that.numberOfCarcasses,_that.date,_that.barImage);case _:
|
||||
return $default(_that.productKey,_that.key,_that.killHouseName,_that.killHouseMobile,_that.province,_that.city,_that.weightOfCarcasses,_that.numberOfCarcasses,_that.date,_that.barImage,_that.distributionType);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
@@ -183,10 +184,10 @@ return $default(_that.productKey,_that.key,_that.killHouseName,_that.killHouseMo
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? productKey, String? key, String? killHouseName, String? killHouseMobile, String? province, String? city, int? weightOfCarcasses, int? numberOfCarcasses, String? date, String? barImage) $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? productKey, String? key, String? killHouseName, String? killHouseMobile, String? province, String? city, int? weightOfCarcasses, int? numberOfCarcasses, String? date, String? barImage, String? distributionType) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _CreateStewardFreeBar():
|
||||
return $default(_that.productKey,_that.key,_that.killHouseName,_that.killHouseMobile,_that.province,_that.city,_that.weightOfCarcasses,_that.numberOfCarcasses,_that.date,_that.barImage);case _:
|
||||
return $default(_that.productKey,_that.key,_that.killHouseName,_that.killHouseMobile,_that.province,_that.city,_that.weightOfCarcasses,_that.numberOfCarcasses,_that.date,_that.barImage,_that.distributionType);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
@@ -203,10 +204,10 @@ return $default(_that.productKey,_that.key,_that.killHouseName,_that.killHouseMo
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? productKey, String? key, String? killHouseName, String? killHouseMobile, String? province, String? city, int? weightOfCarcasses, int? numberOfCarcasses, String? date, String? barImage)? $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? productKey, String? key, String? killHouseName, String? killHouseMobile, String? province, String? city, int? weightOfCarcasses, int? numberOfCarcasses, String? date, String? barImage, String? distributionType)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _CreateStewardFreeBar() when $default != null:
|
||||
return $default(_that.productKey,_that.key,_that.killHouseName,_that.killHouseMobile,_that.province,_that.city,_that.weightOfCarcasses,_that.numberOfCarcasses,_that.date,_that.barImage);case _:
|
||||
return $default(_that.productKey,_that.key,_that.killHouseName,_that.killHouseMobile,_that.province,_that.city,_that.weightOfCarcasses,_that.numberOfCarcasses,_that.date,_that.barImage,_that.distributionType);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
@@ -218,7 +219,7 @@ return $default(_that.productKey,_that.key,_that.killHouseName,_that.killHouseMo
|
||||
@JsonSerializable()
|
||||
|
||||
class _CreateStewardFreeBar implements CreateStewardFreeBar {
|
||||
const _CreateStewardFreeBar({this.productKey, this.key, this.killHouseName, this.killHouseMobile, this.province, this.city, this.weightOfCarcasses, this.numberOfCarcasses, this.date, this.barImage});
|
||||
const _CreateStewardFreeBar({this.productKey, this.key, this.killHouseName, this.killHouseMobile, this.province, this.city, this.weightOfCarcasses, this.numberOfCarcasses, this.date, this.barImage, this.distributionType});
|
||||
factory _CreateStewardFreeBar.fromJson(Map<String, dynamic> json) => _$CreateStewardFreeBarFromJson(json);
|
||||
|
||||
@override final String? productKey;
|
||||
@@ -231,6 +232,7 @@ class _CreateStewardFreeBar implements CreateStewardFreeBar {
|
||||
@override final int? numberOfCarcasses;
|
||||
@override final String? date;
|
||||
@override final String? barImage;
|
||||
@override final String? distributionType;
|
||||
|
||||
/// Create a copy of CreateStewardFreeBar
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -245,16 +247,16 @@ Map<String, dynamic> toJson() {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _CreateStewardFreeBar&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.key, key) || other.key == key)&&(identical(other.killHouseName, killHouseName) || other.killHouseName == killHouseName)&&(identical(other.killHouseMobile, killHouseMobile) || other.killHouseMobile == killHouseMobile)&&(identical(other.province, province) || other.province == province)&&(identical(other.city, city) || other.city == city)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.date, date) || other.date == date)&&(identical(other.barImage, barImage) || other.barImage == barImage));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _CreateStewardFreeBar&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.key, key) || other.key == key)&&(identical(other.killHouseName, killHouseName) || other.killHouseName == killHouseName)&&(identical(other.killHouseMobile, killHouseMobile) || other.killHouseMobile == killHouseMobile)&&(identical(other.province, province) || other.province == province)&&(identical(other.city, city) || other.city == city)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.date, date) || other.date == date)&&(identical(other.barImage, barImage) || other.barImage == barImage)&&(identical(other.distributionType, distributionType) || other.distributionType == distributionType));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,productKey,key,killHouseName,killHouseMobile,province,city,weightOfCarcasses,numberOfCarcasses,date,barImage);
|
||||
int get hashCode => Object.hash(runtimeType,productKey,key,killHouseName,killHouseMobile,province,city,weightOfCarcasses,numberOfCarcasses,date,barImage,distributionType);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'CreateStewardFreeBar(productKey: $productKey, key: $key, killHouseName: $killHouseName, killHouseMobile: $killHouseMobile, province: $province, city: $city, weightOfCarcasses: $weightOfCarcasses, numberOfCarcasses: $numberOfCarcasses, date: $date, barImage: $barImage)';
|
||||
return 'CreateStewardFreeBar(productKey: $productKey, key: $key, killHouseName: $killHouseName, killHouseMobile: $killHouseMobile, province: $province, city: $city, weightOfCarcasses: $weightOfCarcasses, numberOfCarcasses: $numberOfCarcasses, date: $date, barImage: $barImage, distributionType: $distributionType)';
|
||||
}
|
||||
|
||||
|
||||
@@ -265,7 +267,7 @@ abstract mixin class _$CreateStewardFreeBarCopyWith<$Res> implements $CreateStew
|
||||
factory _$CreateStewardFreeBarCopyWith(_CreateStewardFreeBar value, $Res Function(_CreateStewardFreeBar) _then) = __$CreateStewardFreeBarCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String? productKey, String? key, String? killHouseName, String? killHouseMobile, String? province, String? city, int? weightOfCarcasses, int? numberOfCarcasses, String? date, String? barImage
|
||||
String? productKey, String? key, String? killHouseName, String? killHouseMobile, String? province, String? city, int? weightOfCarcasses, int? numberOfCarcasses, String? date, String? barImage, String? distributionType
|
||||
});
|
||||
|
||||
|
||||
@@ -282,7 +284,7 @@ class __$CreateStewardFreeBarCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of CreateStewardFreeBar
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? productKey = freezed,Object? key = freezed,Object? killHouseName = freezed,Object? killHouseMobile = freezed,Object? province = freezed,Object? city = freezed,Object? weightOfCarcasses = freezed,Object? numberOfCarcasses = freezed,Object? date = freezed,Object? barImage = freezed,}) {
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? productKey = freezed,Object? key = freezed,Object? killHouseName = freezed,Object? killHouseMobile = freezed,Object? province = freezed,Object? city = freezed,Object? weightOfCarcasses = freezed,Object? numberOfCarcasses = freezed,Object? date = freezed,Object? barImage = freezed,Object? distributionType = freezed,}) {
|
||||
return _then(_CreateStewardFreeBar(
|
||||
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
|
||||
@@ -294,6 +296,7 @@ as String?,weightOfCarcasses: freezed == weightOfCarcasses ? _self.weightOfCarca
|
||||
as int?,numberOfCarcasses: freezed == numberOfCarcasses ? _self.numberOfCarcasses : numberOfCarcasses // ignore: cast_nullable_to_non_nullable
|
||||
as int?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
||||
as String?,barImage: freezed == barImage ? _self.barImage : barImage // ignore: cast_nullable_to_non_nullable
|
||||
as String?,distributionType: freezed == distributionType ? _self.distributionType : distributionType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ _CreateStewardFreeBar _$CreateStewardFreeBarFromJson(
|
||||
numberOfCarcasses: (json['number_of_carcasses'] as num?)?.toInt(),
|
||||
date: json['date'] as String?,
|
||||
barImage: json['bar_image'] as String?,
|
||||
distributionType: json['distribution_type'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$CreateStewardFreeBarToJson(
|
||||
@@ -34,4 +35,5 @@ Map<String, dynamic> _$CreateStewardFreeBarToJson(
|
||||
'number_of_carcasses': instance.numberOfCarcasses,
|
||||
'date': instance.date,
|
||||
'bar_image': instance.barImage,
|
||||
'distribution_type': instance.distributionType,
|
||||
};
|
||||
|
||||
@@ -22,6 +22,7 @@ abstract class StewardFreeSaleBarRequest with _$StewardFreeSaleBarRequest {
|
||||
String? quota,
|
||||
String? saleType,
|
||||
String? productionDate,
|
||||
String? distributionType,
|
||||
}) = _StewardFreeSaleBarRequest;
|
||||
|
||||
factory StewardFreeSaleBarRequest.fromJson(Map<String, dynamic> json) =>
|
||||
|
||||
@@ -15,7 +15,7 @@ T _$identity<T>(T value) => value;
|
||||
/// @nodoc
|
||||
mixin _$StewardFreeSaleBarRequest {
|
||||
|
||||
String? get buyerKey; String? get buyerMobile; String? get buyerName; String? get city; String? get key; int? get numberOfCarcasses; int? get weightOfCarcasses; String? get date; String? get clearanceCode; String? get productKey; String? get role; String? get registerCode; String? get province; String? get quota; String? get saleType; String? get productionDate;
|
||||
String? get buyerKey; String? get buyerMobile; String? get buyerName; String? get city; String? get key; int? get numberOfCarcasses; int? get weightOfCarcasses; String? get date; String? get clearanceCode; String? get productKey; String? get role; String? get registerCode; String? get province; String? get quota; String? get saleType; String? get productionDate; String? get distributionType;
|
||||
/// Create a copy of StewardFreeSaleBarRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -28,16 +28,16 @@ $StewardFreeSaleBarRequestCopyWith<StewardFreeSaleBarRequest> get copyWith => _$
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is StewardFreeSaleBarRequest&&(identical(other.buyerKey, buyerKey) || other.buyerKey == buyerKey)&&(identical(other.buyerMobile, buyerMobile) || other.buyerMobile == buyerMobile)&&(identical(other.buyerName, buyerName) || other.buyerName == buyerName)&&(identical(other.city, city) || other.city == city)&&(identical(other.key, key) || other.key == key)&&(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.role, role) || other.role == role)&&(identical(other.registerCode, registerCode) || other.registerCode == registerCode)&&(identical(other.province, province) || other.province == province)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.saleType, saleType) || other.saleType == saleType)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is StewardFreeSaleBarRequest&&(identical(other.buyerKey, buyerKey) || other.buyerKey == buyerKey)&&(identical(other.buyerMobile, buyerMobile) || other.buyerMobile == buyerMobile)&&(identical(other.buyerName, buyerName) || other.buyerName == buyerName)&&(identical(other.city, city) || other.city == city)&&(identical(other.key, key) || other.key == key)&&(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.role, role) || other.role == role)&&(identical(other.registerCode, registerCode) || other.registerCode == registerCode)&&(identical(other.province, province) || other.province == province)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.saleType, saleType) || other.saleType == saleType)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate)&&(identical(other.distributionType, distributionType) || other.distributionType == distributionType));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,buyerKey,buyerMobile,buyerName,city,key,numberOfCarcasses,weightOfCarcasses,date,clearanceCode,productKey,role,registerCode,province,quota,saleType,productionDate);
|
||||
int get hashCode => Object.hash(runtimeType,buyerKey,buyerMobile,buyerName,city,key,numberOfCarcasses,weightOfCarcasses,date,clearanceCode,productKey,role,registerCode,province,quota,saleType,productionDate,distributionType);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'StewardFreeSaleBarRequest(buyerKey: $buyerKey, buyerMobile: $buyerMobile, buyerName: $buyerName, city: $city, key: $key, numberOfCarcasses: $numberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, date: $date, clearanceCode: $clearanceCode, productKey: $productKey, role: $role, registerCode: $registerCode, province: $province, quota: $quota, saleType: $saleType, productionDate: $productionDate)';
|
||||
return 'StewardFreeSaleBarRequest(buyerKey: $buyerKey, buyerMobile: $buyerMobile, buyerName: $buyerName, city: $city, key: $key, numberOfCarcasses: $numberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, date: $date, clearanceCode: $clearanceCode, productKey: $productKey, role: $role, registerCode: $registerCode, province: $province, quota: $quota, saleType: $saleType, productionDate: $productionDate, distributionType: $distributionType)';
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ abstract mixin class $StewardFreeSaleBarRequestCopyWith<$Res> {
|
||||
factory $StewardFreeSaleBarRequestCopyWith(StewardFreeSaleBarRequest value, $Res Function(StewardFreeSaleBarRequest) _then) = _$StewardFreeSaleBarRequestCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String? buyerKey, String? buyerMobile, String? buyerName, String? city, String? key, int? numberOfCarcasses, int? weightOfCarcasses, String? date, String? clearanceCode, String? productKey, String? role, String? registerCode, String? province, String? quota, String? saleType, String? productionDate
|
||||
String? buyerKey, String? buyerMobile, String? buyerName, String? city, String? key, int? numberOfCarcasses, int? weightOfCarcasses, String? date, String? clearanceCode, String? productKey, String? role, String? registerCode, String? province, String? quota, String? saleType, String? productionDate, String? distributionType
|
||||
});
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ class _$StewardFreeSaleBarRequestCopyWithImpl<$Res>
|
||||
|
||||
/// 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? buyerMobile = freezed,Object? buyerName = freezed,Object? city = freezed,Object? key = freezed,Object? numberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? date = freezed,Object? clearanceCode = freezed,Object? productKey = freezed,Object? role = freezed,Object? registerCode = freezed,Object? province = freezed,Object? quota = freezed,Object? saleType = freezed,Object? productionDate = freezed,}) {
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? buyerKey = freezed,Object? buyerMobile = freezed,Object? buyerName = freezed,Object? city = freezed,Object? key = freezed,Object? numberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? date = freezed,Object? clearanceCode = freezed,Object? productKey = freezed,Object? role = freezed,Object? registerCode = freezed,Object? province = freezed,Object? quota = freezed,Object? saleType = freezed,Object? productionDate = freezed,Object? distributionType = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
buyerKey: freezed == buyerKey ? _self.buyerKey : buyerKey // ignore: cast_nullable_to_non_nullable
|
||||
as String?,buyerMobile: freezed == buyerMobile ? _self.buyerMobile : buyerMobile // ignore: cast_nullable_to_non_nullable
|
||||
@@ -83,6 +83,7 @@ as String?,province: freezed == province ? _self.province : province // ignore:
|
||||
as String?,quota: freezed == quota ? _self.quota : quota // ignore: cast_nullable_to_non_nullable
|
||||
as String?,saleType: freezed == saleType ? _self.saleType : saleType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,productionDate: freezed == productionDate ? _self.productionDate : productionDate // ignore: cast_nullable_to_non_nullable
|
||||
as String?,distributionType: freezed == distributionType ? _self.distributionType : distributionType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
@@ -168,10 +169,10 @@ return $default(_that);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? buyerKey, String? buyerMobile, String? buyerName, String? city, String? key, int? numberOfCarcasses, int? weightOfCarcasses, String? date, String? clearanceCode, String? productKey, String? role, String? registerCode, String? province, String? quota, String? saleType, String? productionDate)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? buyerKey, String? buyerMobile, String? buyerName, String? city, String? key, int? numberOfCarcasses, int? weightOfCarcasses, String? date, String? clearanceCode, String? productKey, String? role, String? registerCode, String? province, String? quota, String? saleType, String? productionDate, String? distributionType)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _StewardFreeSaleBarRequest() when $default != null:
|
||||
return $default(_that.buyerKey,_that.buyerMobile,_that.buyerName,_that.city,_that.key,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.date,_that.clearanceCode,_that.productKey,_that.role,_that.registerCode,_that.province,_that.quota,_that.saleType,_that.productionDate);case _:
|
||||
return $default(_that.buyerKey,_that.buyerMobile,_that.buyerName,_that.city,_that.key,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.date,_that.clearanceCode,_that.productKey,_that.role,_that.registerCode,_that.province,_that.quota,_that.saleType,_that.productionDate,_that.distributionType);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
@@ -189,10 +190,10 @@ return $default(_that.buyerKey,_that.buyerMobile,_that.buyerName,_that.city,_tha
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? buyerKey, String? buyerMobile, String? buyerName, String? city, String? key, int? numberOfCarcasses, int? weightOfCarcasses, String? date, String? clearanceCode, String? productKey, String? role, String? registerCode, String? province, String? quota, String? saleType, String? productionDate) $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? buyerKey, String? buyerMobile, String? buyerName, String? city, String? key, int? numberOfCarcasses, int? weightOfCarcasses, String? date, String? clearanceCode, String? productKey, String? role, String? registerCode, String? province, String? quota, String? saleType, String? productionDate, String? distributionType) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _StewardFreeSaleBarRequest():
|
||||
return $default(_that.buyerKey,_that.buyerMobile,_that.buyerName,_that.city,_that.key,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.date,_that.clearanceCode,_that.productKey,_that.role,_that.registerCode,_that.province,_that.quota,_that.saleType,_that.productionDate);case _:
|
||||
return $default(_that.buyerKey,_that.buyerMobile,_that.buyerName,_that.city,_that.key,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.date,_that.clearanceCode,_that.productKey,_that.role,_that.registerCode,_that.province,_that.quota,_that.saleType,_that.productionDate,_that.distributionType);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
@@ -209,10 +210,10 @@ return $default(_that.buyerKey,_that.buyerMobile,_that.buyerName,_that.city,_tha
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? buyerKey, String? buyerMobile, String? buyerName, String? city, String? key, int? numberOfCarcasses, int? weightOfCarcasses, String? date, String? clearanceCode, String? productKey, String? role, String? registerCode, String? province, String? quota, String? saleType, String? productionDate)? $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? buyerKey, String? buyerMobile, String? buyerName, String? city, String? key, int? numberOfCarcasses, int? weightOfCarcasses, String? date, String? clearanceCode, String? productKey, String? role, String? registerCode, String? province, String? quota, String? saleType, String? productionDate, String? distributionType)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _StewardFreeSaleBarRequest() when $default != null:
|
||||
return $default(_that.buyerKey,_that.buyerMobile,_that.buyerName,_that.city,_that.key,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.date,_that.clearanceCode,_that.productKey,_that.role,_that.registerCode,_that.province,_that.quota,_that.saleType,_that.productionDate);case _:
|
||||
return $default(_that.buyerKey,_that.buyerMobile,_that.buyerName,_that.city,_that.key,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.date,_that.clearanceCode,_that.productKey,_that.role,_that.registerCode,_that.province,_that.quota,_that.saleType,_that.productionDate,_that.distributionType);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
@@ -224,7 +225,7 @@ return $default(_that.buyerKey,_that.buyerMobile,_that.buyerName,_that.city,_tha
|
||||
@JsonSerializable()
|
||||
|
||||
class _StewardFreeSaleBarRequest implements StewardFreeSaleBarRequest {
|
||||
const _StewardFreeSaleBarRequest({this.buyerKey, this.buyerMobile, this.buyerName, this.city, this.key, this.numberOfCarcasses, this.weightOfCarcasses, this.date, this.clearanceCode, this.productKey, this.role, this.registerCode, this.province, this.quota, this.saleType, this.productionDate});
|
||||
const _StewardFreeSaleBarRequest({this.buyerKey, this.buyerMobile, this.buyerName, this.city, this.key, this.numberOfCarcasses, this.weightOfCarcasses, this.date, this.clearanceCode, this.productKey, this.role, this.registerCode, this.province, this.quota, this.saleType, this.productionDate, this.distributionType});
|
||||
factory _StewardFreeSaleBarRequest.fromJson(Map<String, dynamic> json) => _$StewardFreeSaleBarRequestFromJson(json);
|
||||
|
||||
@override final String? buyerKey;
|
||||
@@ -243,6 +244,7 @@ class _StewardFreeSaleBarRequest implements StewardFreeSaleBarRequest {
|
||||
@override final String? quota;
|
||||
@override final String? saleType;
|
||||
@override final String? productionDate;
|
||||
@override final String? distributionType;
|
||||
|
||||
/// Create a copy of StewardFreeSaleBarRequest
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -257,16 +259,16 @@ 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.buyerMobile, buyerMobile) || other.buyerMobile == buyerMobile)&&(identical(other.buyerName, buyerName) || other.buyerName == buyerName)&&(identical(other.city, city) || other.city == city)&&(identical(other.key, key) || other.key == key)&&(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.role, role) || other.role == role)&&(identical(other.registerCode, registerCode) || other.registerCode == registerCode)&&(identical(other.province, province) || other.province == province)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.saleType, saleType) || other.saleType == saleType)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _StewardFreeSaleBarRequest&&(identical(other.buyerKey, buyerKey) || other.buyerKey == buyerKey)&&(identical(other.buyerMobile, buyerMobile) || other.buyerMobile == buyerMobile)&&(identical(other.buyerName, buyerName) || other.buyerName == buyerName)&&(identical(other.city, city) || other.city == city)&&(identical(other.key, key) || other.key == key)&&(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.role, role) || other.role == role)&&(identical(other.registerCode, registerCode) || other.registerCode == registerCode)&&(identical(other.province, province) || other.province == province)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.saleType, saleType) || other.saleType == saleType)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate)&&(identical(other.distributionType, distributionType) || other.distributionType == distributionType));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,buyerKey,buyerMobile,buyerName,city,key,numberOfCarcasses,weightOfCarcasses,date,clearanceCode,productKey,role,registerCode,province,quota,saleType,productionDate);
|
||||
int get hashCode => Object.hash(runtimeType,buyerKey,buyerMobile,buyerName,city,key,numberOfCarcasses,weightOfCarcasses,date,clearanceCode,productKey,role,registerCode,province,quota,saleType,productionDate,distributionType);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'StewardFreeSaleBarRequest(buyerKey: $buyerKey, buyerMobile: $buyerMobile, buyerName: $buyerName, city: $city, key: $key, numberOfCarcasses: $numberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, date: $date, clearanceCode: $clearanceCode, productKey: $productKey, role: $role, registerCode: $registerCode, province: $province, quota: $quota, saleType: $saleType, productionDate: $productionDate)';
|
||||
return 'StewardFreeSaleBarRequest(buyerKey: $buyerKey, buyerMobile: $buyerMobile, buyerName: $buyerName, city: $city, key: $key, numberOfCarcasses: $numberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, date: $date, clearanceCode: $clearanceCode, productKey: $productKey, role: $role, registerCode: $registerCode, province: $province, quota: $quota, saleType: $saleType, productionDate: $productionDate, distributionType: $distributionType)';
|
||||
}
|
||||
|
||||
|
||||
@@ -277,7 +279,7 @@ abstract mixin class _$StewardFreeSaleBarRequestCopyWith<$Res> implements $Stewa
|
||||
factory _$StewardFreeSaleBarRequestCopyWith(_StewardFreeSaleBarRequest value, $Res Function(_StewardFreeSaleBarRequest) _then) = __$StewardFreeSaleBarRequestCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String? buyerKey, String? buyerMobile, String? buyerName, String? city, String? key, int? numberOfCarcasses, int? weightOfCarcasses, String? date, String? clearanceCode, String? productKey, String? role, String? registerCode, String? province, String? quota, String? saleType, String? productionDate
|
||||
String? buyerKey, String? buyerMobile, String? buyerName, String? city, String? key, int? numberOfCarcasses, int? weightOfCarcasses, String? date, String? clearanceCode, String? productKey, String? role, String? registerCode, String? province, String? quota, String? saleType, String? productionDate, String? distributionType
|
||||
});
|
||||
|
||||
|
||||
@@ -294,7 +296,7 @@ class __$StewardFreeSaleBarRequestCopyWithImpl<$Res>
|
||||
|
||||
/// 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? buyerMobile = freezed,Object? buyerName = freezed,Object? city = freezed,Object? key = freezed,Object? numberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? date = freezed,Object? clearanceCode = freezed,Object? productKey = freezed,Object? role = freezed,Object? registerCode = freezed,Object? province = freezed,Object? quota = freezed,Object? saleType = freezed,Object? productionDate = freezed,}) {
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? buyerKey = freezed,Object? buyerMobile = freezed,Object? buyerName = freezed,Object? city = freezed,Object? key = freezed,Object? numberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? date = freezed,Object? clearanceCode = freezed,Object? productKey = freezed,Object? role = freezed,Object? registerCode = freezed,Object? province = freezed,Object? quota = freezed,Object? saleType = freezed,Object? productionDate = freezed,Object? distributionType = freezed,}) {
|
||||
return _then(_StewardFreeSaleBarRequest(
|
||||
buyerKey: freezed == buyerKey ? _self.buyerKey : buyerKey // ignore: cast_nullable_to_non_nullable
|
||||
as String?,buyerMobile: freezed == buyerMobile ? _self.buyerMobile : buyerMobile // ignore: cast_nullable_to_non_nullable
|
||||
@@ -312,6 +314,7 @@ as String?,province: freezed == province ? _self.province : province // ignore:
|
||||
as String?,quota: freezed == quota ? _self.quota : quota // ignore: cast_nullable_to_non_nullable
|
||||
as String?,saleType: freezed == saleType ? _self.saleType : saleType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,productionDate: freezed == productionDate ? _self.productionDate : productionDate // ignore: cast_nullable_to_non_nullable
|
||||
as String?,distributionType: freezed == distributionType ? _self.distributionType : distributionType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ _StewardFreeSaleBarRequest _$StewardFreeSaleBarRequestFromJson(
|
||||
quota: json['quota'] as String?,
|
||||
saleType: json['sale_type'] as String?,
|
||||
productionDate: json['production_date'] as String?,
|
||||
distributionType: json['distribution_type'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$StewardFreeSaleBarRequestToJson(
|
||||
@@ -46,4 +47,5 @@ Map<String, dynamic> _$StewardFreeSaleBarRequestToJson(
|
||||
'quota': instance.quota,
|
||||
'sale_type': instance.saleType,
|
||||
'production_date': instance.productionDate,
|
||||
'distribution_type': instance.distributionType,
|
||||
};
|
||||
|
||||
@@ -21,6 +21,7 @@ abstract class SubmitStewardAllocation with _$SubmitStewardAllocation {
|
||||
bool? approvedPriceStatus,
|
||||
String? productionDate,
|
||||
String? date,
|
||||
String? distributionType,
|
||||
}) = _SubmitStewardAllocation;
|
||||
|
||||
factory SubmitStewardAllocation.fromJson(Map<String, dynamic> json) =>
|
||||
|
||||
@@ -15,7 +15,7 @@ T _$identity<T>(T value) => value;
|
||||
/// @nodoc
|
||||
mixin _$SubmitStewardAllocation {
|
||||
|
||||
String? get sellerType; String? get buyerType; String? get guildKey; String? get productKey; String? get type; String? get allocationType; int? get numberOfCarcasses; int? get weightOfCarcasses; String? get sellType; int? get amount; String? get quota; int? get totalAmount; bool? get approvedPriceStatus; String? get productionDate; String? get date;
|
||||
String? get sellerType; String? get buyerType; String? get guildKey; String? get productKey; String? get type; String? get allocationType; int? get numberOfCarcasses; int? get weightOfCarcasses; String? get sellType; int? get amount; String? get quota; int? get totalAmount; bool? get approvedPriceStatus; String? get productionDate; String? get date; String? get distributionType;
|
||||
/// Create a copy of SubmitStewardAllocation
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -28,16 +28,16 @@ $SubmitStewardAllocationCopyWith<SubmitStewardAllocation> get copyWith => _$Subm
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SubmitStewardAllocation&&(identical(other.sellerType, sellerType) || other.sellerType == sellerType)&&(identical(other.buyerType, buyerType) || other.buyerType == buyerType)&&(identical(other.guildKey, guildKey) || other.guildKey == guildKey)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.type, type) || other.type == type)&&(identical(other.allocationType, allocationType) || other.allocationType == allocationType)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.sellType, sellType) || other.sellType == sellType)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.totalAmount, totalAmount) || other.totalAmount == totalAmount)&&(identical(other.approvedPriceStatus, approvedPriceStatus) || other.approvedPriceStatus == approvedPriceStatus)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate)&&(identical(other.date, date) || other.date == date));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SubmitStewardAllocation&&(identical(other.sellerType, sellerType) || other.sellerType == sellerType)&&(identical(other.buyerType, buyerType) || other.buyerType == buyerType)&&(identical(other.guildKey, guildKey) || other.guildKey == guildKey)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.type, type) || other.type == type)&&(identical(other.allocationType, allocationType) || other.allocationType == allocationType)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.sellType, sellType) || other.sellType == sellType)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.totalAmount, totalAmount) || other.totalAmount == totalAmount)&&(identical(other.approvedPriceStatus, approvedPriceStatus) || other.approvedPriceStatus == approvedPriceStatus)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate)&&(identical(other.date, date) || other.date == date)&&(identical(other.distributionType, distributionType) || other.distributionType == distributionType));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,sellerType,buyerType,guildKey,productKey,type,allocationType,numberOfCarcasses,weightOfCarcasses,sellType,amount,quota,totalAmount,approvedPriceStatus,productionDate,date);
|
||||
int get hashCode => Object.hash(runtimeType,sellerType,buyerType,guildKey,productKey,type,allocationType,numberOfCarcasses,weightOfCarcasses,sellType,amount,quota,totalAmount,approvedPriceStatus,productionDate,date,distributionType);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SubmitStewardAllocation(sellerType: $sellerType, buyerType: $buyerType, guildKey: $guildKey, productKey: $productKey, type: $type, allocationType: $allocationType, numberOfCarcasses: $numberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, sellType: $sellType, amount: $amount, quota: $quota, totalAmount: $totalAmount, approvedPriceStatus: $approvedPriceStatus, productionDate: $productionDate, date: $date)';
|
||||
return 'SubmitStewardAllocation(sellerType: $sellerType, buyerType: $buyerType, guildKey: $guildKey, productKey: $productKey, type: $type, allocationType: $allocationType, numberOfCarcasses: $numberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, sellType: $sellType, amount: $amount, quota: $quota, totalAmount: $totalAmount, approvedPriceStatus: $approvedPriceStatus, productionDate: $productionDate, date: $date, distributionType: $distributionType)';
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ abstract mixin class $SubmitStewardAllocationCopyWith<$Res> {
|
||||
factory $SubmitStewardAllocationCopyWith(SubmitStewardAllocation value, $Res Function(SubmitStewardAllocation) _then) = _$SubmitStewardAllocationCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String? sellerType, String? buyerType, String? guildKey, String? productKey, String? type, String? allocationType, int? numberOfCarcasses, int? weightOfCarcasses, String? sellType, int? amount, String? quota, int? totalAmount, bool? approvedPriceStatus, String? productionDate, String? date
|
||||
String? sellerType, String? buyerType, String? guildKey, String? productKey, String? type, String? allocationType, int? numberOfCarcasses, int? weightOfCarcasses, String? sellType, int? amount, String? quota, int? totalAmount, bool? approvedPriceStatus, String? productionDate, String? date, String? distributionType
|
||||
});
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ class _$SubmitStewardAllocationCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of SubmitStewardAllocation
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? sellerType = freezed,Object? buyerType = freezed,Object? guildKey = freezed,Object? productKey = freezed,Object? type = freezed,Object? allocationType = freezed,Object? numberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? sellType = freezed,Object? amount = freezed,Object? quota = freezed,Object? totalAmount = freezed,Object? approvedPriceStatus = freezed,Object? productionDate = freezed,Object? date = freezed,}) {
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? sellerType = freezed,Object? buyerType = freezed,Object? guildKey = freezed,Object? productKey = freezed,Object? type = freezed,Object? allocationType = freezed,Object? numberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? sellType = freezed,Object? amount = freezed,Object? quota = freezed,Object? totalAmount = freezed,Object? approvedPriceStatus = freezed,Object? productionDate = freezed,Object? date = freezed,Object? distributionType = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
sellerType: freezed == sellerType ? _self.sellerType : sellerType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,buyerType: freezed == buyerType ? _self.buyerType : buyerType // ignore: cast_nullable_to_non_nullable
|
||||
@@ -82,6 +82,7 @@ as String?,totalAmount: freezed == totalAmount ? _self.totalAmount : totalAmount
|
||||
as int?,approvedPriceStatus: freezed == approvedPriceStatus ? _self.approvedPriceStatus : approvedPriceStatus // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,productionDate: freezed == productionDate ? _self.productionDate : productionDate // ignore: cast_nullable_to_non_nullable
|
||||
as String?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
||||
as String?,distributionType: freezed == distributionType ? _self.distributionType : distributionType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
@@ -167,10 +168,10 @@ return $default(_that);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? sellerType, String? buyerType, String? guildKey, String? productKey, String? type, String? allocationType, int? numberOfCarcasses, int? weightOfCarcasses, String? sellType, int? amount, String? quota, int? totalAmount, bool? approvedPriceStatus, String? productionDate, String? date)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? sellerType, String? buyerType, String? guildKey, String? productKey, String? type, String? allocationType, int? numberOfCarcasses, int? weightOfCarcasses, String? sellType, int? amount, String? quota, int? totalAmount, bool? approvedPriceStatus, String? productionDate, String? date, String? distributionType)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SubmitStewardAllocation() when $default != null:
|
||||
return $default(_that.sellerType,_that.buyerType,_that.guildKey,_that.productKey,_that.type,_that.allocationType,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.sellType,_that.amount,_that.quota,_that.totalAmount,_that.approvedPriceStatus,_that.productionDate,_that.date);case _:
|
||||
return $default(_that.sellerType,_that.buyerType,_that.guildKey,_that.productKey,_that.type,_that.allocationType,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.sellType,_that.amount,_that.quota,_that.totalAmount,_that.approvedPriceStatus,_that.productionDate,_that.date,_that.distributionType);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
@@ -188,10 +189,10 @@ return $default(_that.sellerType,_that.buyerType,_that.guildKey,_that.productKey
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? sellerType, String? buyerType, String? guildKey, String? productKey, String? type, String? allocationType, int? numberOfCarcasses, int? weightOfCarcasses, String? sellType, int? amount, String? quota, int? totalAmount, bool? approvedPriceStatus, String? productionDate, String? date) $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? sellerType, String? buyerType, String? guildKey, String? productKey, String? type, String? allocationType, int? numberOfCarcasses, int? weightOfCarcasses, String? sellType, int? amount, String? quota, int? totalAmount, bool? approvedPriceStatus, String? productionDate, String? date, String? distributionType) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SubmitStewardAllocation():
|
||||
return $default(_that.sellerType,_that.buyerType,_that.guildKey,_that.productKey,_that.type,_that.allocationType,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.sellType,_that.amount,_that.quota,_that.totalAmount,_that.approvedPriceStatus,_that.productionDate,_that.date);case _:
|
||||
return $default(_that.sellerType,_that.buyerType,_that.guildKey,_that.productKey,_that.type,_that.allocationType,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.sellType,_that.amount,_that.quota,_that.totalAmount,_that.approvedPriceStatus,_that.productionDate,_that.date,_that.distributionType);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
@@ -208,10 +209,10 @@ return $default(_that.sellerType,_that.buyerType,_that.guildKey,_that.productKey
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? sellerType, String? buyerType, String? guildKey, String? productKey, String? type, String? allocationType, int? numberOfCarcasses, int? weightOfCarcasses, String? sellType, int? amount, String? quota, int? totalAmount, bool? approvedPriceStatus, String? productionDate, String? date)? $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? sellerType, String? buyerType, String? guildKey, String? productKey, String? type, String? allocationType, int? numberOfCarcasses, int? weightOfCarcasses, String? sellType, int? amount, String? quota, int? totalAmount, bool? approvedPriceStatus, String? productionDate, String? date, String? distributionType)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SubmitStewardAllocation() when $default != null:
|
||||
return $default(_that.sellerType,_that.buyerType,_that.guildKey,_that.productKey,_that.type,_that.allocationType,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.sellType,_that.amount,_that.quota,_that.totalAmount,_that.approvedPriceStatus,_that.productionDate,_that.date);case _:
|
||||
return $default(_that.sellerType,_that.buyerType,_that.guildKey,_that.productKey,_that.type,_that.allocationType,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.sellType,_that.amount,_that.quota,_that.totalAmount,_that.approvedPriceStatus,_that.productionDate,_that.date,_that.distributionType);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
@@ -223,7 +224,7 @@ return $default(_that.sellerType,_that.buyerType,_that.guildKey,_that.productKey
|
||||
@JsonSerializable()
|
||||
|
||||
class _SubmitStewardAllocation implements SubmitStewardAllocation {
|
||||
const _SubmitStewardAllocation({this.sellerType, this.buyerType, this.guildKey, this.productKey, this.type, this.allocationType, this.numberOfCarcasses, this.weightOfCarcasses, this.sellType, this.amount, this.quota, this.totalAmount, this.approvedPriceStatus, this.productionDate, this.date});
|
||||
const _SubmitStewardAllocation({this.sellerType, this.buyerType, this.guildKey, this.productKey, this.type, this.allocationType, this.numberOfCarcasses, this.weightOfCarcasses, this.sellType, this.amount, this.quota, this.totalAmount, this.approvedPriceStatus, this.productionDate, this.date, this.distributionType});
|
||||
factory _SubmitStewardAllocation.fromJson(Map<String, dynamic> json) => _$SubmitStewardAllocationFromJson(json);
|
||||
|
||||
@override final String? sellerType;
|
||||
@@ -241,6 +242,7 @@ class _SubmitStewardAllocation implements SubmitStewardAllocation {
|
||||
@override final bool? approvedPriceStatus;
|
||||
@override final String? productionDate;
|
||||
@override final String? date;
|
||||
@override final String? distributionType;
|
||||
|
||||
/// Create a copy of SubmitStewardAllocation
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -255,16 +257,16 @@ Map<String, dynamic> toJson() {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SubmitStewardAllocation&&(identical(other.sellerType, sellerType) || other.sellerType == sellerType)&&(identical(other.buyerType, buyerType) || other.buyerType == buyerType)&&(identical(other.guildKey, guildKey) || other.guildKey == guildKey)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.type, type) || other.type == type)&&(identical(other.allocationType, allocationType) || other.allocationType == allocationType)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.sellType, sellType) || other.sellType == sellType)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.totalAmount, totalAmount) || other.totalAmount == totalAmount)&&(identical(other.approvedPriceStatus, approvedPriceStatus) || other.approvedPriceStatus == approvedPriceStatus)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate)&&(identical(other.date, date) || other.date == date));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SubmitStewardAllocation&&(identical(other.sellerType, sellerType) || other.sellerType == sellerType)&&(identical(other.buyerType, buyerType) || other.buyerType == buyerType)&&(identical(other.guildKey, guildKey) || other.guildKey == guildKey)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.type, type) || other.type == type)&&(identical(other.allocationType, allocationType) || other.allocationType == allocationType)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.sellType, sellType) || other.sellType == sellType)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.totalAmount, totalAmount) || other.totalAmount == totalAmount)&&(identical(other.approvedPriceStatus, approvedPriceStatus) || other.approvedPriceStatus == approvedPriceStatus)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate)&&(identical(other.date, date) || other.date == date)&&(identical(other.distributionType, distributionType) || other.distributionType == distributionType));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,sellerType,buyerType,guildKey,productKey,type,allocationType,numberOfCarcasses,weightOfCarcasses,sellType,amount,quota,totalAmount,approvedPriceStatus,productionDate,date);
|
||||
int get hashCode => Object.hash(runtimeType,sellerType,buyerType,guildKey,productKey,type,allocationType,numberOfCarcasses,weightOfCarcasses,sellType,amount,quota,totalAmount,approvedPriceStatus,productionDate,date,distributionType);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SubmitStewardAllocation(sellerType: $sellerType, buyerType: $buyerType, guildKey: $guildKey, productKey: $productKey, type: $type, allocationType: $allocationType, numberOfCarcasses: $numberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, sellType: $sellType, amount: $amount, quota: $quota, totalAmount: $totalAmount, approvedPriceStatus: $approvedPriceStatus, productionDate: $productionDate, date: $date)';
|
||||
return 'SubmitStewardAllocation(sellerType: $sellerType, buyerType: $buyerType, guildKey: $guildKey, productKey: $productKey, type: $type, allocationType: $allocationType, numberOfCarcasses: $numberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, sellType: $sellType, amount: $amount, quota: $quota, totalAmount: $totalAmount, approvedPriceStatus: $approvedPriceStatus, productionDate: $productionDate, date: $date, distributionType: $distributionType)';
|
||||
}
|
||||
|
||||
|
||||
@@ -275,7 +277,7 @@ abstract mixin class _$SubmitStewardAllocationCopyWith<$Res> implements $SubmitS
|
||||
factory _$SubmitStewardAllocationCopyWith(_SubmitStewardAllocation value, $Res Function(_SubmitStewardAllocation) _then) = __$SubmitStewardAllocationCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String? sellerType, String? buyerType, String? guildKey, String? productKey, String? type, String? allocationType, int? numberOfCarcasses, int? weightOfCarcasses, String? sellType, int? amount, String? quota, int? totalAmount, bool? approvedPriceStatus, String? productionDate, String? date
|
||||
String? sellerType, String? buyerType, String? guildKey, String? productKey, String? type, String? allocationType, int? numberOfCarcasses, int? weightOfCarcasses, String? sellType, int? amount, String? quota, int? totalAmount, bool? approvedPriceStatus, String? productionDate, String? date, String? distributionType
|
||||
});
|
||||
|
||||
|
||||
@@ -292,7 +294,7 @@ class __$SubmitStewardAllocationCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of SubmitStewardAllocation
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? sellerType = freezed,Object? buyerType = freezed,Object? guildKey = freezed,Object? productKey = freezed,Object? type = freezed,Object? allocationType = freezed,Object? numberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? sellType = freezed,Object? amount = freezed,Object? quota = freezed,Object? totalAmount = freezed,Object? approvedPriceStatus = freezed,Object? productionDate = freezed,Object? date = freezed,}) {
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? sellerType = freezed,Object? buyerType = freezed,Object? guildKey = freezed,Object? productKey = freezed,Object? type = freezed,Object? allocationType = freezed,Object? numberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? sellType = freezed,Object? amount = freezed,Object? quota = freezed,Object? totalAmount = freezed,Object? approvedPriceStatus = freezed,Object? productionDate = freezed,Object? date = freezed,Object? distributionType = freezed,}) {
|
||||
return _then(_SubmitStewardAllocation(
|
||||
sellerType: freezed == sellerType ? _self.sellerType : sellerType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,buyerType: freezed == buyerType ? _self.buyerType : buyerType // ignore: cast_nullable_to_non_nullable
|
||||
@@ -309,6 +311,7 @@ as String?,totalAmount: freezed == totalAmount ? _self.totalAmount : totalAmount
|
||||
as int?,approvedPriceStatus: freezed == approvedPriceStatus ? _self.approvedPriceStatus : approvedPriceStatus // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,productionDate: freezed == productionDate ? _self.productionDate : productionDate // ignore: cast_nullable_to_non_nullable
|
||||
as String?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
||||
as String?,distributionType: freezed == distributionType ? _self.distributionType : distributionType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ _SubmitStewardAllocation _$SubmitStewardAllocationFromJson(
|
||||
approvedPriceStatus: json['approved_price_status'] as bool?,
|
||||
productionDate: json['production_date'] as String?,
|
||||
date: json['date'] as String?,
|
||||
distributionType: json['distribution_type'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SubmitStewardAllocationToJson(
|
||||
@@ -44,4 +45,5 @@ Map<String, dynamic> _$SubmitStewardAllocationToJson(
|
||||
'approved_price_status': instance.approvedPriceStatus,
|
||||
'production_date': instance.productionDate,
|
||||
'date': instance.date,
|
||||
'distribution_type': instance.distributionType,
|
||||
};
|
||||
|
||||
@@ -18,6 +18,7 @@ abstract class SegmentationModel with _$SegmentationModel {
|
||||
DateTime? date,
|
||||
ToGuild? toGuild,
|
||||
String? productionDate,
|
||||
String? distributionType,
|
||||
}) = _SegmentationModel;
|
||||
|
||||
factory SegmentationModel.fromJson(Map<String, dynamic> json) =>
|
||||
|
||||
@@ -15,7 +15,7 @@ T _$identity<T>(T value) => value;
|
||||
/// @nodoc
|
||||
mixin _$SegmentationModel {
|
||||
|
||||
String? get key; String? get productKey; String? get guildKey; String? get result; String? get quota; String? get saleType; int? get weight; Buyer? get buyer; DateTime? get date; ToGuild? get toGuild; String? get productionDate;
|
||||
String? get key; String? get productKey; String? get guildKey; String? get result; String? get quota; String? get saleType; int? get weight; Buyer? get buyer; DateTime? get date; ToGuild? get toGuild; String? get productionDate; String? get distributionType;
|
||||
/// Create a copy of SegmentationModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -28,16 +28,16 @@ $SegmentationModelCopyWith<SegmentationModel> get copyWith => _$SegmentationMode
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SegmentationModel&&(identical(other.key, key) || other.key == key)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.guildKey, guildKey) || other.guildKey == guildKey)&&(identical(other.result, result) || other.result == result)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.saleType, saleType) || other.saleType == saleType)&&(identical(other.weight, weight) || other.weight == weight)&&(identical(other.buyer, buyer) || other.buyer == buyer)&&(identical(other.date, date) || other.date == date)&&(identical(other.toGuild, toGuild) || other.toGuild == toGuild)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is SegmentationModel&&(identical(other.key, key) || other.key == key)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.guildKey, guildKey) || other.guildKey == guildKey)&&(identical(other.result, result) || other.result == result)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.saleType, saleType) || other.saleType == saleType)&&(identical(other.weight, weight) || other.weight == weight)&&(identical(other.buyer, buyer) || other.buyer == buyer)&&(identical(other.date, date) || other.date == date)&&(identical(other.toGuild, toGuild) || other.toGuild == toGuild)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate)&&(identical(other.distributionType, distributionType) || other.distributionType == distributionType));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,key,productKey,guildKey,result,quota,saleType,weight,buyer,date,toGuild,productionDate);
|
||||
int get hashCode => Object.hash(runtimeType,key,productKey,guildKey,result,quota,saleType,weight,buyer,date,toGuild,productionDate,distributionType);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SegmentationModel(key: $key, productKey: $productKey, guildKey: $guildKey, result: $result, quota: $quota, saleType: $saleType, weight: $weight, buyer: $buyer, date: $date, toGuild: $toGuild, productionDate: $productionDate)';
|
||||
return 'SegmentationModel(key: $key, productKey: $productKey, guildKey: $guildKey, result: $result, quota: $quota, saleType: $saleType, weight: $weight, buyer: $buyer, date: $date, toGuild: $toGuild, productionDate: $productionDate, distributionType: $distributionType)';
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ abstract mixin class $SegmentationModelCopyWith<$Res> {
|
||||
factory $SegmentationModelCopyWith(SegmentationModel value, $Res Function(SegmentationModel) _then) = _$SegmentationModelCopyWithImpl;
|
||||
@useResult
|
||||
$Res call({
|
||||
String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild, String? productionDate
|
||||
String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild, String? productionDate, String? distributionType
|
||||
});
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ class _$SegmentationModelCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of SegmentationModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? key = freezed,Object? productKey = freezed,Object? guildKey = freezed,Object? result = freezed,Object? quota = freezed,Object? saleType = freezed,Object? weight = freezed,Object? buyer = freezed,Object? date = freezed,Object? toGuild = freezed,Object? productionDate = freezed,}) {
|
||||
@pragma('vm:prefer-inline') @override $Res call({Object? key = freezed,Object? productKey = freezed,Object? guildKey = freezed,Object? result = freezed,Object? quota = freezed,Object? saleType = freezed,Object? weight = freezed,Object? buyer = freezed,Object? date = freezed,Object? toGuild = freezed,Object? productionDate = freezed,Object? distributionType = freezed,}) {
|
||||
return _then(_self.copyWith(
|
||||
key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
|
||||
as String?,productKey: freezed == productKey ? _self.productKey : productKey // ignore: cast_nullable_to_non_nullable
|
||||
@@ -78,6 +78,7 @@ as int?,buyer: freezed == buyer ? _self.buyer : buyer // ignore: cast_nullable_t
|
||||
as Buyer?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,toGuild: freezed == toGuild ? _self.toGuild : toGuild // ignore: cast_nullable_to_non_nullable
|
||||
as ToGuild?,productionDate: freezed == productionDate ? _self.productionDate : productionDate // ignore: cast_nullable_to_non_nullable
|
||||
as String?,distributionType: freezed == distributionType ? _self.distributionType : distributionType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
@@ -187,10 +188,10 @@ return $default(_that);case _:
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild, String? productionDate)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild, String? productionDate, String? distributionType)? $default,{required TResult orElse(),}) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SegmentationModel() when $default != null:
|
||||
return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.quota,_that.saleType,_that.weight,_that.buyer,_that.date,_that.toGuild,_that.productionDate);case _:
|
||||
return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.quota,_that.saleType,_that.weight,_that.buyer,_that.date,_that.toGuild,_that.productionDate,_that.distributionType);case _:
|
||||
return orElse();
|
||||
|
||||
}
|
||||
@@ -208,10 +209,10 @@ return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.quo
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild, String? productionDate) $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild, String? productionDate, String? distributionType) $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SegmentationModel():
|
||||
return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.quota,_that.saleType,_that.weight,_that.buyer,_that.date,_that.toGuild,_that.productionDate);case _:
|
||||
return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.quota,_that.saleType,_that.weight,_that.buyer,_that.date,_that.toGuild,_that.productionDate,_that.distributionType);case _:
|
||||
throw StateError('Unexpected subclass');
|
||||
|
||||
}
|
||||
@@ -228,10 +229,10 @@ return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.quo
|
||||
/// }
|
||||
/// ```
|
||||
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild, String? productionDate)? $default,) {final _that = this;
|
||||
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild, String? productionDate, String? distributionType)? $default,) {final _that = this;
|
||||
switch (_that) {
|
||||
case _SegmentationModel() when $default != null:
|
||||
return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.quota,_that.saleType,_that.weight,_that.buyer,_that.date,_that.toGuild,_that.productionDate);case _:
|
||||
return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.quota,_that.saleType,_that.weight,_that.buyer,_that.date,_that.toGuild,_that.productionDate,_that.distributionType);case _:
|
||||
return null;
|
||||
|
||||
}
|
||||
@@ -243,7 +244,7 @@ return $default(_that.key,_that.productKey,_that.guildKey,_that.result,_that.quo
|
||||
@JsonSerializable()
|
||||
|
||||
class _SegmentationModel implements SegmentationModel {
|
||||
const _SegmentationModel({this.key, this.productKey, this.guildKey, this.result, this.quota, this.saleType, this.weight, this.buyer, this.date, this.toGuild, this.productionDate});
|
||||
const _SegmentationModel({this.key, this.productKey, this.guildKey, this.result, this.quota, this.saleType, this.weight, this.buyer, this.date, this.toGuild, this.productionDate, this.distributionType});
|
||||
factory _SegmentationModel.fromJson(Map<String, dynamic> json) => _$SegmentationModelFromJson(json);
|
||||
|
||||
@override final String? key;
|
||||
@@ -257,6 +258,7 @@ class _SegmentationModel implements SegmentationModel {
|
||||
@override final DateTime? date;
|
||||
@override final ToGuild? toGuild;
|
||||
@override final String? productionDate;
|
||||
@override final String? distributionType;
|
||||
|
||||
/// Create a copy of SegmentationModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -271,16 +273,16 @@ Map<String, dynamic> toJson() {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SegmentationModel&&(identical(other.key, key) || other.key == key)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.guildKey, guildKey) || other.guildKey == guildKey)&&(identical(other.result, result) || other.result == result)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.saleType, saleType) || other.saleType == saleType)&&(identical(other.weight, weight) || other.weight == weight)&&(identical(other.buyer, buyer) || other.buyer == buyer)&&(identical(other.date, date) || other.date == date)&&(identical(other.toGuild, toGuild) || other.toGuild == toGuild)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate));
|
||||
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SegmentationModel&&(identical(other.key, key) || other.key == key)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.guildKey, guildKey) || other.guildKey == guildKey)&&(identical(other.result, result) || other.result == result)&&(identical(other.quota, quota) || other.quota == quota)&&(identical(other.saleType, saleType) || other.saleType == saleType)&&(identical(other.weight, weight) || other.weight == weight)&&(identical(other.buyer, buyer) || other.buyer == buyer)&&(identical(other.date, date) || other.date == date)&&(identical(other.toGuild, toGuild) || other.toGuild == toGuild)&&(identical(other.productionDate, productionDate) || other.productionDate == productionDate)&&(identical(other.distributionType, distributionType) || other.distributionType == distributionType));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,key,productKey,guildKey,result,quota,saleType,weight,buyer,date,toGuild,productionDate);
|
||||
int get hashCode => Object.hash(runtimeType,key,productKey,guildKey,result,quota,saleType,weight,buyer,date,toGuild,productionDate,distributionType);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SegmentationModel(key: $key, productKey: $productKey, guildKey: $guildKey, result: $result, quota: $quota, saleType: $saleType, weight: $weight, buyer: $buyer, date: $date, toGuild: $toGuild, productionDate: $productionDate)';
|
||||
return 'SegmentationModel(key: $key, productKey: $productKey, guildKey: $guildKey, result: $result, quota: $quota, saleType: $saleType, weight: $weight, buyer: $buyer, date: $date, toGuild: $toGuild, productionDate: $productionDate, distributionType: $distributionType)';
|
||||
}
|
||||
|
||||
|
||||
@@ -291,7 +293,7 @@ abstract mixin class _$SegmentationModelCopyWith<$Res> implements $SegmentationM
|
||||
factory _$SegmentationModelCopyWith(_SegmentationModel value, $Res Function(_SegmentationModel) _then) = __$SegmentationModelCopyWithImpl;
|
||||
@override @useResult
|
||||
$Res call({
|
||||
String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild, String? productionDate
|
||||
String? key, String? productKey, String? guildKey, String? result, String? quota, String? saleType, int? weight, Buyer? buyer, DateTime? date, ToGuild? toGuild, String? productionDate, String? distributionType
|
||||
});
|
||||
|
||||
|
||||
@@ -308,7 +310,7 @@ class __$SegmentationModelCopyWithImpl<$Res>
|
||||
|
||||
/// Create a copy of SegmentationModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? key = freezed,Object? productKey = freezed,Object? guildKey = freezed,Object? result = freezed,Object? quota = freezed,Object? saleType = freezed,Object? weight = freezed,Object? buyer = freezed,Object? date = freezed,Object? toGuild = freezed,Object? productionDate = freezed,}) {
|
||||
@override @pragma('vm:prefer-inline') $Res call({Object? key = freezed,Object? productKey = freezed,Object? guildKey = freezed,Object? result = freezed,Object? quota = freezed,Object? saleType = freezed,Object? weight = freezed,Object? buyer = freezed,Object? date = freezed,Object? toGuild = freezed,Object? productionDate = freezed,Object? distributionType = freezed,}) {
|
||||
return _then(_SegmentationModel(
|
||||
key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
|
||||
as String?,productKey: freezed == productKey ? _self.productKey : productKey // ignore: cast_nullable_to_non_nullable
|
||||
@@ -321,6 +323,7 @@ as int?,buyer: freezed == buyer ? _self.buyer : buyer // ignore: cast_nullable_t
|
||||
as Buyer?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime?,toGuild: freezed == toGuild ? _self.toGuild : toGuild // ignore: cast_nullable_to_non_nullable
|
||||
as ToGuild?,productionDate: freezed == productionDate ? _self.productionDate : productionDate // ignore: cast_nullable_to_non_nullable
|
||||
as String?,distributionType: freezed == distributionType ? _self.distributionType : distributionType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ _SegmentationModel _$SegmentationModelFromJson(Map<String, dynamic> json) =>
|
||||
? null
|
||||
: ToGuild.fromJson(json['to_guild'] as Map<String, dynamic>),
|
||||
productionDate: json['production_date'] as String?,
|
||||
distributionType: json['distribution_type'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$SegmentationModelToJson(_SegmentationModel instance) =>
|
||||
@@ -40,6 +41,7 @@ Map<String, dynamic> _$SegmentationModelToJson(_SegmentationModel instance) =>
|
||||
'date': instance.date?.toIso8601String(),
|
||||
'to_guild': instance.toGuild,
|
||||
'production_date': instance.productionDate,
|
||||
'distribution_type': instance.distributionType,
|
||||
};
|
||||
|
||||
_Buyer _$BuyerFromJson(Map<String, dynamic> json) => _Buyer(
|
||||
|
||||
@@ -29,13 +29,13 @@ import '../../models/request/create_steward_free_bar/create_steward_free_bar.dar
|
||||
|
||||
abstract class ChickenRepository {
|
||||
//region Remote
|
||||
Future<List<ProductModel>?> getRolesProducts({
|
||||
required String token,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
//region Steward
|
||||
Future<List<ProductModel>?> getRolesProduct({
|
||||
required String token,
|
||||
required String role,
|
||||
CancelToken? cancelToken,
|
||||
});
|
||||
|
||||
Future<KillHouseDistributionInfo?> getKillHouseDistributionInfo({
|
||||
required String token,
|
||||
@@ -81,11 +81,6 @@ abstract class ChickenRepository {
|
||||
required List<String> allocationTokens,
|
||||
});
|
||||
|
||||
Future<List<ProductModel>?> getRolesProducts({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<List<GuildModel>?> getGuilds({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
|
||||
@@ -37,19 +37,6 @@ class ChickenRepositoryImp implements ChickenRepository {
|
||||
ChickenRepositoryImp({required this.remote, required this.local});
|
||||
|
||||
//region Remote
|
||||
@override
|
||||
Future<List<ProductModel>?> getRolesProduct({
|
||||
required String token,
|
||||
required String role,
|
||||
CancelToken? cancelToken,
|
||||
}) async {
|
||||
var res = await remote.getRolesProduct(
|
||||
token: token,
|
||||
role: role,
|
||||
cancelToken: cancelToken,
|
||||
);
|
||||
return res;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<KillHouseDistributionInfo?> getKillHouseDistributionInfo({
|
||||
@@ -145,10 +132,12 @@ class ChickenRepositoryImp implements ChickenRepository {
|
||||
@override
|
||||
Future<List<ProductModel>?> getRolesProducts({
|
||||
required String token,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
var res = await remote.getRolesProducts(
|
||||
token: token,
|
||||
cancelToken: cancelToken,
|
||||
queryParameters: queryParameters,
|
||||
);
|
||||
return res;
|
||||
|
||||
@@ -4,11 +4,10 @@ import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/response/kill_request_list/kill_request_list.dart'
|
||||
as listModel
|
||||
show KillRequestList;
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/warehouse_and_distribution/response/kill_house_sales_info_dashboard.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/broadcast_price/broadcast_price.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/iran_province_city/iran_province_city_model.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/warehouse_and_distribution/response/kill_house_bars/kill_house_bars_response.dart';
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/warehouse_and_distribution/response/kill_house_sales_info_dashboard/kill_house_sales_info_dashboard.dart';
|
||||
import 'package:rasadyar_core/data/model/pagination_model/pagination_model.dart';
|
||||
|
||||
|
||||
abstract class KillHouseRepository {
|
||||
|
||||
@@ -48,12 +47,10 @@ abstract class KillHouseRepository {
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
Future<BroadcastPrice?> getBroadcastPrice({required String token});
|
||||
|
||||
Future<List<ProductModel>?> getRolesProducts({required String token});
|
||||
|
||||
|
||||
Future<List<IranProvinceCityModel>?> getProvince({CancelToken? cancelToken});
|
||||
Future<PaginationModel<KillHouseBarsResponse>?> getBarsForKillHouse({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
});
|
||||
|
||||
//endregion
|
||||
}
|
||||
|
||||
@@ -3,21 +3,16 @@ import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/response/chicken_commission_prices/chicken_commission_prices.dart';
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/response/kill_house/kill_house_response.dart';
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/register_request/response/kill_request_list/kill_request_list.dart'
|
||||
as listModel;
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/warehouse_and_distribution/response/kill_house_sales_info_dashboard.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/broadcast_price/broadcast_price.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/iran_province_city/iran_province_city_model.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
||||
as ListModel;
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/warehouse_and_distribution/response/kill_house_bars/kill_house_bars_response.dart';
|
||||
import 'package:rasadyar_chicken/data/models/kill_house_module/warehouse_and_distribution/response/kill_house_sales_info_dashboard/kill_house_sales_info_dashboard.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
import '../chicken/chicken_repository.dart';
|
||||
import 'kill_house_repository.dart';
|
||||
|
||||
class KillHouseRepositoryImpl extends KillHouseRepository {
|
||||
final KillHouseRemoteDataSource remoteDataSource;
|
||||
final ChickenRepository chickenRepository;
|
||||
|
||||
KillHouseRepositoryImpl(this.remoteDataSource, this.chickenRepository);
|
||||
KillHouseRepositoryImpl(this.remoteDataSource);
|
||||
|
||||
@override
|
||||
Future<List<KillHouseResponse>?> getKillHouseList({
|
||||
@@ -54,7 +49,7 @@ class KillHouseRepositoryImpl extends KillHouseRepository {
|
||||
}
|
||||
|
||||
@override
|
||||
Future<List<listModel.KillRequestList>?> getListKillRequest({
|
||||
Future<List<ListModel.KillRequestList>?> getListKillRequest({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
@@ -93,24 +88,14 @@ class KillHouseRepositoryImpl extends KillHouseRepository {
|
||||
}
|
||||
|
||||
@override
|
||||
Future<BroadcastPrice?> getBroadcastPrice({required String token}) async {
|
||||
return await chickenRepository.getBroadcastPrice(token: token);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<List<ProductModel>?> getRolesProducts({required String token}) async {
|
||||
var res = await chickenRepository.getRolesProducts(
|
||||
token: token,
|
||||
queryParameters: buildQueryParams(role: 'KillHouse'),
|
||||
);
|
||||
return res;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<List<IranProvinceCityModel>?> getProvince({
|
||||
CancelToken? cancelToken,
|
||||
Future<PaginationModel<KillHouseBarsResponse>?> getBarsForKillHouse({
|
||||
required String token,
|
||||
Map<String, dynamic>? queryParameters,
|
||||
}) async {
|
||||
return await chickenRepository.getProvince(cancelToken: cancelToken);
|
||||
return await remoteDataSource.getBarsForKillHouse(
|
||||
token: token,
|
||||
queryParameters: queryParameters,
|
||||
);
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
Reference in New Issue
Block a user