refactor: remove unused local and remote data sources, models, and tests for chicken and poultry features to streamline codebase

This commit is contained in:
2025-12-08 16:10:34 +03:30
parent 890be0ded6
commit 455a5a5571
230 changed files with 2812 additions and 3471 deletions

View File

@@ -0,0 +1,8 @@
import 'package:rasadyar_chicken/features/common/data/model/local/widely_used_local_model.dart';
abstract class ChickenLocalDataSource {
Future<void> openBox();
Future<void> initWidleyUsed();
WidelyUsedLocalModel? getAllWidely();
}

View File

@@ -0,0 +1,54 @@
import 'package:rasadyar_chicken/features/common/data/model/local/widely_used_local_model.dart';
import 'package:rasadyar_chicken/features/steward/presentation/routes/routes.dart';
import 'package:rasadyar_core/core.dart';
import 'chicken_local.dart';
class ChickenLocalDataSourceImp implements ChickenLocalDataSource {
HiveLocalStorage local = diCore.get<HiveLocalStorage>();
final String boxName = 'Chicken_Widley_Box';
@override
Future<void> openBox() async {
await local.openBox<WidelyUsedLocalModel>(boxName);
}
@override
Future<void> initWidleyUsed() async {
/* List<WidelyUsedLocalItem> tmpList = [
WidelyUsedLocalItem(
index: 0,
pathId: 0,
title: 'خرید داخل استان',
color: AppColor.greenLightActive.toARGB32(),
iconColor: AppColor.greenNormal.toARGB32(),
iconPath: Assets.vec.cubeSearchSvg.path,
path: StewardRoutes.buysInProvinceSteward,
),
WidelyUsedLocalItem(
index: 1,
pathId: 1,
title: 'فروش داخل استان',
color: AppColor.blueLightActive.toARGB32(),
iconColor: AppColor.blueNormal.toARGB32(),
iconPath: Assets.vec.cubeSvg.path,
path: StewardRoutes.salesInProvinceSteward,
),
WidelyUsedLocalItem(
index: 2,
title: 'قطعه‌بندی',
color: AppColor.blueLightActive.toARGB32(),
iconColor: AppColor.blueNormal.toARGB32(),
iconPath: Assets.vec.cubeRotateSvg.path,
path: StewardRoutes.buysInProvinceSteward,
),
]; */
}
@override
WidelyUsedLocalModel? getAllWidely() {
var res = local.readBox<WidelyUsedLocalModel>(boxName: boxName);
return res?.isNotEmpty == true ? res!.first : null;
}
}

View File

@@ -0,0 +1,16 @@
import 'package:rasadyar_chicken/features/common/data/model/response/user_info/user_info_model.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/user_profile_model/user_profile_model.dart';
abstract class AuthRemoteDataSource {
Future<UserProfileModel?> login({required Map<String, dynamic> authRequest});
Future<void> logout();
Future<bool> hasAuthenticated();
Future<UserInfoModel?> getUserInfo(String phoneNumber);
Future<void> stewardAppLogin({required String token, Map<String, dynamic>? queryParameters});
}

View File

@@ -0,0 +1,67 @@
import 'package:rasadyar_chicken/features/common/data/model/response/user_info/user_info_model.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/user_profile_model/user_profile_model.dart';
import 'package:rasadyar_core/core.dart';
import 'auth_remote.dart';
class AuthRemoteDataSourceImp extends AuthRemoteDataSource {
final DioRemote _httpClient;
final String _BASE_URL = 'auth/api/v1/';
AuthRemoteDataSourceImp(this._httpClient);
@override
Future<UserProfileModel?> login({
required Map<String, dynamic> authRequest,
}) async {
var res = await _httpClient.post<UserProfileModel?>(
'/api/login/',
data: authRequest,
fromJson: UserProfileModel.fromJson,
headers: {'Content-Type': 'application/json'},
);
return res.data;
}
@override
Future<void> logout() {
// TODO: implement logout
throw UnimplementedError();
}
@override
Future<bool> hasAuthenticated() async {
final response = await _httpClient.get<bool>(
'$_BASE_URL/login/',
headers: {'Content-Type': 'application/json'},
);
return response.data ?? false;
}
@override
Future<UserInfoModel?> getUserInfo(String phoneNumber) async {
var res = await _httpClient.post<UserInfoModel?>(
'https://userbackend.rasadyar.com/api/send_otp/',
data: {"mobile": phoneNumber, "state": ""},
fromJson: UserInfoModel.fromJson,
headers: {'Content-Type': 'application/json'},
);
return res.data;
}
@override
Future<void> stewardAppLogin({
required String token,
Map<String, dynamic>? queryParameters,
}) async {
await _httpClient.post(
'/steward-app-login/',
data: queryParameters,
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer $token',
},
);
}
}

View File

@@ -1,3 +0,0 @@
abstract class ChickenRemoteDataSource {
Future<void> getChickens();
}

View File

@@ -0,0 +1,75 @@
import 'package:rasadyar_chicken/features/common/data/model/request/change_password/change_password_request_model.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/bar_information/bar_information.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/broadcast_price/broadcast_price.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/guild/guild_model.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/guild_profile/guild_profile.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/inventory/inventory_model.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/iran_province_city/iran_province_city_model.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/kill_house_distribution_info/kill_house_distribution_info.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/roles_products/roles_products.dart';
import 'package:rasadyar_chicken/features/steward/data/model/response/segmentation_model/segmentation_model.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/user_profile/user_profile.dart';
import 'package:rasadyar_core/core.dart';
abstract class CommonRemoteDatasource {
Future<List<InventoryModel>?> getInventory({
required String token,
CancelToken? cancelToken,
});
Future<KillHouseDistributionInfo?> getKillHouseDistributionInfo({
required String token,
});
Future<BarInformation?> getGeneralBarInformation({
required String token,
Map<String, dynamic>? queryParameters,
});
Future<List<ProductModel>?> getRolesProducts({required String token});
Future<List<GuildModel>?> getGuilds({
required String token,
Map<String, dynamic>? queryParameters,
});
Future<GuildProfile?> getProfile({required String token});
Future<List<IranProvinceCityModel>?> getProvince({CancelToken? cancelToken});
Future<List<IranProvinceCityModel>?> getCity({required String provinceName});
Future<UserProfile?> getUserProfile({required String token});
Future<void> updateUserProfile({
required String token,
required UserProfile userProfile,
});
Future<void> updatePassword({
required String token,
required ChangePasswordRequestModel model,
});
Future<PaginationModel<SegmentationModel>?> getSegmentation({
required String token,
Map<String, dynamic>? queryParameters,
});
Future<void> createSegmentation({
required String token,
required SegmentationModel model,
});
Future<void> editSegmentation({
required String token,
required SegmentationModel model,
});
Future<SegmentationModel?> deleteSegmentation({
required String token,
required String key,
});
Future<BroadcastPrice?> getBroadcastPrice({required String token});
}

View File

@@ -0,0 +1,238 @@
import 'package:rasadyar_chicken/features/common/data/model/request/change_password/change_password_request_model.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/bar_information/bar_information.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/broadcast_price/broadcast_price.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/guild/guild_model.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/guild_profile/guild_profile.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/inventory/inventory_model.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/iran_province_city/iran_province_city_model.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/kill_house_distribution_info/kill_house_distribution_info.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/roles_products/roles_products.dart';
import 'package:rasadyar_chicken/features/steward/data/model/response/segmentation_model/segmentation_model.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/user_profile/user_profile.dart';
import 'package:rasadyar_core/core.dart';
import 'common_remote.dart';
class CommonRemoteDatasourceImp implements CommonRemoteDatasource {
final DioRemote _httpClient;
CommonRemoteDatasourceImp(this._httpClient);
@override
Future<List<InventoryModel>?> getInventory({
required String token,
CancelToken? cancelToken,
}) async {
var res = await _httpClient.get(
'/roles-products/?role=Steward',
headers: {'Authorization': 'Bearer $token'},
fromJsonList: (json) => (json)
.map((item) => InventoryModel.fromJson(item as Map<String, dynamic>))
.toList(),
);
return res.data;
}
@override
Future<KillHouseDistributionInfo?> getKillHouseDistributionInfo({
required String token,
}) async {
var res = await _httpClient.get(
'/kill-house-distribution-info/?role=Steward',
headers: {'Authorization': 'Bearer $token'},
fromJson: KillHouseDistributionInfo.fromJson,
);
return res.data;
}
@override
Future<BarInformation?> getGeneralBarInformation({
required String token,
Map<String, dynamic>? queryParameters,
}) async {
var res = await _httpClient.get(
'/bars_for_kill_house_dashboard/',
queryParameters: queryParameters,
headers: {'Authorization': 'Bearer $token'},
fromJson: BarInformation.fromJson,
);
return res.data;
}
@override
Future<List<ProductModel>?> getRolesProducts({required String token}) async {
var res = await _httpClient.get(
'/roles-products/?role=Steward',
headers: {'Authorization': 'Bearer $token'},
fromJsonList: (json) => json
.map((item) => ProductModel.fromJson(item as Map<String, dynamic>))
.toList(),
);
return res.data;
}
@override
Future<List<GuildModel>?> getGuilds({
required String token,
Map<String, dynamic>? queryParameters,
}) async {
var res = await _httpClient.get(
'/guilds/',
queryParameters: queryParameters,
headers: {'Authorization': 'Bearer $token'},
fromJsonList: (json) => json
.map((item) => GuildModel.fromJson(item as Map<String, dynamic>))
.toList(),
);
return res.data;
}
@override
Future<GuildProfile?> getProfile({required String token}) async {
var res = await _httpClient.get(
'/guilds/0/?profile',
headers: {'Authorization': 'Bearer $token'},
fromJson: GuildProfile.fromJson,
);
return res.data;
}
@override
Future<List<IranProvinceCityModel>?> getCity({
required String provinceName,
}) async {
var res = await _httpClient.get(
'/iran_city/',
queryParameters: {'name': provinceName},
fromJsonList: (json) => json
.map(
(item) =>
IranProvinceCityModel.fromJson(item as Map<String, dynamic>),
)
.toList(),
);
return res.data;
}
@override
Future<List<IranProvinceCityModel>?> getProvince({
CancelToken? cancelToken,
}) async {
var res = await _httpClient.get(
'/iran_province/',
fromJsonList: (json) => json
.map(
(item) =>
IranProvinceCityModel.fromJson(item as Map<String, dynamic>),
)
.toList(),
);
return res.data;
}
@override
Future<UserProfile?> getUserProfile({required String token}) async {
var res = await _httpClient.get(
'/system_user_profile/?self-profile',
headers: {'Authorization': 'Bearer $token'},
fromJson: (json) => UserProfile.fromJson(json),
);
return res.data;
}
@override
Future<void> updateUserProfile({
required String token,
required UserProfile userProfile,
}) async {
await _httpClient.put(
'/system_user_profile/0/',
headers: {'Authorization': 'Bearer $token'},
data: userProfile.toJson()..removeWhere((key, value) => value == null),
);
}
@override
Future<void> updatePassword({
required String token,
required ChangePasswordRequestModel model,
}) async {
await _httpClient.post(
'/api/change_password/',
headers: {'Authorization': 'Bearer $token'},
data: model.toJson()..removeWhere((key, value) => value == null),
);
}
@override
Future<PaginationModel<SegmentationModel>?> getSegmentation({
required String token,
Map<String, dynamic>? queryParameters,
}) async {
var res = await _httpClient.get(
'/app-segmentation/',
queryParameters: queryParameters,
headers: {'Authorization': 'Bearer $token'},
fromJson: (json) => PaginationModel<SegmentationModel>.fromJson(
json,
(json) => SegmentationModel.fromJson(json as Map<String, dynamic>),
),
);
return res.data;
}
@override
Future<void> createSegmentation({
required String token,
required SegmentationModel model,
}) async {
await _httpClient.post(
'/app-segmentation/',
data: model.toJson()..removeWhere((key, value) => value == null),
headers: {'Authorization': 'Bearer $token'},
);
}
@override
Future<void> editSegmentation({
required String token,
required SegmentationModel model,
}) async {
await _httpClient.put(
'/app-segmentation/0/',
data: model.toJson()..removeWhere((key, value) => value == null),
headers: {'Authorization': 'Bearer $token'},
);
}
@override
Future<SegmentationModel?> deleteSegmentation({
required String token,
required String key,
}) async {
var res = await _httpClient.delete<SegmentationModel?>(
'/app-segmentation/0/',
queryParameters: {'key': key},
headers: {'Authorization': 'Bearer $token'},
fromJson: (json) => SegmentationModel.fromJson(json),
);
return res.data;
}
@override
Future<BroadcastPrice?> getBroadcastPrice({required String token}) async {
var res = await _httpClient.get(
'/broadcast-price/',
headers: {'Authorization': 'Bearer $token'},
fromJson: (json) => BroadcastPrice.fromJson(json),
);
return res.data;
}
}

View File

@@ -0,0 +1,66 @@
import 'package:rasadyar_chicken/features/common/data/datasources/local/chicken_local.dart';
import 'package:rasadyar_chicken/features/common/data/datasources/local/chicken_local_imp.dart';
import 'package:rasadyar_chicken/features/common/data/datasources/remote/auth/auth_remote.dart';
import 'package:rasadyar_chicken/features/common/data/datasources/remote/auth/auth_remote_imp.dart';
import 'package:rasadyar_chicken/features/common/data/datasources/remote/common/common_remote.dart';
import 'package:rasadyar_chicken/features/common/data/datasources/remote/common/common_remote_imp.dart';
import 'package:rasadyar_chicken/features/common/data/repositories/auth/auth_repository.dart';
import 'package:rasadyar_chicken/features/common/data/repositories/auth/auth_repository_imp.dart';
import 'package:rasadyar_chicken/features/common/data/repositories/common/common_repository.dart';
import 'package:rasadyar_chicken/features/common/data/repositories/common/common_repository_imp.dart';
import 'package:rasadyar_core/core.dart';
/// Setup dependency injection for common feature
Future<void> setupCommonDI(GetIt di, DioRemote dioRemote) async {
di.registerLazySingleton<AuthRemoteDataSource>(
() => AuthRemoteDataSourceImp(dioRemote),
);
di.registerLazySingleton<AuthRepository>(
() => AuthRepositoryImpl(di.get<AuthRemoteDataSource>()),
);
di.registerLazySingleton<CommonRemoteDatasource>(
() => CommonRemoteDatasourceImp(dioRemote),
);
di.registerLazySingleton<ChickenLocalDataSource>(
() => ChickenLocalDataSourceImp(),
);
di.registerLazySingleton<CommonRepository>(
() => CommonRepositoryImp(
remote: di.get<CommonRemoteDatasource>(),
local: di.get<ChickenLocalDataSource>(),
),
);
}
/// Re-register common dependencies (used when base URL changes)
Future<void> reRegisterCommonDI(GetIt di, DioRemote dioRemote) async {
await reRegister(di, () => AuthRemoteDataSourceImp(dioRemote));
await reRegister(
di,
() => AuthRepositoryImpl(di.get<AuthRemoteDataSource>()),
);
await reRegister(di, () => CommonRemoteDatasourceImp(dioRemote));
await reRegister(di, () => ChickenLocalDataSourceImp());
await reRegister(
di,
() => CommonRepositoryImp(
remote: di.get<CommonRemoteDatasource>(),
local: di.get<ChickenLocalDataSource>(),
),
);
}
/// Helper function to re-register a dependency
Future<void> reRegister<T extends Object>(
GetIt di,
T Function() factory,
) async {
if (di.isRegistered<T>()) {
await di.unregister<T>();
}
di.registerLazySingleton<T>(factory);
}

View File

@@ -0,0 +1,72 @@
import 'package:rasadyar_core/core.dart';
part 'widely_used_local_model.g.dart';
@HiveType(typeId: chickenWidelyUsedLocalModelTypeId)
class WidelyUsedLocalModel extends HiveObject {
@HiveField(0)
bool? hasInit;
@HiveField(1)
List<WidelyUsedLocalItem>? items;
WidelyUsedLocalModel({this.hasInit, this.items});
WidelyUsedLocalModel copyWith({bool? hasInit, List<WidelyUsedLocalItem>? items}) {
return WidelyUsedLocalModel(hasInit: hasInit ?? this.hasInit, items: items ?? this.items);
}
}
@HiveType(typeId: chickenWidelyUsedLocalItemTypeId)
class WidelyUsedLocalItem extends HiveObject {
@HiveField(0)
String? title;
@HiveField(1)
String? iconPath;
@HiveField(2)
int? iconColor;
@HiveField(3)
int? color;
@HiveField(4)
String? path;
@HiveField(5)
int? pathId;
@HiveField(6)
int? index;
WidelyUsedLocalItem({
this.title,
this.iconPath,
this.iconColor,
this.color,
this.path,
this.pathId,
this.index,
});
WidelyUsedLocalItem copyWith({
String? title,
String? iconPath,
int? iconColor,
int? color,
int? pathId,
int? index,
String? path,
}) {
return WidelyUsedLocalItem(
title: title ?? this.title,
iconPath: iconPath ?? this.iconPath,
iconColor: iconColor ?? this.iconColor,
color: color ?? this.color,
path: path ?? this.path,
pathId: pathId ?? this.pathId,
index: index ?? this.index,
);
}
}

View File

@@ -0,0 +1,96 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'widely_used_local_model.dart';
// **************************************************************************
// TypeAdapterGenerator
// **************************************************************************
class WidelyUsedLocalModelAdapter extends TypeAdapter<WidelyUsedLocalModel> {
@override
final typeId = 4;
@override
WidelyUsedLocalModel read(BinaryReader reader) {
final numOfFields = reader.readByte();
final fields = <int, dynamic>{
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
};
return WidelyUsedLocalModel(
hasInit: fields[0] as bool?,
items: (fields[1] as List?)?.cast<WidelyUsedLocalItem>(),
);
}
@override
void write(BinaryWriter writer, WidelyUsedLocalModel obj) {
writer
..writeByte(2)
..writeByte(0)
..write(obj.hasInit)
..writeByte(1)
..write(obj.items);
}
@override
int get hashCode => typeId.hashCode;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is WidelyUsedLocalModelAdapter &&
runtimeType == other.runtimeType &&
typeId == other.typeId;
}
class WidelyUsedLocalItemAdapter extends TypeAdapter<WidelyUsedLocalItem> {
@override
final typeId = 5;
@override
WidelyUsedLocalItem read(BinaryReader reader) {
final numOfFields = reader.readByte();
final fields = <int, dynamic>{
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
};
return WidelyUsedLocalItem(
title: fields[0] as String?,
iconPath: fields[1] as String?,
iconColor: (fields[2] as num?)?.toInt(),
color: (fields[3] as num?)?.toInt(),
path: fields[4] as String?,
pathId: (fields[5] as num?)?.toInt(),
index: (fields[6] as num?)?.toInt(),
);
}
@override
void write(BinaryWriter writer, WidelyUsedLocalItem obj) {
writer
..writeByte(7)
..writeByte(0)
..write(obj.title)
..writeByte(1)
..write(obj.iconPath)
..writeByte(2)
..write(obj.iconColor)
..writeByte(3)
..write(obj.color)
..writeByte(4)
..write(obj.path)
..writeByte(5)
..write(obj.pathId)
..writeByte(6)
..write(obj.index);
}
@override
int get hashCode => typeId.hashCode;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is WidelyUsedLocalItemAdapter &&
runtimeType == other.runtimeType &&
typeId == other.typeId;
}

View File

@@ -0,0 +1,18 @@
import 'package:rasadyar_core/core.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
part 'change_password_request_model.freezed.dart';
part 'change_password_request_model.g.dart';
@freezed
abstract class ChangePasswordRequestModel with _$ChangePasswordRequestModel {
const factory ChangePasswordRequestModel({
String? username,
String? password,
}) = _ChangePasswordRequestModel;
factory ChangePasswordRequestModel.fromJson(Map<String, dynamic> json) =>
_$ChangePasswordRequestModelFromJson(json);
}

View File

@@ -0,0 +1,280 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'change_password_request_model.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$ChangePasswordRequestModel {
String? get username; String? get password;
/// Create a copy of ChangePasswordRequestModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$ChangePasswordRequestModelCopyWith<ChangePasswordRequestModel> get copyWith => _$ChangePasswordRequestModelCopyWithImpl<ChangePasswordRequestModel>(this as ChangePasswordRequestModel, _$identity);
/// Serializes this ChangePasswordRequestModel to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is ChangePasswordRequestModel&&(identical(other.username, username) || other.username == username)&&(identical(other.password, password) || other.password == password));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,username,password);
@override
String toString() {
return 'ChangePasswordRequestModel(username: $username, password: $password)';
}
}
/// @nodoc
abstract mixin class $ChangePasswordRequestModelCopyWith<$Res> {
factory $ChangePasswordRequestModelCopyWith(ChangePasswordRequestModel value, $Res Function(ChangePasswordRequestModel) _then) = _$ChangePasswordRequestModelCopyWithImpl;
@useResult
$Res call({
String? username, String? password
});
}
/// @nodoc
class _$ChangePasswordRequestModelCopyWithImpl<$Res>
implements $ChangePasswordRequestModelCopyWith<$Res> {
_$ChangePasswordRequestModelCopyWithImpl(this._self, this._then);
final ChangePasswordRequestModel _self;
final $Res Function(ChangePasswordRequestModel) _then;
/// Create a copy of ChangePasswordRequestModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? username = freezed,Object? password = freezed,}) {
return _then(_self.copyWith(
username: freezed == username ? _self.username : username // ignore: cast_nullable_to_non_nullable
as String?,password: freezed == password ? _self.password : password // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// Adds pattern-matching-related methods to [ChangePasswordRequestModel].
extension ChangePasswordRequestModelPatterns on ChangePasswordRequestModel {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _ChangePasswordRequestModel value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _ChangePasswordRequestModel() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _ChangePasswordRequestModel value) $default,){
final _that = this;
switch (_that) {
case _ChangePasswordRequestModel():
return $default(_that);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _ChangePasswordRequestModel value)? $default,){
final _that = this;
switch (_that) {
case _ChangePasswordRequestModel() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? username, String? password)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _ChangePasswordRequestModel() when $default != null:
return $default(_that.username,_that.password);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? username, String? password) $default,) {final _that = this;
switch (_that) {
case _ChangePasswordRequestModel():
return $default(_that.username,_that.password);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? username, String? password)? $default,) {final _that = this;
switch (_that) {
case _ChangePasswordRequestModel() when $default != null:
return $default(_that.username,_that.password);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _ChangePasswordRequestModel implements ChangePasswordRequestModel {
const _ChangePasswordRequestModel({this.username, this.password});
factory _ChangePasswordRequestModel.fromJson(Map<String, dynamic> json) => _$ChangePasswordRequestModelFromJson(json);
@override final String? username;
@override final String? password;
/// Create a copy of ChangePasswordRequestModel
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$ChangePasswordRequestModelCopyWith<_ChangePasswordRequestModel> get copyWith => __$ChangePasswordRequestModelCopyWithImpl<_ChangePasswordRequestModel>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$ChangePasswordRequestModelToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ChangePasswordRequestModel&&(identical(other.username, username) || other.username == username)&&(identical(other.password, password) || other.password == password));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,username,password);
@override
String toString() {
return 'ChangePasswordRequestModel(username: $username, password: $password)';
}
}
/// @nodoc
abstract mixin class _$ChangePasswordRequestModelCopyWith<$Res> implements $ChangePasswordRequestModelCopyWith<$Res> {
factory _$ChangePasswordRequestModelCopyWith(_ChangePasswordRequestModel value, $Res Function(_ChangePasswordRequestModel) _then) = __$ChangePasswordRequestModelCopyWithImpl;
@override @useResult
$Res call({
String? username, String? password
});
}
/// @nodoc
class __$ChangePasswordRequestModelCopyWithImpl<$Res>
implements _$ChangePasswordRequestModelCopyWith<$Res> {
__$ChangePasswordRequestModelCopyWithImpl(this._self, this._then);
final _ChangePasswordRequestModel _self;
final $Res Function(_ChangePasswordRequestModel) _then;
/// Create a copy of ChangePasswordRequestModel
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? username = freezed,Object? password = freezed,}) {
return _then(_ChangePasswordRequestModel(
username: freezed == username ? _self.username : username // ignore: cast_nullable_to_non_nullable
as String?,password: freezed == password ? _self.password : password // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
// dart format on

View File

@@ -0,0 +1,21 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'change_password_request_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_ChangePasswordRequestModel _$ChangePasswordRequestModelFromJson(
Map<String, dynamic> json,
) => _ChangePasswordRequestModel(
username: json['username'] as String?,
password: json['password'] as String?,
);
Map<String, dynamic> _$ChangePasswordRequestModelToJson(
_ChangePasswordRequestModel instance,
) => <String, dynamic>{
'username': instance.username,
'password': instance.password,
};

View File

@@ -0,0 +1,34 @@
import 'package:rasadyar_core/core.dart';
part 'login_request_model.freezed.dart';
part 'login_request_model.g.dart';
@freezed
abstract class LoginRequestModel with _$LoginRequestModel {
const factory LoginRequestModel({
String? username,
String? password,
String? captchaCode,
String? captchaKey,
}) = _LoginRequestModel;
factory LoginRequestModel.createWithCaptcha({
required String username,
required String password,
required String captchaCode,
required String captchaKey,
}) {
return LoginRequestModel(
username: username,
password: password,
captchaCode: captchaCode,
captchaKey: 'rest_captcha_$captchaKey.0',
);
}
factory LoginRequestModel.fromJson(Map<String, dynamic> json) =>
_$LoginRequestModelFromJson(json);
const LoginRequestModel._();
}

View File

@@ -0,0 +1,286 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'login_request_model.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$LoginRequestModel {
String? get username; String? get password; String? get captchaCode; String? get captchaKey;
/// Create a copy of LoginRequestModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$LoginRequestModelCopyWith<LoginRequestModel> get copyWith => _$LoginRequestModelCopyWithImpl<LoginRequestModel>(this as LoginRequestModel, _$identity);
/// Serializes this LoginRequestModel to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is LoginRequestModel&&(identical(other.username, username) || other.username == username)&&(identical(other.password, password) || other.password == password)&&(identical(other.captchaCode, captchaCode) || other.captchaCode == captchaCode)&&(identical(other.captchaKey, captchaKey) || other.captchaKey == captchaKey));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,username,password,captchaCode,captchaKey);
@override
String toString() {
return 'LoginRequestModel(username: $username, password: $password, captchaCode: $captchaCode, captchaKey: $captchaKey)';
}
}
/// @nodoc
abstract mixin class $LoginRequestModelCopyWith<$Res> {
factory $LoginRequestModelCopyWith(LoginRequestModel value, $Res Function(LoginRequestModel) _then) = _$LoginRequestModelCopyWithImpl;
@useResult
$Res call({
String? username, String? password, String? captchaCode, String? captchaKey
});
}
/// @nodoc
class _$LoginRequestModelCopyWithImpl<$Res>
implements $LoginRequestModelCopyWith<$Res> {
_$LoginRequestModelCopyWithImpl(this._self, this._then);
final LoginRequestModel _self;
final $Res Function(LoginRequestModel) _then;
/// Create a copy of LoginRequestModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? username = freezed,Object? password = freezed,Object? captchaCode = freezed,Object? captchaKey = freezed,}) {
return _then(_self.copyWith(
username: freezed == username ? _self.username : username // ignore: cast_nullable_to_non_nullable
as String?,password: freezed == password ? _self.password : password // ignore: cast_nullable_to_non_nullable
as String?,captchaCode: freezed == captchaCode ? _self.captchaCode : captchaCode // ignore: cast_nullable_to_non_nullable
as String?,captchaKey: freezed == captchaKey ? _self.captchaKey : captchaKey // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// Adds pattern-matching-related methods to [LoginRequestModel].
extension LoginRequestModelPatterns on LoginRequestModel {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _LoginRequestModel value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _LoginRequestModel() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _LoginRequestModel value) $default,){
final _that = this;
switch (_that) {
case _LoginRequestModel():
return $default(_that);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _LoginRequestModel value)? $default,){
final _that = this;
switch (_that) {
case _LoginRequestModel() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? username, String? password, String? captchaCode, String? captchaKey)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _LoginRequestModel() when $default != null:
return $default(_that.username,_that.password,_that.captchaCode,_that.captchaKey);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? username, String? password, String? captchaCode, String? captchaKey) $default,) {final _that = this;
switch (_that) {
case _LoginRequestModel():
return $default(_that.username,_that.password,_that.captchaCode,_that.captchaKey);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? username, String? password, String? captchaCode, String? captchaKey)? $default,) {final _that = this;
switch (_that) {
case _LoginRequestModel() when $default != null:
return $default(_that.username,_that.password,_that.captchaCode,_that.captchaKey);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _LoginRequestModel extends LoginRequestModel {
const _LoginRequestModel({this.username, this.password, this.captchaCode, this.captchaKey}): super._();
factory _LoginRequestModel.fromJson(Map<String, dynamic> json) => _$LoginRequestModelFromJson(json);
@override final String? username;
@override final String? password;
@override final String? captchaCode;
@override final String? captchaKey;
/// Create a copy of LoginRequestModel
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$LoginRequestModelCopyWith<_LoginRequestModel> get copyWith => __$LoginRequestModelCopyWithImpl<_LoginRequestModel>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$LoginRequestModelToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _LoginRequestModel&&(identical(other.username, username) || other.username == username)&&(identical(other.password, password) || other.password == password)&&(identical(other.captchaCode, captchaCode) || other.captchaCode == captchaCode)&&(identical(other.captchaKey, captchaKey) || other.captchaKey == captchaKey));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,username,password,captchaCode,captchaKey);
@override
String toString() {
return 'LoginRequestModel(username: $username, password: $password, captchaCode: $captchaCode, captchaKey: $captchaKey)';
}
}
/// @nodoc
abstract mixin class _$LoginRequestModelCopyWith<$Res> implements $LoginRequestModelCopyWith<$Res> {
factory _$LoginRequestModelCopyWith(_LoginRequestModel value, $Res Function(_LoginRequestModel) _then) = __$LoginRequestModelCopyWithImpl;
@override @useResult
$Res call({
String? username, String? password, String? captchaCode, String? captchaKey
});
}
/// @nodoc
class __$LoginRequestModelCopyWithImpl<$Res>
implements _$LoginRequestModelCopyWith<$Res> {
__$LoginRequestModelCopyWithImpl(this._self, this._then);
final _LoginRequestModel _self;
final $Res Function(_LoginRequestModel) _then;
/// Create a copy of LoginRequestModel
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? username = freezed,Object? password = freezed,Object? captchaCode = freezed,Object? captchaKey = freezed,}) {
return _then(_LoginRequestModel(
username: freezed == username ? _self.username : username // ignore: cast_nullable_to_non_nullable
as String?,password: freezed == password ? _self.password : password // ignore: cast_nullable_to_non_nullable
as String?,captchaCode: freezed == captchaCode ? _self.captchaCode : captchaCode // ignore: cast_nullable_to_non_nullable
as String?,captchaKey: freezed == captchaKey ? _self.captchaKey : captchaKey // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
// dart format on

View File

@@ -0,0 +1,23 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'login_request_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_LoginRequestModel _$LoginRequestModelFromJson(Map<String, dynamic> json) =>
_LoginRequestModel(
username: json['username'] as String?,
password: json['password'] as String?,
captchaCode: json['captcha_code'] as String?,
captchaKey: json['captcha_key'] as String?,
);
Map<String, dynamic> _$LoginRequestModelToJson(_LoginRequestModel instance) =>
<String, dynamic>{
'username': instance.username,
'password': instance.password,
'captcha_code': instance.captchaCode,
'captcha_key': instance.captchaKey,
};

View File

@@ -0,0 +1,29 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'submit_kill_house_free_bar.freezed.dart';
part 'submit_kill_house_free_bar.g.dart';
@freezed
abstract class SubmitKillHouseFreeBar with _$SubmitKillHouseFreeBar {
const factory SubmitKillHouseFreeBar({
String? driverName,
String? driverMobile,
String? poultryName,
String? poultryMobile,
String? province,
String? city,
String? barClearanceCode,
String? barImage,
String? killerKey,
String? date,
String? buyType,
String? productKey,
String? car,
String? numberOfCarcasses,
String? weightOfCarcasses,
}) = _SubmitKillHouseFreeBar;
factory SubmitKillHouseFreeBar.fromJson(Map<String, dynamic> json) =>
_$SubmitKillHouseFreeBarFromJson(json);
}

View File

@@ -0,0 +1,319 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'submit_kill_house_free_bar.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$SubmitKillHouseFreeBar {
String? get driverName; String? get driverMobile; String? get poultryName; String? get poultryMobile; String? get province; String? get city; String? get barClearanceCode; String? get barImage; String? get killerKey; String? get date; String? get buyType; String? get productKey; String? get car; String? get numberOfCarcasses; String? get weightOfCarcasses;
/// Create a copy of SubmitKillHouseFreeBar
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$SubmitKillHouseFreeBarCopyWith<SubmitKillHouseFreeBar> get copyWith => _$SubmitKillHouseFreeBarCopyWithImpl<SubmitKillHouseFreeBar>(this as SubmitKillHouseFreeBar, _$identity);
/// Serializes this SubmitKillHouseFreeBar to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is SubmitKillHouseFreeBar&&(identical(other.driverName, driverName) || other.driverName == driverName)&&(identical(other.driverMobile, driverMobile) || other.driverMobile == driverMobile)&&(identical(other.poultryName, poultryName) || other.poultryName == poultryName)&&(identical(other.poultryMobile, poultryMobile) || other.poultryMobile == poultryMobile)&&(identical(other.province, province) || other.province == province)&&(identical(other.city, city) || other.city == city)&&(identical(other.barClearanceCode, barClearanceCode) || other.barClearanceCode == barClearanceCode)&&(identical(other.barImage, barImage) || other.barImage == barImage)&&(identical(other.killerKey, killerKey) || other.killerKey == killerKey)&&(identical(other.date, date) || other.date == date)&&(identical(other.buyType, buyType) || other.buyType == buyType)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.car, car) || other.car == car)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,driverName,driverMobile,poultryName,poultryMobile,province,city,barClearanceCode,barImage,killerKey,date,buyType,productKey,car,numberOfCarcasses,weightOfCarcasses);
@override
String toString() {
return 'SubmitKillHouseFreeBar(driverName: $driverName, driverMobile: $driverMobile, poultryName: $poultryName, poultryMobile: $poultryMobile, province: $province, city: $city, barClearanceCode: $barClearanceCode, barImage: $barImage, killerKey: $killerKey, date: $date, buyType: $buyType, productKey: $productKey, car: $car, numberOfCarcasses: $numberOfCarcasses, weightOfCarcasses: $weightOfCarcasses)';
}
}
/// @nodoc
abstract mixin class $SubmitKillHouseFreeBarCopyWith<$Res> {
factory $SubmitKillHouseFreeBarCopyWith(SubmitKillHouseFreeBar value, $Res Function(SubmitKillHouseFreeBar) _then) = _$SubmitKillHouseFreeBarCopyWithImpl;
@useResult
$Res call({
String? driverName, String? driverMobile, String? poultryName, String? poultryMobile, String? province, String? city, String? barClearanceCode, String? barImage, String? killerKey, String? date, String? buyType, String? productKey, String? car, String? numberOfCarcasses, String? weightOfCarcasses
});
}
/// @nodoc
class _$SubmitKillHouseFreeBarCopyWithImpl<$Res>
implements $SubmitKillHouseFreeBarCopyWith<$Res> {
_$SubmitKillHouseFreeBarCopyWithImpl(this._self, this._then);
final SubmitKillHouseFreeBar _self;
final $Res Function(SubmitKillHouseFreeBar) _then;
/// Create a copy of SubmitKillHouseFreeBar
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? driverName = freezed,Object? driverMobile = freezed,Object? poultryName = freezed,Object? poultryMobile = freezed,Object? province = freezed,Object? city = freezed,Object? barClearanceCode = freezed,Object? barImage = freezed,Object? killerKey = freezed,Object? date = freezed,Object? buyType = freezed,Object? productKey = freezed,Object? car = freezed,Object? numberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,}) {
return _then(_self.copyWith(
driverName: freezed == driverName ? _self.driverName : driverName // ignore: cast_nullable_to_non_nullable
as String?,driverMobile: freezed == driverMobile ? _self.driverMobile : driverMobile // ignore: cast_nullable_to_non_nullable
as String?,poultryName: freezed == poultryName ? _self.poultryName : poultryName // ignore: cast_nullable_to_non_nullable
as String?,poultryMobile: freezed == poultryMobile ? _self.poultryMobile : poultryMobile // ignore: cast_nullable_to_non_nullable
as String?,province: freezed == province ? _self.province : province // ignore: cast_nullable_to_non_nullable
as String?,city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable
as String?,barClearanceCode: freezed == barClearanceCode ? _self.barClearanceCode : barClearanceCode // ignore: cast_nullable_to_non_nullable
as String?,barImage: freezed == barImage ? _self.barImage : barImage // ignore: cast_nullable_to_non_nullable
as String?,killerKey: freezed == killerKey ? _self.killerKey : killerKey // ignore: cast_nullable_to_non_nullable
as String?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
as String?,buyType: freezed == buyType ? _self.buyType : buyType // ignore: cast_nullable_to_non_nullable
as String?,productKey: freezed == productKey ? _self.productKey : productKey // ignore: cast_nullable_to_non_nullable
as String?,car: freezed == car ? _self.car : car // ignore: cast_nullable_to_non_nullable
as String?,numberOfCarcasses: freezed == numberOfCarcasses ? _self.numberOfCarcasses : numberOfCarcasses // ignore: cast_nullable_to_non_nullable
as String?,weightOfCarcasses: freezed == weightOfCarcasses ? _self.weightOfCarcasses : weightOfCarcasses // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// Adds pattern-matching-related methods to [SubmitKillHouseFreeBar].
extension SubmitKillHouseFreeBarPatterns on SubmitKillHouseFreeBar {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _SubmitKillHouseFreeBar value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _SubmitKillHouseFreeBar() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _SubmitKillHouseFreeBar value) $default,){
final _that = this;
switch (_that) {
case _SubmitKillHouseFreeBar():
return $default(_that);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _SubmitKillHouseFreeBar value)? $default,){
final _that = this;
switch (_that) {
case _SubmitKillHouseFreeBar() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? driverName, String? driverMobile, String? poultryName, String? poultryMobile, String? province, String? city, String? barClearanceCode, String? barImage, String? killerKey, String? date, String? buyType, String? productKey, String? car, String? numberOfCarcasses, String? weightOfCarcasses)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _SubmitKillHouseFreeBar() when $default != null:
return $default(_that.driverName,_that.driverMobile,_that.poultryName,_that.poultryMobile,_that.province,_that.city,_that.barClearanceCode,_that.barImage,_that.killerKey,_that.date,_that.buyType,_that.productKey,_that.car,_that.numberOfCarcasses,_that.weightOfCarcasses);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? driverName, String? driverMobile, String? poultryName, String? poultryMobile, String? province, String? city, String? barClearanceCode, String? barImage, String? killerKey, String? date, String? buyType, String? productKey, String? car, String? numberOfCarcasses, String? weightOfCarcasses) $default,) {final _that = this;
switch (_that) {
case _SubmitKillHouseFreeBar():
return $default(_that.driverName,_that.driverMobile,_that.poultryName,_that.poultryMobile,_that.province,_that.city,_that.barClearanceCode,_that.barImage,_that.killerKey,_that.date,_that.buyType,_that.productKey,_that.car,_that.numberOfCarcasses,_that.weightOfCarcasses);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? driverName, String? driverMobile, String? poultryName, String? poultryMobile, String? province, String? city, String? barClearanceCode, String? barImage, String? killerKey, String? date, String? buyType, String? productKey, String? car, String? numberOfCarcasses, String? weightOfCarcasses)? $default,) {final _that = this;
switch (_that) {
case _SubmitKillHouseFreeBar() when $default != null:
return $default(_that.driverName,_that.driverMobile,_that.poultryName,_that.poultryMobile,_that.province,_that.city,_that.barClearanceCode,_that.barImage,_that.killerKey,_that.date,_that.buyType,_that.productKey,_that.car,_that.numberOfCarcasses,_that.weightOfCarcasses);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _SubmitKillHouseFreeBar implements SubmitKillHouseFreeBar {
const _SubmitKillHouseFreeBar({this.driverName, this.driverMobile, this.poultryName, this.poultryMobile, this.province, this.city, this.barClearanceCode, this.barImage, this.killerKey, this.date, this.buyType, this.productKey, this.car, this.numberOfCarcasses, this.weightOfCarcasses});
factory _SubmitKillHouseFreeBar.fromJson(Map<String, dynamic> json) => _$SubmitKillHouseFreeBarFromJson(json);
@override final String? driverName;
@override final String? driverMobile;
@override final String? poultryName;
@override final String? poultryMobile;
@override final String? province;
@override final String? city;
@override final String? barClearanceCode;
@override final String? barImage;
@override final String? killerKey;
@override final String? date;
@override final String? buyType;
@override final String? productKey;
@override final String? car;
@override final String? numberOfCarcasses;
@override final String? weightOfCarcasses;
/// Create a copy of SubmitKillHouseFreeBar
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$SubmitKillHouseFreeBarCopyWith<_SubmitKillHouseFreeBar> get copyWith => __$SubmitKillHouseFreeBarCopyWithImpl<_SubmitKillHouseFreeBar>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$SubmitKillHouseFreeBarToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _SubmitKillHouseFreeBar&&(identical(other.driverName, driverName) || other.driverName == driverName)&&(identical(other.driverMobile, driverMobile) || other.driverMobile == driverMobile)&&(identical(other.poultryName, poultryName) || other.poultryName == poultryName)&&(identical(other.poultryMobile, poultryMobile) || other.poultryMobile == poultryMobile)&&(identical(other.province, province) || other.province == province)&&(identical(other.city, city) || other.city == city)&&(identical(other.barClearanceCode, barClearanceCode) || other.barClearanceCode == barClearanceCode)&&(identical(other.barImage, barImage) || other.barImage == barImage)&&(identical(other.killerKey, killerKey) || other.killerKey == killerKey)&&(identical(other.date, date) || other.date == date)&&(identical(other.buyType, buyType) || other.buyType == buyType)&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.car, car) || other.car == car)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,driverName,driverMobile,poultryName,poultryMobile,province,city,barClearanceCode,barImage,killerKey,date,buyType,productKey,car,numberOfCarcasses,weightOfCarcasses);
@override
String toString() {
return 'SubmitKillHouseFreeBar(driverName: $driverName, driverMobile: $driverMobile, poultryName: $poultryName, poultryMobile: $poultryMobile, province: $province, city: $city, barClearanceCode: $barClearanceCode, barImage: $barImage, killerKey: $killerKey, date: $date, buyType: $buyType, productKey: $productKey, car: $car, numberOfCarcasses: $numberOfCarcasses, weightOfCarcasses: $weightOfCarcasses)';
}
}
/// @nodoc
abstract mixin class _$SubmitKillHouseFreeBarCopyWith<$Res> implements $SubmitKillHouseFreeBarCopyWith<$Res> {
factory _$SubmitKillHouseFreeBarCopyWith(_SubmitKillHouseFreeBar value, $Res Function(_SubmitKillHouseFreeBar) _then) = __$SubmitKillHouseFreeBarCopyWithImpl;
@override @useResult
$Res call({
String? driverName, String? driverMobile, String? poultryName, String? poultryMobile, String? province, String? city, String? barClearanceCode, String? barImage, String? killerKey, String? date, String? buyType, String? productKey, String? car, String? numberOfCarcasses, String? weightOfCarcasses
});
}
/// @nodoc
class __$SubmitKillHouseFreeBarCopyWithImpl<$Res>
implements _$SubmitKillHouseFreeBarCopyWith<$Res> {
__$SubmitKillHouseFreeBarCopyWithImpl(this._self, this._then);
final _SubmitKillHouseFreeBar _self;
final $Res Function(_SubmitKillHouseFreeBar) _then;
/// Create a copy of SubmitKillHouseFreeBar
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? driverName = freezed,Object? driverMobile = freezed,Object? poultryName = freezed,Object? poultryMobile = freezed,Object? province = freezed,Object? city = freezed,Object? barClearanceCode = freezed,Object? barImage = freezed,Object? killerKey = freezed,Object? date = freezed,Object? buyType = freezed,Object? productKey = freezed,Object? car = freezed,Object? numberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,}) {
return _then(_SubmitKillHouseFreeBar(
driverName: freezed == driverName ? _self.driverName : driverName // ignore: cast_nullable_to_non_nullable
as String?,driverMobile: freezed == driverMobile ? _self.driverMobile : driverMobile // ignore: cast_nullable_to_non_nullable
as String?,poultryName: freezed == poultryName ? _self.poultryName : poultryName // ignore: cast_nullable_to_non_nullable
as String?,poultryMobile: freezed == poultryMobile ? _self.poultryMobile : poultryMobile // ignore: cast_nullable_to_non_nullable
as String?,province: freezed == province ? _self.province : province // ignore: cast_nullable_to_non_nullable
as String?,city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable
as String?,barClearanceCode: freezed == barClearanceCode ? _self.barClearanceCode : barClearanceCode // ignore: cast_nullable_to_non_nullable
as String?,barImage: freezed == barImage ? _self.barImage : barImage // ignore: cast_nullable_to_non_nullable
as String?,killerKey: freezed == killerKey ? _self.killerKey : killerKey // ignore: cast_nullable_to_non_nullable
as String?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
as String?,buyType: freezed == buyType ? _self.buyType : buyType // ignore: cast_nullable_to_non_nullable
as String?,productKey: freezed == productKey ? _self.productKey : productKey // ignore: cast_nullable_to_non_nullable
as String?,car: freezed == car ? _self.car : car // ignore: cast_nullable_to_non_nullable
as String?,numberOfCarcasses: freezed == numberOfCarcasses ? _self.numberOfCarcasses : numberOfCarcasses // ignore: cast_nullable_to_non_nullable
as String?,weightOfCarcasses: freezed == weightOfCarcasses ? _self.weightOfCarcasses : weightOfCarcasses // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
// dart format on

View File

@@ -0,0 +1,47 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'submit_kill_house_free_bar.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_SubmitKillHouseFreeBar _$SubmitKillHouseFreeBarFromJson(
Map<String, dynamic> json,
) => _SubmitKillHouseFreeBar(
driverName: json['driver_name'] as String?,
driverMobile: json['driver_mobile'] as String?,
poultryName: json['poultry_name'] as String?,
poultryMobile: json['poultry_mobile'] as String?,
province: json['province'] as String?,
city: json['city'] as String?,
barClearanceCode: json['bar_clearance_code'] as String?,
barImage: json['bar_image'] as String?,
killerKey: json['killer_key'] as String?,
date: json['date'] as String?,
buyType: json['buy_type'] as String?,
productKey: json['product_key'] as String?,
car: json['car'] as String?,
numberOfCarcasses: json['number_of_carcasses'] as String?,
weightOfCarcasses: json['weight_of_carcasses'] as String?,
);
Map<String, dynamic> _$SubmitKillHouseFreeBarToJson(
_SubmitKillHouseFreeBar instance,
) => <String, dynamic>{
'driver_name': instance.driverName,
'driver_mobile': instance.driverMobile,
'poultry_name': instance.poultryName,
'poultry_mobile': instance.poultryMobile,
'province': instance.province,
'city': instance.city,
'bar_clearance_code': instance.barClearanceCode,
'bar_image': instance.barImage,
'killer_key': instance.killerKey,
'date': instance.date,
'buy_type': instance.buyType,
'product_key': instance.productKey,
'car': instance.car,
'number_of_carcasses': instance.numberOfCarcasses,
'weight_of_carcasses': instance.weightOfCarcasses,
};

View File

@@ -0,0 +1,29 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'auth_response_model.freezed.dart';
part 'auth_response_model.g.dart';
@freezed
abstract class AuthResponseModel with _$AuthResponseModel {
const factory AuthResponseModel({
String? accessToken,
String? expiresIn,
String? scope,
String? expireTime,
String? mobile,
String? fullname,
String? firstname,
String? lastname,
String? city,
String? province,
String? nationalCode,
String? nationalId,
String? birthday,
String? image,
int? baseOrder,
List<String>? role,
}) = _AuthResponseModel;
factory AuthResponseModel.fromJson(Map<String, dynamic> json) =>
_$AuthResponseModelFromJson(json);
}

View File

@@ -0,0 +1,330 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'auth_response_model.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$AuthResponseModel {
String? get accessToken; String? get expiresIn; String? get scope; String? get expireTime; String? get mobile; String? get fullname; String? get firstname; String? get lastname; String? get city; String? get province; String? get nationalCode; String? get nationalId; String? get birthday; String? get image; int? get baseOrder; List<String>? get role;
/// Create a copy of AuthResponseModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$AuthResponseModelCopyWith<AuthResponseModel> get copyWith => _$AuthResponseModelCopyWithImpl<AuthResponseModel>(this as AuthResponseModel, _$identity);
/// Serializes this AuthResponseModel to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is AuthResponseModel&&(identical(other.accessToken, accessToken) || other.accessToken == accessToken)&&(identical(other.expiresIn, expiresIn) || other.expiresIn == expiresIn)&&(identical(other.scope, scope) || other.scope == scope)&&(identical(other.expireTime, expireTime) || other.expireTime == expireTime)&&(identical(other.mobile, mobile) || other.mobile == mobile)&&(identical(other.fullname, fullname) || other.fullname == fullname)&&(identical(other.firstname, firstname) || other.firstname == firstname)&&(identical(other.lastname, lastname) || other.lastname == lastname)&&(identical(other.city, city) || other.city == city)&&(identical(other.province, province) || other.province == province)&&(identical(other.nationalCode, nationalCode) || other.nationalCode == nationalCode)&&(identical(other.nationalId, nationalId) || other.nationalId == nationalId)&&(identical(other.birthday, birthday) || other.birthday == birthday)&&(identical(other.image, image) || other.image == image)&&(identical(other.baseOrder, baseOrder) || other.baseOrder == baseOrder)&&const DeepCollectionEquality().equals(other.role, role));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,accessToken,expiresIn,scope,expireTime,mobile,fullname,firstname,lastname,city,province,nationalCode,nationalId,birthday,image,baseOrder,const DeepCollectionEquality().hash(role));
@override
String toString() {
return 'AuthResponseModel(accessToken: $accessToken, expiresIn: $expiresIn, scope: $scope, expireTime: $expireTime, mobile: $mobile, fullname: $fullname, firstname: $firstname, lastname: $lastname, city: $city, province: $province, nationalCode: $nationalCode, nationalId: $nationalId, birthday: $birthday, image: $image, baseOrder: $baseOrder, role: $role)';
}
}
/// @nodoc
abstract mixin class $AuthResponseModelCopyWith<$Res> {
factory $AuthResponseModelCopyWith(AuthResponseModel value, $Res Function(AuthResponseModel) _then) = _$AuthResponseModelCopyWithImpl;
@useResult
$Res call({
String? accessToken, String? expiresIn, String? scope, String? expireTime, String? mobile, String? fullname, String? firstname, String? lastname, String? city, String? province, String? nationalCode, String? nationalId, String? birthday, String? image, int? baseOrder, List<String>? role
});
}
/// @nodoc
class _$AuthResponseModelCopyWithImpl<$Res>
implements $AuthResponseModelCopyWith<$Res> {
_$AuthResponseModelCopyWithImpl(this._self, this._then);
final AuthResponseModel _self;
final $Res Function(AuthResponseModel) _then;
/// Create a copy of AuthResponseModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? accessToken = freezed,Object? expiresIn = freezed,Object? scope = freezed,Object? expireTime = freezed,Object? mobile = freezed,Object? fullname = freezed,Object? firstname = freezed,Object? lastname = freezed,Object? city = freezed,Object? province = freezed,Object? nationalCode = freezed,Object? nationalId = freezed,Object? birthday = freezed,Object? image = freezed,Object? baseOrder = freezed,Object? role = freezed,}) {
return _then(_self.copyWith(
accessToken: freezed == accessToken ? _self.accessToken : accessToken // ignore: cast_nullable_to_non_nullable
as String?,expiresIn: freezed == expiresIn ? _self.expiresIn : expiresIn // ignore: cast_nullable_to_non_nullable
as String?,scope: freezed == scope ? _self.scope : scope // ignore: cast_nullable_to_non_nullable
as String?,expireTime: freezed == expireTime ? _self.expireTime : expireTime // ignore: cast_nullable_to_non_nullable
as String?,mobile: freezed == mobile ? _self.mobile : mobile // ignore: cast_nullable_to_non_nullable
as String?,fullname: freezed == fullname ? _self.fullname : fullname // ignore: cast_nullable_to_non_nullable
as String?,firstname: freezed == firstname ? _self.firstname : firstname // ignore: cast_nullable_to_non_nullable
as String?,lastname: freezed == lastname ? _self.lastname : lastname // ignore: cast_nullable_to_non_nullable
as String?,city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable
as String?,province: freezed == province ? _self.province : province // ignore: cast_nullable_to_non_nullable
as String?,nationalCode: freezed == nationalCode ? _self.nationalCode : nationalCode // ignore: cast_nullable_to_non_nullable
as String?,nationalId: freezed == nationalId ? _self.nationalId : nationalId // ignore: cast_nullable_to_non_nullable
as String?,birthday: freezed == birthday ? _self.birthday : birthday // ignore: cast_nullable_to_non_nullable
as String?,image: freezed == image ? _self.image : image // ignore: cast_nullable_to_non_nullable
as String?,baseOrder: freezed == baseOrder ? _self.baseOrder : baseOrder // ignore: cast_nullable_to_non_nullable
as int?,role: freezed == role ? _self.role : role // ignore: cast_nullable_to_non_nullable
as List<String>?,
));
}
}
/// Adds pattern-matching-related methods to [AuthResponseModel].
extension AuthResponseModelPatterns on AuthResponseModel {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _AuthResponseModel value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _AuthResponseModel() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _AuthResponseModel value) $default,){
final _that = this;
switch (_that) {
case _AuthResponseModel():
return $default(_that);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _AuthResponseModel value)? $default,){
final _that = this;
switch (_that) {
case _AuthResponseModel() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? accessToken, String? expiresIn, String? scope, String? expireTime, String? mobile, String? fullname, String? firstname, String? lastname, String? city, String? province, String? nationalCode, String? nationalId, String? birthday, String? image, int? baseOrder, List<String>? role)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _AuthResponseModel() when $default != null:
return $default(_that.accessToken,_that.expiresIn,_that.scope,_that.expireTime,_that.mobile,_that.fullname,_that.firstname,_that.lastname,_that.city,_that.province,_that.nationalCode,_that.nationalId,_that.birthday,_that.image,_that.baseOrder,_that.role);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? accessToken, String? expiresIn, String? scope, String? expireTime, String? mobile, String? fullname, String? firstname, String? lastname, String? city, String? province, String? nationalCode, String? nationalId, String? birthday, String? image, int? baseOrder, List<String>? role) $default,) {final _that = this;
switch (_that) {
case _AuthResponseModel():
return $default(_that.accessToken,_that.expiresIn,_that.scope,_that.expireTime,_that.mobile,_that.fullname,_that.firstname,_that.lastname,_that.city,_that.province,_that.nationalCode,_that.nationalId,_that.birthday,_that.image,_that.baseOrder,_that.role);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? accessToken, String? expiresIn, String? scope, String? expireTime, String? mobile, String? fullname, String? firstname, String? lastname, String? city, String? province, String? nationalCode, String? nationalId, String? birthday, String? image, int? baseOrder, List<String>? role)? $default,) {final _that = this;
switch (_that) {
case _AuthResponseModel() when $default != null:
return $default(_that.accessToken,_that.expiresIn,_that.scope,_that.expireTime,_that.mobile,_that.fullname,_that.firstname,_that.lastname,_that.city,_that.province,_that.nationalCode,_that.nationalId,_that.birthday,_that.image,_that.baseOrder,_that.role);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _AuthResponseModel implements AuthResponseModel {
const _AuthResponseModel({this.accessToken, this.expiresIn, this.scope, this.expireTime, this.mobile, this.fullname, this.firstname, this.lastname, this.city, this.province, this.nationalCode, this.nationalId, this.birthday, this.image, this.baseOrder, final List<String>? role}): _role = role;
factory _AuthResponseModel.fromJson(Map<String, dynamic> json) => _$AuthResponseModelFromJson(json);
@override final String? accessToken;
@override final String? expiresIn;
@override final String? scope;
@override final String? expireTime;
@override final String? mobile;
@override final String? fullname;
@override final String? firstname;
@override final String? lastname;
@override final String? city;
@override final String? province;
@override final String? nationalCode;
@override final String? nationalId;
@override final String? birthday;
@override final String? image;
@override final int? baseOrder;
final List<String>? _role;
@override List<String>? get role {
final value = _role;
if (value == null) return null;
if (_role is EqualUnmodifiableListView) return _role;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
/// Create a copy of AuthResponseModel
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$AuthResponseModelCopyWith<_AuthResponseModel> get copyWith => __$AuthResponseModelCopyWithImpl<_AuthResponseModel>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$AuthResponseModelToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _AuthResponseModel&&(identical(other.accessToken, accessToken) || other.accessToken == accessToken)&&(identical(other.expiresIn, expiresIn) || other.expiresIn == expiresIn)&&(identical(other.scope, scope) || other.scope == scope)&&(identical(other.expireTime, expireTime) || other.expireTime == expireTime)&&(identical(other.mobile, mobile) || other.mobile == mobile)&&(identical(other.fullname, fullname) || other.fullname == fullname)&&(identical(other.firstname, firstname) || other.firstname == firstname)&&(identical(other.lastname, lastname) || other.lastname == lastname)&&(identical(other.city, city) || other.city == city)&&(identical(other.province, province) || other.province == province)&&(identical(other.nationalCode, nationalCode) || other.nationalCode == nationalCode)&&(identical(other.nationalId, nationalId) || other.nationalId == nationalId)&&(identical(other.birthday, birthday) || other.birthday == birthday)&&(identical(other.image, image) || other.image == image)&&(identical(other.baseOrder, baseOrder) || other.baseOrder == baseOrder)&&const DeepCollectionEquality().equals(other._role, _role));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,accessToken,expiresIn,scope,expireTime,mobile,fullname,firstname,lastname,city,province,nationalCode,nationalId,birthday,image,baseOrder,const DeepCollectionEquality().hash(_role));
@override
String toString() {
return 'AuthResponseModel(accessToken: $accessToken, expiresIn: $expiresIn, scope: $scope, expireTime: $expireTime, mobile: $mobile, fullname: $fullname, firstname: $firstname, lastname: $lastname, city: $city, province: $province, nationalCode: $nationalCode, nationalId: $nationalId, birthday: $birthday, image: $image, baseOrder: $baseOrder, role: $role)';
}
}
/// @nodoc
abstract mixin class _$AuthResponseModelCopyWith<$Res> implements $AuthResponseModelCopyWith<$Res> {
factory _$AuthResponseModelCopyWith(_AuthResponseModel value, $Res Function(_AuthResponseModel) _then) = __$AuthResponseModelCopyWithImpl;
@override @useResult
$Res call({
String? accessToken, String? expiresIn, String? scope, String? expireTime, String? mobile, String? fullname, String? firstname, String? lastname, String? city, String? province, String? nationalCode, String? nationalId, String? birthday, String? image, int? baseOrder, List<String>? role
});
}
/// @nodoc
class __$AuthResponseModelCopyWithImpl<$Res>
implements _$AuthResponseModelCopyWith<$Res> {
__$AuthResponseModelCopyWithImpl(this._self, this._then);
final _AuthResponseModel _self;
final $Res Function(_AuthResponseModel) _then;
/// Create a copy of AuthResponseModel
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? accessToken = freezed,Object? expiresIn = freezed,Object? scope = freezed,Object? expireTime = freezed,Object? mobile = freezed,Object? fullname = freezed,Object? firstname = freezed,Object? lastname = freezed,Object? city = freezed,Object? province = freezed,Object? nationalCode = freezed,Object? nationalId = freezed,Object? birthday = freezed,Object? image = freezed,Object? baseOrder = freezed,Object? role = freezed,}) {
return _then(_AuthResponseModel(
accessToken: freezed == accessToken ? _self.accessToken : accessToken // ignore: cast_nullable_to_non_nullable
as String?,expiresIn: freezed == expiresIn ? _self.expiresIn : expiresIn // ignore: cast_nullable_to_non_nullable
as String?,scope: freezed == scope ? _self.scope : scope // ignore: cast_nullable_to_non_nullable
as String?,expireTime: freezed == expireTime ? _self.expireTime : expireTime // ignore: cast_nullable_to_non_nullable
as String?,mobile: freezed == mobile ? _self.mobile : mobile // ignore: cast_nullable_to_non_nullable
as String?,fullname: freezed == fullname ? _self.fullname : fullname // ignore: cast_nullable_to_non_nullable
as String?,firstname: freezed == firstname ? _self.firstname : firstname // ignore: cast_nullable_to_non_nullable
as String?,lastname: freezed == lastname ? _self.lastname : lastname // ignore: cast_nullable_to_non_nullable
as String?,city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable
as String?,province: freezed == province ? _self.province : province // ignore: cast_nullable_to_non_nullable
as String?,nationalCode: freezed == nationalCode ? _self.nationalCode : nationalCode // ignore: cast_nullable_to_non_nullable
as String?,nationalId: freezed == nationalId ? _self.nationalId : nationalId // ignore: cast_nullable_to_non_nullable
as String?,birthday: freezed == birthday ? _self.birthday : birthday // ignore: cast_nullable_to_non_nullable
as String?,image: freezed == image ? _self.image : image // ignore: cast_nullable_to_non_nullable
as String?,baseOrder: freezed == baseOrder ? _self.baseOrder : baseOrder // ignore: cast_nullable_to_non_nullable
as int?,role: freezed == role ? _self._role : role // ignore: cast_nullable_to_non_nullable
as List<String>?,
));
}
}
// dart format on

View File

@@ -0,0 +1,47 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'auth_response_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_AuthResponseModel _$AuthResponseModelFromJson(Map<String, dynamic> json) =>
_AuthResponseModel(
accessToken: json['access_token'] as String?,
expiresIn: json['expires_in'] as String?,
scope: json['scope'] as String?,
expireTime: json['expire_time'] as String?,
mobile: json['mobile'] as String?,
fullname: json['fullname'] as String?,
firstname: json['firstname'] as String?,
lastname: json['lastname'] as String?,
city: json['city'] as String?,
province: json['province'] as String?,
nationalCode: json['national_code'] as String?,
nationalId: json['national_id'] as String?,
birthday: json['birthday'] as String?,
image: json['image'] as String?,
baseOrder: (json['base_order'] as num?)?.toInt(),
role: (json['role'] as List<dynamic>?)?.map((e) => e as String).toList(),
);
Map<String, dynamic> _$AuthResponseModelToJson(_AuthResponseModel instance) =>
<String, dynamic>{
'access_token': instance.accessToken,
'expires_in': instance.expiresIn,
'scope': instance.scope,
'expire_time': instance.expireTime,
'mobile': instance.mobile,
'fullname': instance.fullname,
'firstname': instance.firstname,
'lastname': instance.lastname,
'city': instance.city,
'province': instance.province,
'national_code': instance.nationalCode,
'national_id': instance.nationalId,
'birthday': instance.birthday,
'image': instance.image,
'base_order': instance.baseOrder,
'role': instance.role,
};

View File

@@ -0,0 +1,25 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'bar_information.freezed.dart';
part 'bar_information.g.dart';
@freezed
abstract class BarInformation with _$BarInformation {
const factory BarInformation({
int? totalBars,
int? totalBarsQuantity,
double? totalBarsWeight,
int? totalEnteredBars,
int? totalEnteredBarsQuantity,
double? totalEnteredBarsWeight,
int? totalNotEnteredBars,
int? totalNotEnteredBarsQuantity,
double? totalNotEnteredKillHouseRequestsWeight,
int? totalRejectedBars,
int? totalRejectedBarsQuantity,
double? totalRejectedBarsWeight,
}) = _BarInformation;
factory BarInformation.fromJson(Map<String, dynamic> json) =>
_$BarInformationFromJson(json);
}

View File

@@ -0,0 +1,310 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'bar_information.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$BarInformation {
int? get totalBars; int? get totalBarsQuantity; double? get totalBarsWeight; int? get totalEnteredBars; int? get totalEnteredBarsQuantity; double? get totalEnteredBarsWeight; int? get totalNotEnteredBars; int? get totalNotEnteredBarsQuantity; double? get totalNotEnteredKillHouseRequestsWeight; int? get totalRejectedBars; int? get totalRejectedBarsQuantity; double? get totalRejectedBarsWeight;
/// Create a copy of BarInformation
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$BarInformationCopyWith<BarInformation> get copyWith => _$BarInformationCopyWithImpl<BarInformation>(this as BarInformation, _$identity);
/// Serializes this BarInformation to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is BarInformation&&(identical(other.totalBars, totalBars) || other.totalBars == totalBars)&&(identical(other.totalBarsQuantity, totalBarsQuantity) || other.totalBarsQuantity == totalBarsQuantity)&&(identical(other.totalBarsWeight, totalBarsWeight) || other.totalBarsWeight == totalBarsWeight)&&(identical(other.totalEnteredBars, totalEnteredBars) || other.totalEnteredBars == totalEnteredBars)&&(identical(other.totalEnteredBarsQuantity, totalEnteredBarsQuantity) || other.totalEnteredBarsQuantity == totalEnteredBarsQuantity)&&(identical(other.totalEnteredBarsWeight, totalEnteredBarsWeight) || other.totalEnteredBarsWeight == totalEnteredBarsWeight)&&(identical(other.totalNotEnteredBars, totalNotEnteredBars) || other.totalNotEnteredBars == totalNotEnteredBars)&&(identical(other.totalNotEnteredBarsQuantity, totalNotEnteredBarsQuantity) || other.totalNotEnteredBarsQuantity == totalNotEnteredBarsQuantity)&&(identical(other.totalNotEnteredKillHouseRequestsWeight, totalNotEnteredKillHouseRequestsWeight) || other.totalNotEnteredKillHouseRequestsWeight == totalNotEnteredKillHouseRequestsWeight)&&(identical(other.totalRejectedBars, totalRejectedBars) || other.totalRejectedBars == totalRejectedBars)&&(identical(other.totalRejectedBarsQuantity, totalRejectedBarsQuantity) || other.totalRejectedBarsQuantity == totalRejectedBarsQuantity)&&(identical(other.totalRejectedBarsWeight, totalRejectedBarsWeight) || other.totalRejectedBarsWeight == totalRejectedBarsWeight));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,totalBars,totalBarsQuantity,totalBarsWeight,totalEnteredBars,totalEnteredBarsQuantity,totalEnteredBarsWeight,totalNotEnteredBars,totalNotEnteredBarsQuantity,totalNotEnteredKillHouseRequestsWeight,totalRejectedBars,totalRejectedBarsQuantity,totalRejectedBarsWeight);
@override
String toString() {
return 'BarInformation(totalBars: $totalBars, totalBarsQuantity: $totalBarsQuantity, totalBarsWeight: $totalBarsWeight, totalEnteredBars: $totalEnteredBars, totalEnteredBarsQuantity: $totalEnteredBarsQuantity, totalEnteredBarsWeight: $totalEnteredBarsWeight, totalNotEnteredBars: $totalNotEnteredBars, totalNotEnteredBarsQuantity: $totalNotEnteredBarsQuantity, totalNotEnteredKillHouseRequestsWeight: $totalNotEnteredKillHouseRequestsWeight, totalRejectedBars: $totalRejectedBars, totalRejectedBarsQuantity: $totalRejectedBarsQuantity, totalRejectedBarsWeight: $totalRejectedBarsWeight)';
}
}
/// @nodoc
abstract mixin class $BarInformationCopyWith<$Res> {
factory $BarInformationCopyWith(BarInformation value, $Res Function(BarInformation) _then) = _$BarInformationCopyWithImpl;
@useResult
$Res call({
int? totalBars, int? totalBarsQuantity, double? totalBarsWeight, int? totalEnteredBars, int? totalEnteredBarsQuantity, double? totalEnteredBarsWeight, int? totalNotEnteredBars, int? totalNotEnteredBarsQuantity, double? totalNotEnteredKillHouseRequestsWeight, int? totalRejectedBars, int? totalRejectedBarsQuantity, double? totalRejectedBarsWeight
});
}
/// @nodoc
class _$BarInformationCopyWithImpl<$Res>
implements $BarInformationCopyWith<$Res> {
_$BarInformationCopyWithImpl(this._self, this._then);
final BarInformation _self;
final $Res Function(BarInformation) _then;
/// Create a copy of BarInformation
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? totalBars = freezed,Object? totalBarsQuantity = freezed,Object? totalBarsWeight = freezed,Object? totalEnteredBars = freezed,Object? totalEnteredBarsQuantity = freezed,Object? totalEnteredBarsWeight = freezed,Object? totalNotEnteredBars = freezed,Object? totalNotEnteredBarsQuantity = freezed,Object? totalNotEnteredKillHouseRequestsWeight = freezed,Object? totalRejectedBars = freezed,Object? totalRejectedBarsQuantity = freezed,Object? totalRejectedBarsWeight = freezed,}) {
return _then(_self.copyWith(
totalBars: freezed == totalBars ? _self.totalBars : totalBars // ignore: cast_nullable_to_non_nullable
as int?,totalBarsQuantity: freezed == totalBarsQuantity ? _self.totalBarsQuantity : totalBarsQuantity // ignore: cast_nullable_to_non_nullable
as int?,totalBarsWeight: freezed == totalBarsWeight ? _self.totalBarsWeight : totalBarsWeight // ignore: cast_nullable_to_non_nullable
as double?,totalEnteredBars: freezed == totalEnteredBars ? _self.totalEnteredBars : totalEnteredBars // ignore: cast_nullable_to_non_nullable
as int?,totalEnteredBarsQuantity: freezed == totalEnteredBarsQuantity ? _self.totalEnteredBarsQuantity : totalEnteredBarsQuantity // ignore: cast_nullable_to_non_nullable
as int?,totalEnteredBarsWeight: freezed == totalEnteredBarsWeight ? _self.totalEnteredBarsWeight : totalEnteredBarsWeight // ignore: cast_nullable_to_non_nullable
as double?,totalNotEnteredBars: freezed == totalNotEnteredBars ? _self.totalNotEnteredBars : totalNotEnteredBars // ignore: cast_nullable_to_non_nullable
as int?,totalNotEnteredBarsQuantity: freezed == totalNotEnteredBarsQuantity ? _self.totalNotEnteredBarsQuantity : totalNotEnteredBarsQuantity // ignore: cast_nullable_to_non_nullable
as int?,totalNotEnteredKillHouseRequestsWeight: freezed == totalNotEnteredKillHouseRequestsWeight ? _self.totalNotEnteredKillHouseRequestsWeight : totalNotEnteredKillHouseRequestsWeight // ignore: cast_nullable_to_non_nullable
as double?,totalRejectedBars: freezed == totalRejectedBars ? _self.totalRejectedBars : totalRejectedBars // ignore: cast_nullable_to_non_nullable
as int?,totalRejectedBarsQuantity: freezed == totalRejectedBarsQuantity ? _self.totalRejectedBarsQuantity : totalRejectedBarsQuantity // ignore: cast_nullable_to_non_nullable
as int?,totalRejectedBarsWeight: freezed == totalRejectedBarsWeight ? _self.totalRejectedBarsWeight : totalRejectedBarsWeight // ignore: cast_nullable_to_non_nullable
as double?,
));
}
}
/// Adds pattern-matching-related methods to [BarInformation].
extension BarInformationPatterns on BarInformation {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _BarInformation value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _BarInformation() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _BarInformation value) $default,){
final _that = this;
switch (_that) {
case _BarInformation():
return $default(_that);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _BarInformation value)? $default,){
final _that = this;
switch (_that) {
case _BarInformation() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( int? totalBars, int? totalBarsQuantity, double? totalBarsWeight, int? totalEnteredBars, int? totalEnteredBarsQuantity, double? totalEnteredBarsWeight, int? totalNotEnteredBars, int? totalNotEnteredBarsQuantity, double? totalNotEnteredKillHouseRequestsWeight, int? totalRejectedBars, int? totalRejectedBarsQuantity, double? totalRejectedBarsWeight)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _BarInformation() when $default != null:
return $default(_that.totalBars,_that.totalBarsQuantity,_that.totalBarsWeight,_that.totalEnteredBars,_that.totalEnteredBarsQuantity,_that.totalEnteredBarsWeight,_that.totalNotEnteredBars,_that.totalNotEnteredBarsQuantity,_that.totalNotEnteredKillHouseRequestsWeight,_that.totalRejectedBars,_that.totalRejectedBarsQuantity,_that.totalRejectedBarsWeight);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( int? totalBars, int? totalBarsQuantity, double? totalBarsWeight, int? totalEnteredBars, int? totalEnteredBarsQuantity, double? totalEnteredBarsWeight, int? totalNotEnteredBars, int? totalNotEnteredBarsQuantity, double? totalNotEnteredKillHouseRequestsWeight, int? totalRejectedBars, int? totalRejectedBarsQuantity, double? totalRejectedBarsWeight) $default,) {final _that = this;
switch (_that) {
case _BarInformation():
return $default(_that.totalBars,_that.totalBarsQuantity,_that.totalBarsWeight,_that.totalEnteredBars,_that.totalEnteredBarsQuantity,_that.totalEnteredBarsWeight,_that.totalNotEnteredBars,_that.totalNotEnteredBarsQuantity,_that.totalNotEnteredKillHouseRequestsWeight,_that.totalRejectedBars,_that.totalRejectedBarsQuantity,_that.totalRejectedBarsWeight);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( int? totalBars, int? totalBarsQuantity, double? totalBarsWeight, int? totalEnteredBars, int? totalEnteredBarsQuantity, double? totalEnteredBarsWeight, int? totalNotEnteredBars, int? totalNotEnteredBarsQuantity, double? totalNotEnteredKillHouseRequestsWeight, int? totalRejectedBars, int? totalRejectedBarsQuantity, double? totalRejectedBarsWeight)? $default,) {final _that = this;
switch (_that) {
case _BarInformation() when $default != null:
return $default(_that.totalBars,_that.totalBarsQuantity,_that.totalBarsWeight,_that.totalEnteredBars,_that.totalEnteredBarsQuantity,_that.totalEnteredBarsWeight,_that.totalNotEnteredBars,_that.totalNotEnteredBarsQuantity,_that.totalNotEnteredKillHouseRequestsWeight,_that.totalRejectedBars,_that.totalRejectedBarsQuantity,_that.totalRejectedBarsWeight);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _BarInformation implements BarInformation {
const _BarInformation({this.totalBars, this.totalBarsQuantity, this.totalBarsWeight, this.totalEnteredBars, this.totalEnteredBarsQuantity, this.totalEnteredBarsWeight, this.totalNotEnteredBars, this.totalNotEnteredBarsQuantity, this.totalNotEnteredKillHouseRequestsWeight, this.totalRejectedBars, this.totalRejectedBarsQuantity, this.totalRejectedBarsWeight});
factory _BarInformation.fromJson(Map<String, dynamic> json) => _$BarInformationFromJson(json);
@override final int? totalBars;
@override final int? totalBarsQuantity;
@override final double? totalBarsWeight;
@override final int? totalEnteredBars;
@override final int? totalEnteredBarsQuantity;
@override final double? totalEnteredBarsWeight;
@override final int? totalNotEnteredBars;
@override final int? totalNotEnteredBarsQuantity;
@override final double? totalNotEnteredKillHouseRequestsWeight;
@override final int? totalRejectedBars;
@override final int? totalRejectedBarsQuantity;
@override final double? totalRejectedBarsWeight;
/// Create a copy of BarInformation
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$BarInformationCopyWith<_BarInformation> get copyWith => __$BarInformationCopyWithImpl<_BarInformation>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$BarInformationToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _BarInformation&&(identical(other.totalBars, totalBars) || other.totalBars == totalBars)&&(identical(other.totalBarsQuantity, totalBarsQuantity) || other.totalBarsQuantity == totalBarsQuantity)&&(identical(other.totalBarsWeight, totalBarsWeight) || other.totalBarsWeight == totalBarsWeight)&&(identical(other.totalEnteredBars, totalEnteredBars) || other.totalEnteredBars == totalEnteredBars)&&(identical(other.totalEnteredBarsQuantity, totalEnteredBarsQuantity) || other.totalEnteredBarsQuantity == totalEnteredBarsQuantity)&&(identical(other.totalEnteredBarsWeight, totalEnteredBarsWeight) || other.totalEnteredBarsWeight == totalEnteredBarsWeight)&&(identical(other.totalNotEnteredBars, totalNotEnteredBars) || other.totalNotEnteredBars == totalNotEnteredBars)&&(identical(other.totalNotEnteredBarsQuantity, totalNotEnteredBarsQuantity) || other.totalNotEnteredBarsQuantity == totalNotEnteredBarsQuantity)&&(identical(other.totalNotEnteredKillHouseRequestsWeight, totalNotEnteredKillHouseRequestsWeight) || other.totalNotEnteredKillHouseRequestsWeight == totalNotEnteredKillHouseRequestsWeight)&&(identical(other.totalRejectedBars, totalRejectedBars) || other.totalRejectedBars == totalRejectedBars)&&(identical(other.totalRejectedBarsQuantity, totalRejectedBarsQuantity) || other.totalRejectedBarsQuantity == totalRejectedBarsQuantity)&&(identical(other.totalRejectedBarsWeight, totalRejectedBarsWeight) || other.totalRejectedBarsWeight == totalRejectedBarsWeight));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,totalBars,totalBarsQuantity,totalBarsWeight,totalEnteredBars,totalEnteredBarsQuantity,totalEnteredBarsWeight,totalNotEnteredBars,totalNotEnteredBarsQuantity,totalNotEnteredKillHouseRequestsWeight,totalRejectedBars,totalRejectedBarsQuantity,totalRejectedBarsWeight);
@override
String toString() {
return 'BarInformation(totalBars: $totalBars, totalBarsQuantity: $totalBarsQuantity, totalBarsWeight: $totalBarsWeight, totalEnteredBars: $totalEnteredBars, totalEnteredBarsQuantity: $totalEnteredBarsQuantity, totalEnteredBarsWeight: $totalEnteredBarsWeight, totalNotEnteredBars: $totalNotEnteredBars, totalNotEnteredBarsQuantity: $totalNotEnteredBarsQuantity, totalNotEnteredKillHouseRequestsWeight: $totalNotEnteredKillHouseRequestsWeight, totalRejectedBars: $totalRejectedBars, totalRejectedBarsQuantity: $totalRejectedBarsQuantity, totalRejectedBarsWeight: $totalRejectedBarsWeight)';
}
}
/// @nodoc
abstract mixin class _$BarInformationCopyWith<$Res> implements $BarInformationCopyWith<$Res> {
factory _$BarInformationCopyWith(_BarInformation value, $Res Function(_BarInformation) _then) = __$BarInformationCopyWithImpl;
@override @useResult
$Res call({
int? totalBars, int? totalBarsQuantity, double? totalBarsWeight, int? totalEnteredBars, int? totalEnteredBarsQuantity, double? totalEnteredBarsWeight, int? totalNotEnteredBars, int? totalNotEnteredBarsQuantity, double? totalNotEnteredKillHouseRequestsWeight, int? totalRejectedBars, int? totalRejectedBarsQuantity, double? totalRejectedBarsWeight
});
}
/// @nodoc
class __$BarInformationCopyWithImpl<$Res>
implements _$BarInformationCopyWith<$Res> {
__$BarInformationCopyWithImpl(this._self, this._then);
final _BarInformation _self;
final $Res Function(_BarInformation) _then;
/// Create a copy of BarInformation
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? totalBars = freezed,Object? totalBarsQuantity = freezed,Object? totalBarsWeight = freezed,Object? totalEnteredBars = freezed,Object? totalEnteredBarsQuantity = freezed,Object? totalEnteredBarsWeight = freezed,Object? totalNotEnteredBars = freezed,Object? totalNotEnteredBarsQuantity = freezed,Object? totalNotEnteredKillHouseRequestsWeight = freezed,Object? totalRejectedBars = freezed,Object? totalRejectedBarsQuantity = freezed,Object? totalRejectedBarsWeight = freezed,}) {
return _then(_BarInformation(
totalBars: freezed == totalBars ? _self.totalBars : totalBars // ignore: cast_nullable_to_non_nullable
as int?,totalBarsQuantity: freezed == totalBarsQuantity ? _self.totalBarsQuantity : totalBarsQuantity // ignore: cast_nullable_to_non_nullable
as int?,totalBarsWeight: freezed == totalBarsWeight ? _self.totalBarsWeight : totalBarsWeight // ignore: cast_nullable_to_non_nullable
as double?,totalEnteredBars: freezed == totalEnteredBars ? _self.totalEnteredBars : totalEnteredBars // ignore: cast_nullable_to_non_nullable
as int?,totalEnteredBarsQuantity: freezed == totalEnteredBarsQuantity ? _self.totalEnteredBarsQuantity : totalEnteredBarsQuantity // ignore: cast_nullable_to_non_nullable
as int?,totalEnteredBarsWeight: freezed == totalEnteredBarsWeight ? _self.totalEnteredBarsWeight : totalEnteredBarsWeight // ignore: cast_nullable_to_non_nullable
as double?,totalNotEnteredBars: freezed == totalNotEnteredBars ? _self.totalNotEnteredBars : totalNotEnteredBars // ignore: cast_nullable_to_non_nullable
as int?,totalNotEnteredBarsQuantity: freezed == totalNotEnteredBarsQuantity ? _self.totalNotEnteredBarsQuantity : totalNotEnteredBarsQuantity // ignore: cast_nullable_to_non_nullable
as int?,totalNotEnteredKillHouseRequestsWeight: freezed == totalNotEnteredKillHouseRequestsWeight ? _self.totalNotEnteredKillHouseRequestsWeight : totalNotEnteredKillHouseRequestsWeight // ignore: cast_nullable_to_non_nullable
as double?,totalRejectedBars: freezed == totalRejectedBars ? _self.totalRejectedBars : totalRejectedBars // ignore: cast_nullable_to_non_nullable
as int?,totalRejectedBarsQuantity: freezed == totalRejectedBarsQuantity ? _self.totalRejectedBarsQuantity : totalRejectedBarsQuantity // ignore: cast_nullable_to_non_nullable
as int?,totalRejectedBarsWeight: freezed == totalRejectedBarsWeight ? _self.totalRejectedBarsWeight : totalRejectedBarsWeight // ignore: cast_nullable_to_non_nullable
as double?,
));
}
}
// dart format on

View File

@@ -0,0 +1,47 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'bar_information.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_BarInformation _$BarInformationFromJson(Map<String, dynamic> json) =>
_BarInformation(
totalBars: (json['total_bars'] as num?)?.toInt(),
totalBarsQuantity: (json['total_bars_quantity'] as num?)?.toInt(),
totalBarsWeight: (json['total_bars_weight'] as num?)?.toDouble(),
totalEnteredBars: (json['total_entered_bars'] as num?)?.toInt(),
totalEnteredBarsQuantity: (json['total_entered_bars_quantity'] as num?)
?.toInt(),
totalEnteredBarsWeight: (json['total_entered_bars_weight'] as num?)
?.toDouble(),
totalNotEnteredBars: (json['total_not_entered_bars'] as num?)?.toInt(),
totalNotEnteredBarsQuantity:
(json['total_not_entered_bars_quantity'] as num?)?.toInt(),
totalNotEnteredKillHouseRequestsWeight:
(json['total_not_entered_kill_house_requests_weight'] as num?)
?.toDouble(),
totalRejectedBars: (json['total_rejected_bars'] as num?)?.toInt(),
totalRejectedBarsQuantity: (json['total_rejected_bars_quantity'] as num?)
?.toInt(),
totalRejectedBarsWeight: (json['total_rejected_bars_weight'] as num?)
?.toDouble(),
);
Map<String, dynamic> _$BarInformationToJson(_BarInformation instance) =>
<String, dynamic>{
'total_bars': instance.totalBars,
'total_bars_quantity': instance.totalBarsQuantity,
'total_bars_weight': instance.totalBarsWeight,
'total_entered_bars': instance.totalEnteredBars,
'total_entered_bars_quantity': instance.totalEnteredBarsQuantity,
'total_entered_bars_weight': instance.totalEnteredBarsWeight,
'total_not_entered_bars': instance.totalNotEnteredBars,
'total_not_entered_bars_quantity': instance.totalNotEnteredBarsQuantity,
'total_not_entered_kill_house_requests_weight':
instance.totalNotEnteredKillHouseRequestsWeight,
'total_rejected_bars': instance.totalRejectedBars,
'total_rejected_bars_quantity': instance.totalRejectedBarsQuantity,
'total_rejected_bars_weight': instance.totalRejectedBarsWeight,
};

View File

@@ -0,0 +1,16 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'broadcast_price.freezed.dart';
part 'broadcast_price.g.dart';
@freezed
abstract class BroadcastPrice with _$BroadcastPrice {
const factory BroadcastPrice({
bool? active,
int? killHousePrice,
int? stewardPrice,
int? guildPrice,
}) = _BroadcastPrice;
factory BroadcastPrice.fromJson(Map<String, dynamic> json) => _$BroadcastPriceFromJson(json);
}

View File

@@ -0,0 +1,286 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'broadcast_price.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$BroadcastPrice {
bool? get active; int? get killHousePrice; int? get stewardPrice; int? get guildPrice;
/// Create a copy of BroadcastPrice
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$BroadcastPriceCopyWith<BroadcastPrice> get copyWith => _$BroadcastPriceCopyWithImpl<BroadcastPrice>(this as BroadcastPrice, _$identity);
/// Serializes this BroadcastPrice to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is BroadcastPrice&&(identical(other.active, active) || other.active == active)&&(identical(other.killHousePrice, killHousePrice) || other.killHousePrice == killHousePrice)&&(identical(other.stewardPrice, stewardPrice) || other.stewardPrice == stewardPrice)&&(identical(other.guildPrice, guildPrice) || other.guildPrice == guildPrice));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,active,killHousePrice,stewardPrice,guildPrice);
@override
String toString() {
return 'BroadcastPrice(active: $active, killHousePrice: $killHousePrice, stewardPrice: $stewardPrice, guildPrice: $guildPrice)';
}
}
/// @nodoc
abstract mixin class $BroadcastPriceCopyWith<$Res> {
factory $BroadcastPriceCopyWith(BroadcastPrice value, $Res Function(BroadcastPrice) _then) = _$BroadcastPriceCopyWithImpl;
@useResult
$Res call({
bool? active, int? killHousePrice, int? stewardPrice, int? guildPrice
});
}
/// @nodoc
class _$BroadcastPriceCopyWithImpl<$Res>
implements $BroadcastPriceCopyWith<$Res> {
_$BroadcastPriceCopyWithImpl(this._self, this._then);
final BroadcastPrice _self;
final $Res Function(BroadcastPrice) _then;
/// Create a copy of BroadcastPrice
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? active = freezed,Object? killHousePrice = freezed,Object? stewardPrice = freezed,Object? guildPrice = freezed,}) {
return _then(_self.copyWith(
active: freezed == active ? _self.active : active // ignore: cast_nullable_to_non_nullable
as bool?,killHousePrice: freezed == killHousePrice ? _self.killHousePrice : killHousePrice // ignore: cast_nullable_to_non_nullable
as int?,stewardPrice: freezed == stewardPrice ? _self.stewardPrice : stewardPrice // ignore: cast_nullable_to_non_nullable
as int?,guildPrice: freezed == guildPrice ? _self.guildPrice : guildPrice // ignore: cast_nullable_to_non_nullable
as int?,
));
}
}
/// Adds pattern-matching-related methods to [BroadcastPrice].
extension BroadcastPricePatterns on BroadcastPrice {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _BroadcastPrice value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _BroadcastPrice() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _BroadcastPrice value) $default,){
final _that = this;
switch (_that) {
case _BroadcastPrice():
return $default(_that);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _BroadcastPrice value)? $default,){
final _that = this;
switch (_that) {
case _BroadcastPrice() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool? active, int? killHousePrice, int? stewardPrice, int? guildPrice)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _BroadcastPrice() when $default != null:
return $default(_that.active,_that.killHousePrice,_that.stewardPrice,_that.guildPrice);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool? active, int? killHousePrice, int? stewardPrice, int? guildPrice) $default,) {final _that = this;
switch (_that) {
case _BroadcastPrice():
return $default(_that.active,_that.killHousePrice,_that.stewardPrice,_that.guildPrice);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool? active, int? killHousePrice, int? stewardPrice, int? guildPrice)? $default,) {final _that = this;
switch (_that) {
case _BroadcastPrice() when $default != null:
return $default(_that.active,_that.killHousePrice,_that.stewardPrice,_that.guildPrice);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _BroadcastPrice implements BroadcastPrice {
const _BroadcastPrice({this.active, this.killHousePrice, this.stewardPrice, this.guildPrice});
factory _BroadcastPrice.fromJson(Map<String, dynamic> json) => _$BroadcastPriceFromJson(json);
@override final bool? active;
@override final int? killHousePrice;
@override final int? stewardPrice;
@override final int? guildPrice;
/// Create a copy of BroadcastPrice
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$BroadcastPriceCopyWith<_BroadcastPrice> get copyWith => __$BroadcastPriceCopyWithImpl<_BroadcastPrice>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$BroadcastPriceToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _BroadcastPrice&&(identical(other.active, active) || other.active == active)&&(identical(other.killHousePrice, killHousePrice) || other.killHousePrice == killHousePrice)&&(identical(other.stewardPrice, stewardPrice) || other.stewardPrice == stewardPrice)&&(identical(other.guildPrice, guildPrice) || other.guildPrice == guildPrice));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,active,killHousePrice,stewardPrice,guildPrice);
@override
String toString() {
return 'BroadcastPrice(active: $active, killHousePrice: $killHousePrice, stewardPrice: $stewardPrice, guildPrice: $guildPrice)';
}
}
/// @nodoc
abstract mixin class _$BroadcastPriceCopyWith<$Res> implements $BroadcastPriceCopyWith<$Res> {
factory _$BroadcastPriceCopyWith(_BroadcastPrice value, $Res Function(_BroadcastPrice) _then) = __$BroadcastPriceCopyWithImpl;
@override @useResult
$Res call({
bool? active, int? killHousePrice, int? stewardPrice, int? guildPrice
});
}
/// @nodoc
class __$BroadcastPriceCopyWithImpl<$Res>
implements _$BroadcastPriceCopyWith<$Res> {
__$BroadcastPriceCopyWithImpl(this._self, this._then);
final _BroadcastPrice _self;
final $Res Function(_BroadcastPrice) _then;
/// Create a copy of BroadcastPrice
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? active = freezed,Object? killHousePrice = freezed,Object? stewardPrice = freezed,Object? guildPrice = freezed,}) {
return _then(_BroadcastPrice(
active: freezed == active ? _self.active : active // ignore: cast_nullable_to_non_nullable
as bool?,killHousePrice: freezed == killHousePrice ? _self.killHousePrice : killHousePrice // ignore: cast_nullable_to_non_nullable
as int?,stewardPrice: freezed == stewardPrice ? _self.stewardPrice : stewardPrice // ignore: cast_nullable_to_non_nullable
as int?,guildPrice: freezed == guildPrice ? _self.guildPrice : guildPrice // ignore: cast_nullable_to_non_nullable
as int?,
));
}
}
// dart format on

View File

@@ -0,0 +1,23 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'broadcast_price.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_BroadcastPrice _$BroadcastPriceFromJson(Map<String, dynamic> json) =>
_BroadcastPrice(
active: json['active'] as bool?,
killHousePrice: (json['kill_house_price'] as num?)?.toInt(),
stewardPrice: (json['steward_price'] as num?)?.toInt(),
guildPrice: (json['guild_price'] as num?)?.toInt(),
);
Map<String, dynamic> _$BroadcastPriceToJson(_BroadcastPrice instance) =>
<String, dynamic>{
'active': instance.active,
'kill_house_price': instance.killHousePrice,
'steward_price': instance.stewardPrice,
'guild_price': instance.guildPrice,
};

View File

@@ -0,0 +1,17 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'captcha_response_model.freezed.dart';
part 'captcha_response_model.g.dart';
@freezed
abstract class CaptchaResponseModel with _$CaptchaResponseModel {
const factory CaptchaResponseModel({
String? captchaKey,
String? captchaImage,
String? imageType,
String? imageDecode,
}) = _CaptchaResponseModel;
factory CaptchaResponseModel.fromJson(Map<String, dynamic> json) =>
_$CaptchaResponseModelFromJson(json);
}

View File

@@ -0,0 +1,286 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'captcha_response_model.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$CaptchaResponseModel {
String? get captchaKey; String? get captchaImage; String? get imageType; String? get imageDecode;
/// Create a copy of CaptchaResponseModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$CaptchaResponseModelCopyWith<CaptchaResponseModel> get copyWith => _$CaptchaResponseModelCopyWithImpl<CaptchaResponseModel>(this as CaptchaResponseModel, _$identity);
/// Serializes this CaptchaResponseModel to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is CaptchaResponseModel&&(identical(other.captchaKey, captchaKey) || other.captchaKey == captchaKey)&&(identical(other.captchaImage, captchaImage) || other.captchaImage == captchaImage)&&(identical(other.imageType, imageType) || other.imageType == imageType)&&(identical(other.imageDecode, imageDecode) || other.imageDecode == imageDecode));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,captchaKey,captchaImage,imageType,imageDecode);
@override
String toString() {
return 'CaptchaResponseModel(captchaKey: $captchaKey, captchaImage: $captchaImage, imageType: $imageType, imageDecode: $imageDecode)';
}
}
/// @nodoc
abstract mixin class $CaptchaResponseModelCopyWith<$Res> {
factory $CaptchaResponseModelCopyWith(CaptchaResponseModel value, $Res Function(CaptchaResponseModel) _then) = _$CaptchaResponseModelCopyWithImpl;
@useResult
$Res call({
String? captchaKey, String? captchaImage, String? imageType, String? imageDecode
});
}
/// @nodoc
class _$CaptchaResponseModelCopyWithImpl<$Res>
implements $CaptchaResponseModelCopyWith<$Res> {
_$CaptchaResponseModelCopyWithImpl(this._self, this._then);
final CaptchaResponseModel _self;
final $Res Function(CaptchaResponseModel) _then;
/// Create a copy of CaptchaResponseModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? captchaKey = freezed,Object? captchaImage = freezed,Object? imageType = freezed,Object? imageDecode = freezed,}) {
return _then(_self.copyWith(
captchaKey: freezed == captchaKey ? _self.captchaKey : captchaKey // ignore: cast_nullable_to_non_nullable
as String?,captchaImage: freezed == captchaImage ? _self.captchaImage : captchaImage // ignore: cast_nullable_to_non_nullable
as String?,imageType: freezed == imageType ? _self.imageType : imageType // ignore: cast_nullable_to_non_nullable
as String?,imageDecode: freezed == imageDecode ? _self.imageDecode : imageDecode // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// Adds pattern-matching-related methods to [CaptchaResponseModel].
extension CaptchaResponseModelPatterns on CaptchaResponseModel {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _CaptchaResponseModel value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _CaptchaResponseModel() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _CaptchaResponseModel value) $default,){
final _that = this;
switch (_that) {
case _CaptchaResponseModel():
return $default(_that);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _CaptchaResponseModel value)? $default,){
final _that = this;
switch (_that) {
case _CaptchaResponseModel() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? captchaKey, String? captchaImage, String? imageType, String? imageDecode)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _CaptchaResponseModel() when $default != null:
return $default(_that.captchaKey,_that.captchaImage,_that.imageType,_that.imageDecode);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? captchaKey, String? captchaImage, String? imageType, String? imageDecode) $default,) {final _that = this;
switch (_that) {
case _CaptchaResponseModel():
return $default(_that.captchaKey,_that.captchaImage,_that.imageType,_that.imageDecode);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? captchaKey, String? captchaImage, String? imageType, String? imageDecode)? $default,) {final _that = this;
switch (_that) {
case _CaptchaResponseModel() when $default != null:
return $default(_that.captchaKey,_that.captchaImage,_that.imageType,_that.imageDecode);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _CaptchaResponseModel implements CaptchaResponseModel {
const _CaptchaResponseModel({this.captchaKey, this.captchaImage, this.imageType, this.imageDecode});
factory _CaptchaResponseModel.fromJson(Map<String, dynamic> json) => _$CaptchaResponseModelFromJson(json);
@override final String? captchaKey;
@override final String? captchaImage;
@override final String? imageType;
@override final String? imageDecode;
/// Create a copy of CaptchaResponseModel
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$CaptchaResponseModelCopyWith<_CaptchaResponseModel> get copyWith => __$CaptchaResponseModelCopyWithImpl<_CaptchaResponseModel>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$CaptchaResponseModelToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _CaptchaResponseModel&&(identical(other.captchaKey, captchaKey) || other.captchaKey == captchaKey)&&(identical(other.captchaImage, captchaImage) || other.captchaImage == captchaImage)&&(identical(other.imageType, imageType) || other.imageType == imageType)&&(identical(other.imageDecode, imageDecode) || other.imageDecode == imageDecode));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,captchaKey,captchaImage,imageType,imageDecode);
@override
String toString() {
return 'CaptchaResponseModel(captchaKey: $captchaKey, captchaImage: $captchaImage, imageType: $imageType, imageDecode: $imageDecode)';
}
}
/// @nodoc
abstract mixin class _$CaptchaResponseModelCopyWith<$Res> implements $CaptchaResponseModelCopyWith<$Res> {
factory _$CaptchaResponseModelCopyWith(_CaptchaResponseModel value, $Res Function(_CaptchaResponseModel) _then) = __$CaptchaResponseModelCopyWithImpl;
@override @useResult
$Res call({
String? captchaKey, String? captchaImage, String? imageType, String? imageDecode
});
}
/// @nodoc
class __$CaptchaResponseModelCopyWithImpl<$Res>
implements _$CaptchaResponseModelCopyWith<$Res> {
__$CaptchaResponseModelCopyWithImpl(this._self, this._then);
final _CaptchaResponseModel _self;
final $Res Function(_CaptchaResponseModel) _then;
/// Create a copy of CaptchaResponseModel
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? captchaKey = freezed,Object? captchaImage = freezed,Object? imageType = freezed,Object? imageDecode = freezed,}) {
return _then(_CaptchaResponseModel(
captchaKey: freezed == captchaKey ? _self.captchaKey : captchaKey // ignore: cast_nullable_to_non_nullable
as String?,captchaImage: freezed == captchaImage ? _self.captchaImage : captchaImage // ignore: cast_nullable_to_non_nullable
as String?,imageType: freezed == imageType ? _self.imageType : imageType // ignore: cast_nullable_to_non_nullable
as String?,imageDecode: freezed == imageDecode ? _self.imageDecode : imageDecode // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
// dart format on

View File

@@ -0,0 +1,25 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'captcha_response_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_CaptchaResponseModel _$CaptchaResponseModelFromJson(
Map<String, dynamic> json,
) => _CaptchaResponseModel(
captchaKey: json['captcha_key'] as String?,
captchaImage: json['captcha_image'] as String?,
imageType: json['image_type'] as String?,
imageDecode: json['image_decode'] as String?,
);
Map<String, dynamic> _$CaptchaResponseModelToJson(
_CaptchaResponseModel instance,
) => <String, dynamic>{
'captcha_key': instance.captchaKey,
'captcha_image': instance.captchaImage,
'image_type': instance.imageType,
'image_decode': instance.imageDecode,
};

View File

@@ -0,0 +1,28 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'guild_model.freezed.dart';
part 'guild_model.g.dart';
@freezed
abstract class GuildModel with _$GuildModel {
const factory GuildModel({
String? key,
String? guildsName,
bool? steward,
User? user,
}) = _GuildModel;
factory GuildModel.fromJson(Map<String, dynamic> json) =>
_$GuildModelFromJson(json);
}
@freezed
abstract class User with _$User {
const factory User({
String? fullname,
String? mobile,
String? city,
}) = _User;
factory User.fromJson(Map<String, dynamic> json) => _$UserFromJson(json);
}

View File

@@ -0,0 +1,579 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'guild_model.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$GuildModel {
String? get key; String? get guildsName; bool? get steward; User? get user;
/// Create a copy of GuildModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$GuildModelCopyWith<GuildModel> get copyWith => _$GuildModelCopyWithImpl<GuildModel>(this as GuildModel, _$identity);
/// Serializes this GuildModel to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is GuildModel&&(identical(other.key, key) || other.key == key)&&(identical(other.guildsName, guildsName) || other.guildsName == guildsName)&&(identical(other.steward, steward) || other.steward == steward)&&(identical(other.user, user) || other.user == user));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,key,guildsName,steward,user);
@override
String toString() {
return 'GuildModel(key: $key, guildsName: $guildsName, steward: $steward, user: $user)';
}
}
/// @nodoc
abstract mixin class $GuildModelCopyWith<$Res> {
factory $GuildModelCopyWith(GuildModel value, $Res Function(GuildModel) _then) = _$GuildModelCopyWithImpl;
@useResult
$Res call({
String? key, String? guildsName, bool? steward, User? user
});
$UserCopyWith<$Res>? get user;
}
/// @nodoc
class _$GuildModelCopyWithImpl<$Res>
implements $GuildModelCopyWith<$Res> {
_$GuildModelCopyWithImpl(this._self, this._then);
final GuildModel _self;
final $Res Function(GuildModel) _then;
/// Create a copy of GuildModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? key = freezed,Object? guildsName = freezed,Object? steward = freezed,Object? user = freezed,}) {
return _then(_self.copyWith(
key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
as String?,guildsName: freezed == guildsName ? _self.guildsName : guildsName // ignore: cast_nullable_to_non_nullable
as String?,steward: freezed == steward ? _self.steward : steward // ignore: cast_nullable_to_non_nullable
as bool?,user: freezed == user ? _self.user : user // ignore: cast_nullable_to_non_nullable
as User?,
));
}
/// Create a copy of GuildModel
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$UserCopyWith<$Res>? get user {
if (_self.user == null) {
return null;
}
return $UserCopyWith<$Res>(_self.user!, (value) {
return _then(_self.copyWith(user: value));
});
}
}
/// Adds pattern-matching-related methods to [GuildModel].
extension GuildModelPatterns on GuildModel {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _GuildModel value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _GuildModel() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _GuildModel value) $default,){
final _that = this;
switch (_that) {
case _GuildModel():
return $default(_that);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _GuildModel value)? $default,){
final _that = this;
switch (_that) {
case _GuildModel() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? key, String? guildsName, bool? steward, User? user)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _GuildModel() when $default != null:
return $default(_that.key,_that.guildsName,_that.steward,_that.user);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? key, String? guildsName, bool? steward, User? user) $default,) {final _that = this;
switch (_that) {
case _GuildModel():
return $default(_that.key,_that.guildsName,_that.steward,_that.user);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? key, String? guildsName, bool? steward, User? user)? $default,) {final _that = this;
switch (_that) {
case _GuildModel() when $default != null:
return $default(_that.key,_that.guildsName,_that.steward,_that.user);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _GuildModel implements GuildModel {
const _GuildModel({this.key, this.guildsName, this.steward, this.user});
factory _GuildModel.fromJson(Map<String, dynamic> json) => _$GuildModelFromJson(json);
@override final String? key;
@override final String? guildsName;
@override final bool? steward;
@override final User? user;
/// Create a copy of GuildModel
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$GuildModelCopyWith<_GuildModel> get copyWith => __$GuildModelCopyWithImpl<_GuildModel>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$GuildModelToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _GuildModel&&(identical(other.key, key) || other.key == key)&&(identical(other.guildsName, guildsName) || other.guildsName == guildsName)&&(identical(other.steward, steward) || other.steward == steward)&&(identical(other.user, user) || other.user == user));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,key,guildsName,steward,user);
@override
String toString() {
return 'GuildModel(key: $key, guildsName: $guildsName, steward: $steward, user: $user)';
}
}
/// @nodoc
abstract mixin class _$GuildModelCopyWith<$Res> implements $GuildModelCopyWith<$Res> {
factory _$GuildModelCopyWith(_GuildModel value, $Res Function(_GuildModel) _then) = __$GuildModelCopyWithImpl;
@override @useResult
$Res call({
String? key, String? guildsName, bool? steward, User? user
});
@override $UserCopyWith<$Res>? get user;
}
/// @nodoc
class __$GuildModelCopyWithImpl<$Res>
implements _$GuildModelCopyWith<$Res> {
__$GuildModelCopyWithImpl(this._self, this._then);
final _GuildModel _self;
final $Res Function(_GuildModel) _then;
/// Create a copy of GuildModel
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? key = freezed,Object? guildsName = freezed,Object? steward = freezed,Object? user = freezed,}) {
return _then(_GuildModel(
key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
as String?,guildsName: freezed == guildsName ? _self.guildsName : guildsName // ignore: cast_nullable_to_non_nullable
as String?,steward: freezed == steward ? _self.steward : steward // ignore: cast_nullable_to_non_nullable
as bool?,user: freezed == user ? _self.user : user // ignore: cast_nullable_to_non_nullable
as User?,
));
}
/// Create a copy of GuildModel
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$UserCopyWith<$Res>? get user {
if (_self.user == null) {
return null;
}
return $UserCopyWith<$Res>(_self.user!, (value) {
return _then(_self.copyWith(user: value));
});
}
}
/// @nodoc
mixin _$User {
String? get fullname; String? get mobile; String? get city;
/// Create a copy of User
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$UserCopyWith<User> get copyWith => _$UserCopyWithImpl<User>(this as User, _$identity);
/// Serializes this User to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is User&&(identical(other.fullname, fullname) || other.fullname == fullname)&&(identical(other.mobile, mobile) || other.mobile == mobile)&&(identical(other.city, city) || other.city == city));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,fullname,mobile,city);
@override
String toString() {
return 'User(fullname: $fullname, mobile: $mobile, city: $city)';
}
}
/// @nodoc
abstract mixin class $UserCopyWith<$Res> {
factory $UserCopyWith(User value, $Res Function(User) _then) = _$UserCopyWithImpl;
@useResult
$Res call({
String? fullname, String? mobile, String? city
});
}
/// @nodoc
class _$UserCopyWithImpl<$Res>
implements $UserCopyWith<$Res> {
_$UserCopyWithImpl(this._self, this._then);
final User _self;
final $Res Function(User) _then;
/// Create a copy of User
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? fullname = freezed,Object? mobile = freezed,Object? city = freezed,}) {
return _then(_self.copyWith(
fullname: freezed == fullname ? _self.fullname : fullname // ignore: cast_nullable_to_non_nullable
as String?,mobile: freezed == mobile ? _self.mobile : mobile // ignore: cast_nullable_to_non_nullable
as String?,city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// Adds pattern-matching-related methods to [User].
extension UserPatterns on User {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _User value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _User() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _User value) $default,){
final _that = this;
switch (_that) {
case _User():
return $default(_that);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _User value)? $default,){
final _that = this;
switch (_that) {
case _User() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? fullname, String? mobile, String? city)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _User() when $default != null:
return $default(_that.fullname,_that.mobile,_that.city);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? fullname, String? mobile, String? city) $default,) {final _that = this;
switch (_that) {
case _User():
return $default(_that.fullname,_that.mobile,_that.city);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? fullname, String? mobile, String? city)? $default,) {final _that = this;
switch (_that) {
case _User() when $default != null:
return $default(_that.fullname,_that.mobile,_that.city);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _User implements User {
const _User({this.fullname, this.mobile, this.city});
factory _User.fromJson(Map<String, dynamic> json) => _$UserFromJson(json);
@override final String? fullname;
@override final String? mobile;
@override final String? city;
/// Create a copy of User
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$UserCopyWith<_User> get copyWith => __$UserCopyWithImpl<_User>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$UserToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _User&&(identical(other.fullname, fullname) || other.fullname == fullname)&&(identical(other.mobile, mobile) || other.mobile == mobile)&&(identical(other.city, city) || other.city == city));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,fullname,mobile,city);
@override
String toString() {
return 'User(fullname: $fullname, mobile: $mobile, city: $city)';
}
}
/// @nodoc
abstract mixin class _$UserCopyWith<$Res> implements $UserCopyWith<$Res> {
factory _$UserCopyWith(_User value, $Res Function(_User) _then) = __$UserCopyWithImpl;
@override @useResult
$Res call({
String? fullname, String? mobile, String? city
});
}
/// @nodoc
class __$UserCopyWithImpl<$Res>
implements _$UserCopyWith<$Res> {
__$UserCopyWithImpl(this._self, this._then);
final _User _self;
final $Res Function(_User) _then;
/// Create a copy of User
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? fullname = freezed,Object? mobile = freezed,Object? city = freezed,}) {
return _then(_User(
fullname: freezed == fullname ? _self.fullname : fullname // ignore: cast_nullable_to_non_nullable
as String?,mobile: freezed == mobile ? _self.mobile : mobile // ignore: cast_nullable_to_non_nullable
as String?,city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
// dart format on

View File

@@ -0,0 +1,36 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'guild_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_GuildModel _$GuildModelFromJson(Map<String, dynamic> json) => _GuildModel(
key: json['key'] as String?,
guildsName: json['guilds_name'] as String?,
steward: json['steward'] as bool?,
user: json['user'] == null
? null
: User.fromJson(json['user'] as Map<String, dynamic>),
);
Map<String, dynamic> _$GuildModelToJson(_GuildModel instance) =>
<String, dynamic>{
'key': instance.key,
'guilds_name': instance.guildsName,
'steward': instance.steward,
'user': instance.user,
};
_User _$UserFromJson(Map<String, dynamic> json) => _User(
fullname: json['fullname'] as String?,
mobile: json['mobile'] as String?,
city: json['city'] as String?,
);
Map<String, dynamic> _$UserToJson(_User instance) => <String, dynamic>{
'fullname': instance.fullname,
'mobile': instance.mobile,
'city': instance.city,
};

View File

@@ -0,0 +1,160 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'guild_profile.freezed.dart';
part 'guild_profile.g.dart';
@freezed
abstract class GuildProfile with _$GuildProfile {
const factory GuildProfile({
int? id,
User? user,
Address? address,
GuildAreaActivity? guild_area_activity,
GuildTypeActivity? guild_type_activity,
List<dynamic>? kill_house,
List<dynamic>? steward_kill_house,
List<dynamic>? stewards,
GetPosStatus? get_pos_status,
String? key,
String? create_date,
String? modify_date,
bool? trash,
String? user_id_foreign_key,
String? address_id_foreign_key,
String? user_bank_id_foreign_key,
String? wallet_id_foreign_key,
String? provincial_government_id_key,
dynamic identity_documents,
bool? active,
int? city_number,
String? city_name,
String? guilds_id,
String? license_number,
String? guilds_name,
String? phone,
String? type_activity,
String? area_activity,
int? province_number,
String? province_name,
bool? steward,
bool? has_pos,
dynamic centers_allocation,
dynamic kill_house_centers_allocation,
dynamic allocation_limit,
bool? limitation_allocation,
String? registerar_role,
String? registerar_fullname,
String? registerar_mobile,
bool? kill_house_register,
bool? steward_register,
bool? guilds_room_register,
bool? pos_company_register,
String? province_accept_state,
String? province_message,
String? condition,
String? description_condition,
bool? steward_active,
dynamic steward_allocation_limit,
bool? steward_limitation_allocation,
bool? license,
dynamic license_form,
dynamic license_file,
String? reviewer_role,
String? reviewer_fullname,
String? reviewer_mobile,
String? checker_message,
bool? final_accept,
bool? temporary_registration,
String? created_by,
String? modified_by,
dynamic user_bank_info,
int? wallet,
List<dynamic>? cars,
List<dynamic>? user_level,
}) = _GuildProfile;
factory GuildProfile.fromJson(Map<String, dynamic> json) =>
_$GuildProfileFromJson(json);
}
@freezed
abstract class User with _$User {
const factory User({
String? fullname,
String? first_name,
String? last_name,
String? mobile,
String? national_id,
String? city,
}) = _User;
factory User.fromJson(Map<String, dynamic> json) => _$UserFromJson(json);
}
@freezed
abstract class Address with _$Address {
const factory Address({
Province? province,
City? city,
String? address,
String? postal_code,
}) = _Address;
factory Address.fromJson(Map<String, dynamic> json) =>
_$AddressFromJson(json);
}
@freezed
abstract class Province with _$Province {
const factory Province({
String? key,
String? name,
}) = _Province;
factory Province.fromJson(Map<String, dynamic> json) =>
_$ProvinceFromJson(json);
}
@freezed
abstract class City with _$City {
const factory City({
String? key,
String? name,
}) = _City;
factory City.fromJson(Map<String, dynamic> json) => _$CityFromJson(json);
}
@freezed
abstract class GuildAreaActivity with _$GuildAreaActivity {
const factory GuildAreaActivity({
String? key,
String? title,
}) = _GuildAreaActivity;
factory GuildAreaActivity.fromJson(Map<String, dynamic> json) =>
_$GuildAreaActivityFromJson(json);
}
@freezed
abstract class GuildTypeActivity with _$GuildTypeActivity {
const factory GuildTypeActivity({
String? key,
String? title,
}) = _GuildTypeActivity;
factory GuildTypeActivity.fromJson(Map<String, dynamic> json) =>
_$GuildTypeActivityFromJson(json);
}
@freezed
abstract class GetPosStatus with _$GetPosStatus {
const factory GetPosStatus({
int? len_active_sessions,
bool? has_pons,
bool? has_active_pons,
}) = _GetPosStatus;
factory GetPosStatus.fromJson(Map<String, dynamic> json) =>
_$GetPosStatusFromJson(json);
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,244 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'guild_profile.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_GuildProfile _$GuildProfileFromJson(
Map<String, dynamic> json,
) => _GuildProfile(
id: (json['id'] as num?)?.toInt(),
user: json['user'] == null
? null
: User.fromJson(json['user'] as Map<String, dynamic>),
address: json['address'] == null
? null
: Address.fromJson(json['address'] as Map<String, dynamic>),
guild_area_activity: json['guild_area_activity'] == null
? null
: GuildAreaActivity.fromJson(
json['guild_area_activity'] as Map<String, dynamic>,
),
guild_type_activity: json['guild_type_activity'] == null
? null
: GuildTypeActivity.fromJson(
json['guild_type_activity'] as Map<String, dynamic>,
),
kill_house: json['kill_house'] as List<dynamic>?,
steward_kill_house: json['steward_kill_house'] as List<dynamic>?,
stewards: json['stewards'] as List<dynamic>?,
get_pos_status: json['get_pos_status'] == null
? null
: GetPosStatus.fromJson(json['get_pos_status'] as Map<String, dynamic>),
key: json['key'] as String?,
create_date: json['create_date'] as String?,
modify_date: json['modify_date'] as String?,
trash: json['trash'] as bool?,
user_id_foreign_key: json['user_id_foreign_key'] as String?,
address_id_foreign_key: json['address_id_foreign_key'] as String?,
user_bank_id_foreign_key: json['user_bank_id_foreign_key'] as String?,
wallet_id_foreign_key: json['wallet_id_foreign_key'] as String?,
provincial_government_id_key: json['provincial_government_id_key'] as String?,
identity_documents: json['identity_documents'],
active: json['active'] as bool?,
city_number: (json['city_number'] as num?)?.toInt(),
city_name: json['city_name'] as String?,
guilds_id: json['guilds_id'] as String?,
license_number: json['license_number'] as String?,
guilds_name: json['guilds_name'] as String?,
phone: json['phone'] as String?,
type_activity: json['type_activity'] as String?,
area_activity: json['area_activity'] as String?,
province_number: (json['province_number'] as num?)?.toInt(),
province_name: json['province_name'] as String?,
steward: json['steward'] as bool?,
has_pos: json['has_pos'] as bool?,
centers_allocation: json['centers_allocation'],
kill_house_centers_allocation: json['kill_house_centers_allocation'],
allocation_limit: json['allocation_limit'],
limitation_allocation: json['limitation_allocation'] as bool?,
registerar_role: json['registerar_role'] as String?,
registerar_fullname: json['registerar_fullname'] as String?,
registerar_mobile: json['registerar_mobile'] as String?,
kill_house_register: json['kill_house_register'] as bool?,
steward_register: json['steward_register'] as bool?,
guilds_room_register: json['guilds_room_register'] as bool?,
pos_company_register: json['pos_company_register'] as bool?,
province_accept_state: json['province_accept_state'] as String?,
province_message: json['province_message'] as String?,
condition: json['condition'] as String?,
description_condition: json['description_condition'] as String?,
steward_active: json['steward_active'] as bool?,
steward_allocation_limit: json['steward_allocation_limit'],
steward_limitation_allocation: json['steward_limitation_allocation'] as bool?,
license: json['license'] as bool?,
license_form: json['license_form'],
license_file: json['license_file'],
reviewer_role: json['reviewer_role'] as String?,
reviewer_fullname: json['reviewer_fullname'] as String?,
reviewer_mobile: json['reviewer_mobile'] as String?,
checker_message: json['checker_message'] as String?,
final_accept: json['final_accept'] as bool?,
temporary_registration: json['temporary_registration'] as bool?,
created_by: json['created_by'] as String?,
modified_by: json['modified_by'] as String?,
user_bank_info: json['user_bank_info'],
wallet: (json['wallet'] as num?)?.toInt(),
cars: json['cars'] as List<dynamic>?,
user_level: json['user_level'] as List<dynamic>?,
);
Map<String, dynamic> _$GuildProfileToJson(_GuildProfile instance) =>
<String, dynamic>{
'id': instance.id,
'user': instance.user,
'address': instance.address,
'guild_area_activity': instance.guild_area_activity,
'guild_type_activity': instance.guild_type_activity,
'kill_house': instance.kill_house,
'steward_kill_house': instance.steward_kill_house,
'stewards': instance.stewards,
'get_pos_status': instance.get_pos_status,
'key': instance.key,
'create_date': instance.create_date,
'modify_date': instance.modify_date,
'trash': instance.trash,
'user_id_foreign_key': instance.user_id_foreign_key,
'address_id_foreign_key': instance.address_id_foreign_key,
'user_bank_id_foreign_key': instance.user_bank_id_foreign_key,
'wallet_id_foreign_key': instance.wallet_id_foreign_key,
'provincial_government_id_key': instance.provincial_government_id_key,
'identity_documents': instance.identity_documents,
'active': instance.active,
'city_number': instance.city_number,
'city_name': instance.city_name,
'guilds_id': instance.guilds_id,
'license_number': instance.license_number,
'guilds_name': instance.guilds_name,
'phone': instance.phone,
'type_activity': instance.type_activity,
'area_activity': instance.area_activity,
'province_number': instance.province_number,
'province_name': instance.province_name,
'steward': instance.steward,
'has_pos': instance.has_pos,
'centers_allocation': instance.centers_allocation,
'kill_house_centers_allocation': instance.kill_house_centers_allocation,
'allocation_limit': instance.allocation_limit,
'limitation_allocation': instance.limitation_allocation,
'registerar_role': instance.registerar_role,
'registerar_fullname': instance.registerar_fullname,
'registerar_mobile': instance.registerar_mobile,
'kill_house_register': instance.kill_house_register,
'steward_register': instance.steward_register,
'guilds_room_register': instance.guilds_room_register,
'pos_company_register': instance.pos_company_register,
'province_accept_state': instance.province_accept_state,
'province_message': instance.province_message,
'condition': instance.condition,
'description_condition': instance.description_condition,
'steward_active': instance.steward_active,
'steward_allocation_limit': instance.steward_allocation_limit,
'steward_limitation_allocation': instance.steward_limitation_allocation,
'license': instance.license,
'license_form': instance.license_form,
'license_file': instance.license_file,
'reviewer_role': instance.reviewer_role,
'reviewer_fullname': instance.reviewer_fullname,
'reviewer_mobile': instance.reviewer_mobile,
'checker_message': instance.checker_message,
'final_accept': instance.final_accept,
'temporary_registration': instance.temporary_registration,
'created_by': instance.created_by,
'modified_by': instance.modified_by,
'user_bank_info': instance.user_bank_info,
'wallet': instance.wallet,
'cars': instance.cars,
'user_level': instance.user_level,
};
_User _$UserFromJson(Map<String, dynamic> json) => _User(
fullname: json['fullname'] as String?,
first_name: json['first_name'] as String?,
last_name: json['last_name'] as String?,
mobile: json['mobile'] as String?,
national_id: json['national_id'] as String?,
city: json['city'] as String?,
);
Map<String, dynamic> _$UserToJson(_User instance) => <String, dynamic>{
'fullname': instance.fullname,
'first_name': instance.first_name,
'last_name': instance.last_name,
'mobile': instance.mobile,
'national_id': instance.national_id,
'city': instance.city,
};
_Address _$AddressFromJson(Map<String, dynamic> json) => _Address(
province: json['province'] == null
? null
: Province.fromJson(json['province'] as Map<String, dynamic>),
city: json['city'] == null
? null
: City.fromJson(json['city'] as Map<String, dynamic>),
address: json['address'] as String?,
postal_code: json['postal_code'] as String?,
);
Map<String, dynamic> _$AddressToJson(_Address instance) => <String, dynamic>{
'province': instance.province,
'city': instance.city,
'address': instance.address,
'postal_code': instance.postal_code,
};
_Province _$ProvinceFromJson(Map<String, dynamic> json) =>
_Province(key: json['key'] as String?, name: json['name'] as String?);
Map<String, dynamic> _$ProvinceToJson(_Province instance) => <String, dynamic>{
'key': instance.key,
'name': instance.name,
};
_City _$CityFromJson(Map<String, dynamic> json) =>
_City(key: json['key'] as String?, name: json['name'] as String?);
Map<String, dynamic> _$CityToJson(_City instance) => <String, dynamic>{
'key': instance.key,
'name': instance.name,
};
_GuildAreaActivity _$GuildAreaActivityFromJson(Map<String, dynamic> json) =>
_GuildAreaActivity(
key: json['key'] as String?,
title: json['title'] as String?,
);
Map<String, dynamic> _$GuildAreaActivityToJson(_GuildAreaActivity instance) =>
<String, dynamic>{'key': instance.key, 'title': instance.title};
_GuildTypeActivity _$GuildTypeActivityFromJson(Map<String, dynamic> json) =>
_GuildTypeActivity(
key: json['key'] as String?,
title: json['title'] as String?,
);
Map<String, dynamic> _$GuildTypeActivityToJson(_GuildTypeActivity instance) =>
<String, dynamic>{'key': instance.key, 'title': instance.title};
_GetPosStatus _$GetPosStatusFromJson(Map<String, dynamic> json) =>
_GetPosStatus(
len_active_sessions: (json['len_active_sessions'] as num?)?.toInt(),
has_pons: json['has_pons'] as bool?,
has_active_pons: json['has_active_pons'] as bool?,
);
Map<String, dynamic> _$GetPosStatusToJson(_GetPosStatus instance) =>
<String, dynamic>{
'len_active_sessions': instance.len_active_sessions,
'has_pons': instance.has_pons,
'has_active_pons': instance.has_active_pons,
};

View File

@@ -0,0 +1,56 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'inventory_model.freezed.dart';
part 'inventory_model.g.dart';
@freezed
abstract class InventoryModel with _$InventoryModel {
const factory InventoryModel({
int? id,
String? key,
String? createDate,
String? modifyDate,
bool? trash,
String? name,
int? provinceGovernmentalCarcassesQuantity,
int? provinceGovernmentalCarcassesWeight,
int? provinceFreeCarcassesQuantity,
int? provinceFreeCarcassesWeight,
int? receiveGovernmentalCarcassesQuantity,
int? receiveGovernmentalCarcassesWeight,
int? receiveFreeCarcassesQuantity,
int? receiveFreeCarcassesWeight,
int? freeBuyingCarcassesQuantity,
int? freeBuyingCarcassesWeight,
int? totalGovernmentalCarcassesQuantity,
int? totalGovernmentalCarcassesWeight,
int? totalFreeBarsCarcassesQuantity,
int? totalFreeBarsCarcassesWeight,
double? weightAverage,
int? totalCarcassesQuantity,
int? totalCarcassesWeight,
int? freezingQuantity,
int? freezingWeight,
int? lossWeight,
int? outProvinceAllocatedQuantity,
int? outProvinceAllocatedWeight,
int? provinceAllocatedQuantity,
int? provinceAllocatedWeight,
int? realAllocatedQuantity,
int? realAllocatedWeight,
int? coldHouseAllocatedWeight,
int? posAllocatedWeight,
int? segmentationWeight,
int? totalRemainQuantity,
int? totalRemainWeight,
int? freePrice,
int? approvedPrice,
bool? approvedPriceStatus,
int? parentProduct,
int? killHouse,
int? guild,
}) = _InventoryModel; // Changed to _InventoryModel
factory InventoryModel.fromJson(Map<String, dynamic> json) =>
_$InventoryModelFromJson(json);
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,127 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'inventory_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_InventoryModel _$InventoryModelFromJson(
Map<String, dynamic> json,
) => _InventoryModel(
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?,
name: json['name'] as String?,
provinceGovernmentalCarcassesQuantity:
(json['province_governmental_carcasses_quantity'] as num?)?.toInt(),
provinceGovernmentalCarcassesWeight:
(json['province_governmental_carcasses_weight'] as num?)?.toInt(),
provinceFreeCarcassesQuantity:
(json['province_free_carcasses_quantity'] as num?)?.toInt(),
provinceFreeCarcassesWeight: (json['province_free_carcasses_weight'] as num?)
?.toInt(),
receiveGovernmentalCarcassesQuantity:
(json['receive_governmental_carcasses_quantity'] as num?)?.toInt(),
receiveGovernmentalCarcassesWeight:
(json['receive_governmental_carcasses_weight'] as num?)?.toInt(),
receiveFreeCarcassesQuantity:
(json['receive_free_carcasses_quantity'] as num?)?.toInt(),
receiveFreeCarcassesWeight: (json['receive_free_carcasses_weight'] as num?)
?.toInt(),
freeBuyingCarcassesQuantity: (json['free_buying_carcasses_quantity'] as num?)
?.toInt(),
freeBuyingCarcassesWeight: (json['free_buying_carcasses_weight'] as num?)
?.toInt(),
totalGovernmentalCarcassesQuantity:
(json['total_governmental_carcasses_quantity'] as num?)?.toInt(),
totalGovernmentalCarcassesWeight:
(json['total_governmental_carcasses_weight'] as num?)?.toInt(),
totalFreeBarsCarcassesQuantity:
(json['total_free_bars_carcasses_quantity'] as num?)?.toInt(),
totalFreeBarsCarcassesWeight:
(json['total_free_bars_carcasses_weight'] as num?)?.toInt(),
weightAverage: (json['weight_average'] as num?)?.toDouble(),
totalCarcassesQuantity: (json['total_carcasses_quantity'] as num?)?.toInt(),
totalCarcassesWeight: (json['total_carcasses_weight'] as num?)?.toInt(),
freezingQuantity: (json['freezing_quantity'] as num?)?.toInt(),
freezingWeight: (json['freezing_weight'] as num?)?.toInt(),
lossWeight: (json['loss_weight'] as num?)?.toInt(),
outProvinceAllocatedQuantity:
(json['out_province_allocated_quantity'] as num?)?.toInt(),
outProvinceAllocatedWeight: (json['out_province_allocated_weight'] as num?)
?.toInt(),
provinceAllocatedQuantity: (json['province_allocated_quantity'] as num?)
?.toInt(),
provinceAllocatedWeight: (json['province_allocated_weight'] as num?)?.toInt(),
realAllocatedQuantity: (json['real_allocated_quantity'] as num?)?.toInt(),
realAllocatedWeight: (json['real_allocated_weight'] as num?)?.toInt(),
coldHouseAllocatedWeight: (json['cold_house_allocated_weight'] as num?)
?.toInt(),
posAllocatedWeight: (json['pos_allocated_weight'] as num?)?.toInt(),
segmentationWeight: (json['segmentation_weight'] as num?)?.toInt(),
totalRemainQuantity: (json['total_remain_quantity'] as num?)?.toInt(),
totalRemainWeight: (json['total_remain_weight'] as num?)?.toInt(),
freePrice: (json['free_price'] as num?)?.toInt(),
approvedPrice: (json['approved_price'] as num?)?.toInt(),
approvedPriceStatus: json['approved_price_status'] as bool?,
parentProduct: (json['parent_product'] as num?)?.toInt(),
killHouse: (json['kill_house'] as num?)?.toInt(),
guild: (json['guild'] as num?)?.toInt(),
);
Map<String, dynamic> _$InventoryModelToJson(
_InventoryModel instance,
) => <String, dynamic>{
'id': instance.id,
'key': instance.key,
'create_date': instance.createDate,
'modify_date': instance.modifyDate,
'trash': instance.trash,
'name': instance.name,
'province_governmental_carcasses_quantity':
instance.provinceGovernmentalCarcassesQuantity,
'province_governmental_carcasses_weight':
instance.provinceGovernmentalCarcassesWeight,
'province_free_carcasses_quantity': instance.provinceFreeCarcassesQuantity,
'province_free_carcasses_weight': instance.provinceFreeCarcassesWeight,
'receive_governmental_carcasses_quantity':
instance.receiveGovernmentalCarcassesQuantity,
'receive_governmental_carcasses_weight':
instance.receiveGovernmentalCarcassesWeight,
'receive_free_carcasses_quantity': instance.receiveFreeCarcassesQuantity,
'receive_free_carcasses_weight': instance.receiveFreeCarcassesWeight,
'free_buying_carcasses_quantity': instance.freeBuyingCarcassesQuantity,
'free_buying_carcasses_weight': instance.freeBuyingCarcassesWeight,
'total_governmental_carcasses_quantity':
instance.totalGovernmentalCarcassesQuantity,
'total_governmental_carcasses_weight':
instance.totalGovernmentalCarcassesWeight,
'total_free_bars_carcasses_quantity': instance.totalFreeBarsCarcassesQuantity,
'total_free_bars_carcasses_weight': instance.totalFreeBarsCarcassesWeight,
'weight_average': instance.weightAverage,
'total_carcasses_quantity': instance.totalCarcassesQuantity,
'total_carcasses_weight': instance.totalCarcassesWeight,
'freezing_quantity': instance.freezingQuantity,
'freezing_weight': instance.freezingWeight,
'loss_weight': instance.lossWeight,
'out_province_allocated_quantity': instance.outProvinceAllocatedQuantity,
'out_province_allocated_weight': instance.outProvinceAllocatedWeight,
'province_allocated_quantity': instance.provinceAllocatedQuantity,
'province_allocated_weight': instance.provinceAllocatedWeight,
'real_allocated_quantity': instance.realAllocatedQuantity,
'real_allocated_weight': instance.realAllocatedWeight,
'cold_house_allocated_weight': instance.coldHouseAllocatedWeight,
'pos_allocated_weight': instance.posAllocatedWeight,
'segmentation_weight': instance.segmentationWeight,
'total_remain_quantity': instance.totalRemainQuantity,
'total_remain_weight': instance.totalRemainWeight,
'free_price': instance.freePrice,
'approved_price': instance.approvedPrice,
'approved_price_status': instance.approvedPriceStatus,
'parent_product': instance.parentProduct,
'kill_house': instance.killHouse,
'guild': instance.guild,
};

View File

@@ -0,0 +1,16 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'iran_province_city_model.freezed.dart';
part 'iran_province_city_model.g.dart';
@freezed
abstract class IranProvinceCityModel with _$IranProvinceCityModel {
const factory IranProvinceCityModel({
int? id,
String? name,
}) = _IranProvinceCityModel;
factory IranProvinceCityModel.fromJson(Map<String, dynamic> json) =>
_$IranProvinceCityModelFromJson(json);
}

View File

@@ -0,0 +1,280 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'iran_province_city_model.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$IranProvinceCityModel {
int? get id; String? get name;
/// Create a copy of IranProvinceCityModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$IranProvinceCityModelCopyWith<IranProvinceCityModel> get copyWith => _$IranProvinceCityModelCopyWithImpl<IranProvinceCityModel>(this as IranProvinceCityModel, _$identity);
/// Serializes this IranProvinceCityModel to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is IranProvinceCityModel&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,id,name);
@override
String toString() {
return 'IranProvinceCityModel(id: $id, name: $name)';
}
}
/// @nodoc
abstract mixin class $IranProvinceCityModelCopyWith<$Res> {
factory $IranProvinceCityModelCopyWith(IranProvinceCityModel value, $Res Function(IranProvinceCityModel) _then) = _$IranProvinceCityModelCopyWithImpl;
@useResult
$Res call({
int? id, String? name
});
}
/// @nodoc
class _$IranProvinceCityModelCopyWithImpl<$Res>
implements $IranProvinceCityModelCopyWith<$Res> {
_$IranProvinceCityModelCopyWithImpl(this._self, this._then);
final IranProvinceCityModel _self;
final $Res Function(IranProvinceCityModel) _then;
/// Create a copy of IranProvinceCityModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? id = freezed,Object? name = freezed,}) {
return _then(_self.copyWith(
id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as int?,name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// Adds pattern-matching-related methods to [IranProvinceCityModel].
extension IranProvinceCityModelPatterns on IranProvinceCityModel {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _IranProvinceCityModel value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _IranProvinceCityModel() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _IranProvinceCityModel value) $default,){
final _that = this;
switch (_that) {
case _IranProvinceCityModel():
return $default(_that);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _IranProvinceCityModel value)? $default,){
final _that = this;
switch (_that) {
case _IranProvinceCityModel() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( int? id, String? name)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _IranProvinceCityModel() when $default != null:
return $default(_that.id,_that.name);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( int? id, String? name) $default,) {final _that = this;
switch (_that) {
case _IranProvinceCityModel():
return $default(_that.id,_that.name);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( int? id, String? name)? $default,) {final _that = this;
switch (_that) {
case _IranProvinceCityModel() when $default != null:
return $default(_that.id,_that.name);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _IranProvinceCityModel implements IranProvinceCityModel {
const _IranProvinceCityModel({this.id, this.name});
factory _IranProvinceCityModel.fromJson(Map<String, dynamic> json) => _$IranProvinceCityModelFromJson(json);
@override final int? id;
@override final String? name;
/// Create a copy of IranProvinceCityModel
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$IranProvinceCityModelCopyWith<_IranProvinceCityModel> get copyWith => __$IranProvinceCityModelCopyWithImpl<_IranProvinceCityModel>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$IranProvinceCityModelToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _IranProvinceCityModel&&(identical(other.id, id) || other.id == id)&&(identical(other.name, name) || other.name == name));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,id,name);
@override
String toString() {
return 'IranProvinceCityModel(id: $id, name: $name)';
}
}
/// @nodoc
abstract mixin class _$IranProvinceCityModelCopyWith<$Res> implements $IranProvinceCityModelCopyWith<$Res> {
factory _$IranProvinceCityModelCopyWith(_IranProvinceCityModel value, $Res Function(_IranProvinceCityModel) _then) = __$IranProvinceCityModelCopyWithImpl;
@override @useResult
$Res call({
int? id, String? name
});
}
/// @nodoc
class __$IranProvinceCityModelCopyWithImpl<$Res>
implements _$IranProvinceCityModelCopyWith<$Res> {
__$IranProvinceCityModelCopyWithImpl(this._self, this._then);
final _IranProvinceCityModel _self;
final $Res Function(_IranProvinceCityModel) _then;
/// Create a copy of IranProvinceCityModel
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? id = freezed,Object? name = freezed,}) {
return _then(_IranProvinceCityModel(
id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as int?,name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
// dart format on

View File

@@ -0,0 +1,18 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'iran_province_city_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_IranProvinceCityModel _$IranProvinceCityModelFromJson(
Map<String, dynamic> json,
) => _IranProvinceCityModel(
id: (json['id'] as num?)?.toInt(),
name: json['name'] as String?,
);
Map<String, dynamic> _$IranProvinceCityModelToJson(
_IranProvinceCityModel instance,
) => <String, dynamic>{'id': instance.id, 'name': instance.name};

View File

@@ -0,0 +1,15 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'kill_house_distribution_info.freezed.dart';
part 'kill_house_distribution_info.g.dart';
@freezed
abstract class KillHouseDistributionInfo with _$KillHouseDistributionInfo {
const factory KillHouseDistributionInfo({
double? stewardAllocationsWeight,
double? freeSalesWeight,
}) = _KillHouseDistributionInfo;
factory KillHouseDistributionInfo.fromJson(Map<String, dynamic> json) =>
_$KillHouseDistributionInfoFromJson(json);
}

View File

@@ -0,0 +1,280 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'kill_house_distribution_info.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$KillHouseDistributionInfo {
double? get stewardAllocationsWeight; double? get freeSalesWeight;
/// Create a copy of KillHouseDistributionInfo
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$KillHouseDistributionInfoCopyWith<KillHouseDistributionInfo> get copyWith => _$KillHouseDistributionInfoCopyWithImpl<KillHouseDistributionInfo>(this as KillHouseDistributionInfo, _$identity);
/// Serializes this KillHouseDistributionInfo to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is KillHouseDistributionInfo&&(identical(other.stewardAllocationsWeight, stewardAllocationsWeight) || other.stewardAllocationsWeight == stewardAllocationsWeight)&&(identical(other.freeSalesWeight, freeSalesWeight) || other.freeSalesWeight == freeSalesWeight));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,stewardAllocationsWeight,freeSalesWeight);
@override
String toString() {
return 'KillHouseDistributionInfo(stewardAllocationsWeight: $stewardAllocationsWeight, freeSalesWeight: $freeSalesWeight)';
}
}
/// @nodoc
abstract mixin class $KillHouseDistributionInfoCopyWith<$Res> {
factory $KillHouseDistributionInfoCopyWith(KillHouseDistributionInfo value, $Res Function(KillHouseDistributionInfo) _then) = _$KillHouseDistributionInfoCopyWithImpl;
@useResult
$Res call({
double? stewardAllocationsWeight, double? freeSalesWeight
});
}
/// @nodoc
class _$KillHouseDistributionInfoCopyWithImpl<$Res>
implements $KillHouseDistributionInfoCopyWith<$Res> {
_$KillHouseDistributionInfoCopyWithImpl(this._self, this._then);
final KillHouseDistributionInfo _self;
final $Res Function(KillHouseDistributionInfo) _then;
/// Create a copy of KillHouseDistributionInfo
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? stewardAllocationsWeight = freezed,Object? freeSalesWeight = freezed,}) {
return _then(_self.copyWith(
stewardAllocationsWeight: freezed == stewardAllocationsWeight ? _self.stewardAllocationsWeight : stewardAllocationsWeight // ignore: cast_nullable_to_non_nullable
as double?,freeSalesWeight: freezed == freeSalesWeight ? _self.freeSalesWeight : freeSalesWeight // ignore: cast_nullable_to_non_nullable
as double?,
));
}
}
/// Adds pattern-matching-related methods to [KillHouseDistributionInfo].
extension KillHouseDistributionInfoPatterns on KillHouseDistributionInfo {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _KillHouseDistributionInfo value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _KillHouseDistributionInfo() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _KillHouseDistributionInfo value) $default,){
final _that = this;
switch (_that) {
case _KillHouseDistributionInfo():
return $default(_that);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _KillHouseDistributionInfo value)? $default,){
final _that = this;
switch (_that) {
case _KillHouseDistributionInfo() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( double? stewardAllocationsWeight, double? freeSalesWeight)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _KillHouseDistributionInfo() when $default != null:
return $default(_that.stewardAllocationsWeight,_that.freeSalesWeight);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( double? stewardAllocationsWeight, double? freeSalesWeight) $default,) {final _that = this;
switch (_that) {
case _KillHouseDistributionInfo():
return $default(_that.stewardAllocationsWeight,_that.freeSalesWeight);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( double? stewardAllocationsWeight, double? freeSalesWeight)? $default,) {final _that = this;
switch (_that) {
case _KillHouseDistributionInfo() when $default != null:
return $default(_that.stewardAllocationsWeight,_that.freeSalesWeight);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _KillHouseDistributionInfo implements KillHouseDistributionInfo {
const _KillHouseDistributionInfo({this.stewardAllocationsWeight, this.freeSalesWeight});
factory _KillHouseDistributionInfo.fromJson(Map<String, dynamic> json) => _$KillHouseDistributionInfoFromJson(json);
@override final double? stewardAllocationsWeight;
@override final double? freeSalesWeight;
/// Create a copy of KillHouseDistributionInfo
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$KillHouseDistributionInfoCopyWith<_KillHouseDistributionInfo> get copyWith => __$KillHouseDistributionInfoCopyWithImpl<_KillHouseDistributionInfo>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$KillHouseDistributionInfoToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _KillHouseDistributionInfo&&(identical(other.stewardAllocationsWeight, stewardAllocationsWeight) || other.stewardAllocationsWeight == stewardAllocationsWeight)&&(identical(other.freeSalesWeight, freeSalesWeight) || other.freeSalesWeight == freeSalesWeight));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,stewardAllocationsWeight,freeSalesWeight);
@override
String toString() {
return 'KillHouseDistributionInfo(stewardAllocationsWeight: $stewardAllocationsWeight, freeSalesWeight: $freeSalesWeight)';
}
}
/// @nodoc
abstract mixin class _$KillHouseDistributionInfoCopyWith<$Res> implements $KillHouseDistributionInfoCopyWith<$Res> {
factory _$KillHouseDistributionInfoCopyWith(_KillHouseDistributionInfo value, $Res Function(_KillHouseDistributionInfo) _then) = __$KillHouseDistributionInfoCopyWithImpl;
@override @useResult
$Res call({
double? stewardAllocationsWeight, double? freeSalesWeight
});
}
/// @nodoc
class __$KillHouseDistributionInfoCopyWithImpl<$Res>
implements _$KillHouseDistributionInfoCopyWith<$Res> {
__$KillHouseDistributionInfoCopyWithImpl(this._self, this._then);
final _KillHouseDistributionInfo _self;
final $Res Function(_KillHouseDistributionInfo) _then;
/// Create a copy of KillHouseDistributionInfo
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? stewardAllocationsWeight = freezed,Object? freeSalesWeight = freezed,}) {
return _then(_KillHouseDistributionInfo(
stewardAllocationsWeight: freezed == stewardAllocationsWeight ? _self.stewardAllocationsWeight : stewardAllocationsWeight // ignore: cast_nullable_to_non_nullable
as double?,freeSalesWeight: freezed == freeSalesWeight ? _self.freeSalesWeight : freeSalesWeight // ignore: cast_nullable_to_non_nullable
as double?,
));
}
}
// dart format on

View File

@@ -0,0 +1,22 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'kill_house_distribution_info.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_KillHouseDistributionInfo _$KillHouseDistributionInfoFromJson(
Map<String, dynamic> json,
) => _KillHouseDistributionInfo(
stewardAllocationsWeight: (json['steward_allocations_weight'] as num?)
?.toDouble(),
freeSalesWeight: (json['free_sales_weight'] as num?)?.toDouble(),
);
Map<String, dynamic> _$KillHouseDistributionInfoToJson(
_KillHouseDistributionInfo instance,
) => <String, dynamic>{
'steward_allocations_weight': instance.stewardAllocationsWeight,
'free_sales_weight': instance.freeSalesWeight,
};

View File

@@ -0,0 +1,71 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'kill_house_free_bar.freezed.dart';
part 'kill_house_free_bar.g.dart';
@freezed
abstract class KillHouseFreeBar with _$KillHouseFreeBar {
const factory KillHouseFreeBar({
int? id,
dynamic killHouse,
dynamic exclusiveKiller,
String? key,
String? createDate,
String? modifyDate,
bool? trash,
String? poultryName,
String? poultryMobile,
String? sellerName,
String? sellerMobile,
String? province,
String? city,
String? vetFarmName,
String? vetFarmMobile,
String? driverName,
String? driverMobile,
String? car,
String? clearanceCode,
String? barClearanceCode,
int? quantity,
int? numberOfCarcasses,
int? weightOfCarcasses,
int? killHouseVetQuantity,
int? killHouseVetWeight,
String? killHouseVetState,
String? dateOfAcceptReject,
dynamic acceptorRejector,
int? liveWeight,
String? barImage,
String? buyType,
bool? wareHouse,
String? date,
int? wage,
int? totalWageAmount,
int? unionShare,
int? unionSharePercent,
int? companyShare,
int? companySharePercent,
int? guildsShare,
int? guildsSharePercent,
int? cityShare,
int? citySharePercent,
int? walletShare,
int? walletSharePercent,
int? otherShare,
int? otherSharePercent,
bool? archiveWage,
int? weightLoss,
bool? calculateStatus,
bool? temporaryTrash,
bool? temporaryDeleted,
String? enteredMessage,
int? barCode,
String? registerType,
dynamic createdBy,
dynamic modifiedBy,
int? product,
}) = _KillHouseFreeBar;
factory KillHouseFreeBar.fromJson(Map<String, dynamic> json) =>
_$KillHouseFreeBarFromJson(json);
}

View File

@@ -0,0 +1,448 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'kill_house_free_bar.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$KillHouseFreeBar {
int? get id; dynamic get killHouse; dynamic get exclusiveKiller; String? get key; String? get createDate; String? get modifyDate; bool? get trash; String? get poultryName; String? get poultryMobile; String? get sellerName; String? get sellerMobile; String? get province; String? get city; String? get vetFarmName; String? get vetFarmMobile; String? get driverName; String? get driverMobile; String? get car; String? get clearanceCode; String? get barClearanceCode; int? get quantity; int? get numberOfCarcasses; int? get weightOfCarcasses; int? get killHouseVetQuantity; int? get killHouseVetWeight; String? get killHouseVetState; String? get dateOfAcceptReject; dynamic get acceptorRejector; int? get liveWeight; String? get barImage; String? get buyType; bool? get wareHouse; String? get date; int? get wage; int? get totalWageAmount; int? get unionShare; int? get unionSharePercent; int? get companyShare; int? get companySharePercent; int? get guildsShare; int? get guildsSharePercent; int? get cityShare; int? get citySharePercent; int? get walletShare; int? get walletSharePercent; int? get otherShare; int? get otherSharePercent; bool? get archiveWage; int? get weightLoss; bool? get calculateStatus; bool? get temporaryTrash; bool? get temporaryDeleted; String? get enteredMessage; int? get barCode; String? get registerType; dynamic get createdBy; dynamic get modifiedBy; int? get product;
/// Create a copy of KillHouseFreeBar
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$KillHouseFreeBarCopyWith<KillHouseFreeBar> get copyWith => _$KillHouseFreeBarCopyWithImpl<KillHouseFreeBar>(this as KillHouseFreeBar, _$identity);
/// Serializes this KillHouseFreeBar to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is KillHouseFreeBar&&(identical(other.id, id) || other.id == id)&&const DeepCollectionEquality().equals(other.killHouse, killHouse)&&const DeepCollectionEquality().equals(other.exclusiveKiller, exclusiveKiller)&&(identical(other.key, key) || other.key == key)&&(identical(other.createDate, createDate) || other.createDate == createDate)&&(identical(other.modifyDate, modifyDate) || other.modifyDate == modifyDate)&&(identical(other.trash, trash) || other.trash == trash)&&(identical(other.poultryName, poultryName) || other.poultryName == poultryName)&&(identical(other.poultryMobile, poultryMobile) || other.poultryMobile == poultryMobile)&&(identical(other.sellerName, sellerName) || other.sellerName == sellerName)&&(identical(other.sellerMobile, sellerMobile) || other.sellerMobile == sellerMobile)&&(identical(other.province, province) || other.province == province)&&(identical(other.city, city) || other.city == city)&&(identical(other.vetFarmName, vetFarmName) || other.vetFarmName == vetFarmName)&&(identical(other.vetFarmMobile, vetFarmMobile) || other.vetFarmMobile == vetFarmMobile)&&(identical(other.driverName, driverName) || other.driverName == driverName)&&(identical(other.driverMobile, driverMobile) || other.driverMobile == driverMobile)&&(identical(other.car, car) || other.car == car)&&(identical(other.clearanceCode, clearanceCode) || other.clearanceCode == clearanceCode)&&(identical(other.barClearanceCode, barClearanceCode) || other.barClearanceCode == barClearanceCode)&&(identical(other.quantity, quantity) || other.quantity == quantity)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.killHouseVetQuantity, killHouseVetQuantity) || other.killHouseVetQuantity == killHouseVetQuantity)&&(identical(other.killHouseVetWeight, killHouseVetWeight) || other.killHouseVetWeight == killHouseVetWeight)&&(identical(other.killHouseVetState, killHouseVetState) || other.killHouseVetState == killHouseVetState)&&(identical(other.dateOfAcceptReject, dateOfAcceptReject) || other.dateOfAcceptReject == dateOfAcceptReject)&&const DeepCollectionEquality().equals(other.acceptorRejector, acceptorRejector)&&(identical(other.liveWeight, liveWeight) || other.liveWeight == liveWeight)&&(identical(other.barImage, barImage) || other.barImage == barImage)&&(identical(other.buyType, buyType) || other.buyType == buyType)&&(identical(other.wareHouse, wareHouse) || other.wareHouse == wareHouse)&&(identical(other.date, date) || other.date == date)&&(identical(other.wage, wage) || other.wage == wage)&&(identical(other.totalWageAmount, totalWageAmount) || other.totalWageAmount == totalWageAmount)&&(identical(other.unionShare, unionShare) || other.unionShare == unionShare)&&(identical(other.unionSharePercent, unionSharePercent) || other.unionSharePercent == unionSharePercent)&&(identical(other.companyShare, companyShare) || other.companyShare == companyShare)&&(identical(other.companySharePercent, companySharePercent) || other.companySharePercent == companySharePercent)&&(identical(other.guildsShare, guildsShare) || other.guildsShare == guildsShare)&&(identical(other.guildsSharePercent, guildsSharePercent) || other.guildsSharePercent == guildsSharePercent)&&(identical(other.cityShare, cityShare) || other.cityShare == cityShare)&&(identical(other.citySharePercent, citySharePercent) || other.citySharePercent == citySharePercent)&&(identical(other.walletShare, walletShare) || other.walletShare == walletShare)&&(identical(other.walletSharePercent, walletSharePercent) || other.walletSharePercent == walletSharePercent)&&(identical(other.otherShare, otherShare) || other.otherShare == otherShare)&&(identical(other.otherSharePercent, otherSharePercent) || other.otherSharePercent == otherSharePercent)&&(identical(other.archiveWage, archiveWage) || other.archiveWage == archiveWage)&&(identical(other.weightLoss, weightLoss) || other.weightLoss == weightLoss)&&(identical(other.calculateStatus, calculateStatus) || other.calculateStatus == calculateStatus)&&(identical(other.temporaryTrash, temporaryTrash) || other.temporaryTrash == temporaryTrash)&&(identical(other.temporaryDeleted, temporaryDeleted) || other.temporaryDeleted == temporaryDeleted)&&(identical(other.enteredMessage, enteredMessage) || other.enteredMessage == enteredMessage)&&(identical(other.barCode, barCode) || other.barCode == barCode)&&(identical(other.registerType, registerType) || other.registerType == registerType)&&const DeepCollectionEquality().equals(other.createdBy, createdBy)&&const DeepCollectionEquality().equals(other.modifiedBy, modifiedBy)&&(identical(other.product, product) || other.product == product));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hashAll([runtimeType,id,const DeepCollectionEquality().hash(killHouse),const DeepCollectionEquality().hash(exclusiveKiller),key,createDate,modifyDate,trash,poultryName,poultryMobile,sellerName,sellerMobile,province,city,vetFarmName,vetFarmMobile,driverName,driverMobile,car,clearanceCode,barClearanceCode,quantity,numberOfCarcasses,weightOfCarcasses,killHouseVetQuantity,killHouseVetWeight,killHouseVetState,dateOfAcceptReject,const DeepCollectionEquality().hash(acceptorRejector),liveWeight,barImage,buyType,wareHouse,date,wage,totalWageAmount,unionShare,unionSharePercent,companyShare,companySharePercent,guildsShare,guildsSharePercent,cityShare,citySharePercent,walletShare,walletSharePercent,otherShare,otherSharePercent,archiveWage,weightLoss,calculateStatus,temporaryTrash,temporaryDeleted,enteredMessage,barCode,registerType,const DeepCollectionEquality().hash(createdBy),const DeepCollectionEquality().hash(modifiedBy),product]);
@override
String toString() {
return 'KillHouseFreeBar(id: $id, killHouse: $killHouse, exclusiveKiller: $exclusiveKiller, key: $key, createDate: $createDate, modifyDate: $modifyDate, trash: $trash, poultryName: $poultryName, poultryMobile: $poultryMobile, sellerName: $sellerName, sellerMobile: $sellerMobile, province: $province, city: $city, vetFarmName: $vetFarmName, vetFarmMobile: $vetFarmMobile, driverName: $driverName, driverMobile: $driverMobile, car: $car, clearanceCode: $clearanceCode, barClearanceCode: $barClearanceCode, quantity: $quantity, numberOfCarcasses: $numberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, killHouseVetQuantity: $killHouseVetQuantity, killHouseVetWeight: $killHouseVetWeight, killHouseVetState: $killHouseVetState, dateOfAcceptReject: $dateOfAcceptReject, acceptorRejector: $acceptorRejector, liveWeight: $liveWeight, barImage: $barImage, buyType: $buyType, wareHouse: $wareHouse, date: $date, wage: $wage, totalWageAmount: $totalWageAmount, unionShare: $unionShare, unionSharePercent: $unionSharePercent, companyShare: $companyShare, companySharePercent: $companySharePercent, guildsShare: $guildsShare, guildsSharePercent: $guildsSharePercent, cityShare: $cityShare, citySharePercent: $citySharePercent, walletShare: $walletShare, walletSharePercent: $walletSharePercent, otherShare: $otherShare, otherSharePercent: $otherSharePercent, archiveWage: $archiveWage, weightLoss: $weightLoss, calculateStatus: $calculateStatus, temporaryTrash: $temporaryTrash, temporaryDeleted: $temporaryDeleted, enteredMessage: $enteredMessage, barCode: $barCode, registerType: $registerType, createdBy: $createdBy, modifiedBy: $modifiedBy, product: $product)';
}
}
/// @nodoc
abstract mixin class $KillHouseFreeBarCopyWith<$Res> {
factory $KillHouseFreeBarCopyWith(KillHouseFreeBar value, $Res Function(KillHouseFreeBar) _then) = _$KillHouseFreeBarCopyWithImpl;
@useResult
$Res call({
int? id, dynamic killHouse, dynamic exclusiveKiller, String? key, String? createDate, String? modifyDate, bool? trash, String? poultryName, String? poultryMobile, String? sellerName, String? sellerMobile, String? province, String? city, String? vetFarmName, String? vetFarmMobile, String? driverName, String? driverMobile, String? car, String? clearanceCode, String? barClearanceCode, int? quantity, int? numberOfCarcasses, int? weightOfCarcasses, int? killHouseVetQuantity, int? killHouseVetWeight, String? killHouseVetState, String? dateOfAcceptReject, dynamic acceptorRejector, int? liveWeight, String? barImage, String? buyType, bool? wareHouse, String? date, int? wage, int? totalWageAmount, int? unionShare, int? unionSharePercent, int? companyShare, int? companySharePercent, int? guildsShare, int? guildsSharePercent, int? cityShare, int? citySharePercent, int? walletShare, int? walletSharePercent, int? otherShare, int? otherSharePercent, bool? archiveWage, int? weightLoss, bool? calculateStatus, bool? temporaryTrash, bool? temporaryDeleted, String? enteredMessage, int? barCode, String? registerType, dynamic createdBy, dynamic modifiedBy, int? product
});
}
/// @nodoc
class _$KillHouseFreeBarCopyWithImpl<$Res>
implements $KillHouseFreeBarCopyWith<$Res> {
_$KillHouseFreeBarCopyWithImpl(this._self, this._then);
final KillHouseFreeBar _self;
final $Res Function(KillHouseFreeBar) _then;
/// Create a copy of KillHouseFreeBar
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? id = freezed,Object? killHouse = freezed,Object? exclusiveKiller = freezed,Object? key = freezed,Object? createDate = freezed,Object? modifyDate = freezed,Object? trash = freezed,Object? poultryName = freezed,Object? poultryMobile = freezed,Object? sellerName = freezed,Object? sellerMobile = freezed,Object? province = freezed,Object? city = freezed,Object? vetFarmName = freezed,Object? vetFarmMobile = freezed,Object? driverName = freezed,Object? driverMobile = freezed,Object? car = freezed,Object? clearanceCode = freezed,Object? barClearanceCode = freezed,Object? quantity = freezed,Object? numberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? killHouseVetQuantity = freezed,Object? killHouseVetWeight = freezed,Object? killHouseVetState = freezed,Object? dateOfAcceptReject = freezed,Object? acceptorRejector = freezed,Object? liveWeight = freezed,Object? barImage = freezed,Object? buyType = freezed,Object? wareHouse = freezed,Object? date = freezed,Object? wage = freezed,Object? totalWageAmount = freezed,Object? unionShare = freezed,Object? unionSharePercent = freezed,Object? companyShare = freezed,Object? companySharePercent = freezed,Object? guildsShare = freezed,Object? guildsSharePercent = freezed,Object? cityShare = freezed,Object? citySharePercent = freezed,Object? walletShare = freezed,Object? walletSharePercent = freezed,Object? otherShare = freezed,Object? otherSharePercent = freezed,Object? archiveWage = freezed,Object? weightLoss = freezed,Object? calculateStatus = freezed,Object? temporaryTrash = freezed,Object? temporaryDeleted = freezed,Object? enteredMessage = freezed,Object? barCode = freezed,Object? registerType = freezed,Object? createdBy = freezed,Object? modifiedBy = freezed,Object? product = freezed,}) {
return _then(_self.copyWith(
id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as int?,killHouse: freezed == killHouse ? _self.killHouse : killHouse // ignore: cast_nullable_to_non_nullable
as dynamic,exclusiveKiller: freezed == exclusiveKiller ? _self.exclusiveKiller : exclusiveKiller // ignore: cast_nullable_to_non_nullable
as dynamic,key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
as String?,createDate: freezed == createDate ? _self.createDate : createDate // ignore: cast_nullable_to_non_nullable
as String?,modifyDate: freezed == modifyDate ? _self.modifyDate : modifyDate // ignore: cast_nullable_to_non_nullable
as String?,trash: freezed == trash ? _self.trash : trash // ignore: cast_nullable_to_non_nullable
as bool?,poultryName: freezed == poultryName ? _self.poultryName : poultryName // ignore: cast_nullable_to_non_nullable
as String?,poultryMobile: freezed == poultryMobile ? _self.poultryMobile : poultryMobile // ignore: cast_nullable_to_non_nullable
as String?,sellerName: freezed == sellerName ? _self.sellerName : sellerName // ignore: cast_nullable_to_non_nullable
as String?,sellerMobile: freezed == sellerMobile ? _self.sellerMobile : sellerMobile // ignore: cast_nullable_to_non_nullable
as String?,province: freezed == province ? _self.province : province // ignore: cast_nullable_to_non_nullable
as String?,city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable
as String?,vetFarmName: freezed == vetFarmName ? _self.vetFarmName : vetFarmName // ignore: cast_nullable_to_non_nullable
as String?,vetFarmMobile: freezed == vetFarmMobile ? _self.vetFarmMobile : vetFarmMobile // ignore: cast_nullable_to_non_nullable
as String?,driverName: freezed == driverName ? _self.driverName : driverName // ignore: cast_nullable_to_non_nullable
as String?,driverMobile: freezed == driverMobile ? _self.driverMobile : driverMobile // ignore: cast_nullable_to_non_nullable
as String?,car: freezed == car ? _self.car : car // ignore: cast_nullable_to_non_nullable
as String?,clearanceCode: freezed == clearanceCode ? _self.clearanceCode : clearanceCode // ignore: cast_nullable_to_non_nullable
as String?,barClearanceCode: freezed == barClearanceCode ? _self.barClearanceCode : barClearanceCode // ignore: cast_nullable_to_non_nullable
as String?,quantity: freezed == quantity ? _self.quantity : quantity // ignore: cast_nullable_to_non_nullable
as int?,numberOfCarcasses: freezed == numberOfCarcasses ? _self.numberOfCarcasses : numberOfCarcasses // ignore: cast_nullable_to_non_nullable
as int?,weightOfCarcasses: freezed == weightOfCarcasses ? _self.weightOfCarcasses : weightOfCarcasses // ignore: cast_nullable_to_non_nullable
as int?,killHouseVetQuantity: freezed == killHouseVetQuantity ? _self.killHouseVetQuantity : killHouseVetQuantity // ignore: cast_nullable_to_non_nullable
as int?,killHouseVetWeight: freezed == killHouseVetWeight ? _self.killHouseVetWeight : killHouseVetWeight // ignore: cast_nullable_to_non_nullable
as int?,killHouseVetState: freezed == killHouseVetState ? _self.killHouseVetState : killHouseVetState // ignore: cast_nullable_to_non_nullable
as String?,dateOfAcceptReject: freezed == dateOfAcceptReject ? _self.dateOfAcceptReject : dateOfAcceptReject // ignore: cast_nullable_to_non_nullable
as String?,acceptorRejector: freezed == acceptorRejector ? _self.acceptorRejector : acceptorRejector // ignore: cast_nullable_to_non_nullable
as dynamic,liveWeight: freezed == liveWeight ? _self.liveWeight : liveWeight // ignore: cast_nullable_to_non_nullable
as int?,barImage: freezed == barImage ? _self.barImage : barImage // ignore: cast_nullable_to_non_nullable
as String?,buyType: freezed == buyType ? _self.buyType : buyType // ignore: cast_nullable_to_non_nullable
as String?,wareHouse: freezed == wareHouse ? _self.wareHouse : wareHouse // ignore: cast_nullable_to_non_nullable
as bool?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
as String?,wage: freezed == wage ? _self.wage : wage // ignore: cast_nullable_to_non_nullable
as int?,totalWageAmount: freezed == totalWageAmount ? _self.totalWageAmount : totalWageAmount // ignore: cast_nullable_to_non_nullable
as int?,unionShare: freezed == unionShare ? _self.unionShare : unionShare // ignore: cast_nullable_to_non_nullable
as int?,unionSharePercent: freezed == unionSharePercent ? _self.unionSharePercent : unionSharePercent // ignore: cast_nullable_to_non_nullable
as int?,companyShare: freezed == companyShare ? _self.companyShare : companyShare // ignore: cast_nullable_to_non_nullable
as int?,companySharePercent: freezed == companySharePercent ? _self.companySharePercent : companySharePercent // ignore: cast_nullable_to_non_nullable
as int?,guildsShare: freezed == guildsShare ? _self.guildsShare : guildsShare // ignore: cast_nullable_to_non_nullable
as int?,guildsSharePercent: freezed == guildsSharePercent ? _self.guildsSharePercent : guildsSharePercent // ignore: cast_nullable_to_non_nullable
as int?,cityShare: freezed == cityShare ? _self.cityShare : cityShare // ignore: cast_nullable_to_non_nullable
as int?,citySharePercent: freezed == citySharePercent ? _self.citySharePercent : citySharePercent // ignore: cast_nullable_to_non_nullable
as int?,walletShare: freezed == walletShare ? _self.walletShare : walletShare // ignore: cast_nullable_to_non_nullable
as int?,walletSharePercent: freezed == walletSharePercent ? _self.walletSharePercent : walletSharePercent // ignore: cast_nullable_to_non_nullable
as int?,otherShare: freezed == otherShare ? _self.otherShare : otherShare // ignore: cast_nullable_to_non_nullable
as int?,otherSharePercent: freezed == otherSharePercent ? _self.otherSharePercent : otherSharePercent // ignore: cast_nullable_to_non_nullable
as int?,archiveWage: freezed == archiveWage ? _self.archiveWage : archiveWage // ignore: cast_nullable_to_non_nullable
as bool?,weightLoss: freezed == weightLoss ? _self.weightLoss : weightLoss // ignore: cast_nullable_to_non_nullable
as int?,calculateStatus: freezed == calculateStatus ? _self.calculateStatus : calculateStatus // ignore: cast_nullable_to_non_nullable
as bool?,temporaryTrash: freezed == temporaryTrash ? _self.temporaryTrash : temporaryTrash // ignore: cast_nullable_to_non_nullable
as bool?,temporaryDeleted: freezed == temporaryDeleted ? _self.temporaryDeleted : temporaryDeleted // ignore: cast_nullable_to_non_nullable
as bool?,enteredMessage: freezed == enteredMessage ? _self.enteredMessage : enteredMessage // ignore: cast_nullable_to_non_nullable
as String?,barCode: freezed == barCode ? _self.barCode : barCode // ignore: cast_nullable_to_non_nullable
as int?,registerType: freezed == registerType ? _self.registerType : registerType // ignore: cast_nullable_to_non_nullable
as String?,createdBy: freezed == createdBy ? _self.createdBy : createdBy // ignore: cast_nullable_to_non_nullable
as dynamic,modifiedBy: freezed == modifiedBy ? _self.modifiedBy : modifiedBy // ignore: cast_nullable_to_non_nullable
as dynamic,product: freezed == product ? _self.product : product // ignore: cast_nullable_to_non_nullable
as int?,
));
}
}
/// Adds pattern-matching-related methods to [KillHouseFreeBar].
extension KillHouseFreeBarPatterns on KillHouseFreeBar {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _KillHouseFreeBar value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _KillHouseFreeBar() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _KillHouseFreeBar value) $default,){
final _that = this;
switch (_that) {
case _KillHouseFreeBar():
return $default(_that);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _KillHouseFreeBar value)? $default,){
final _that = this;
switch (_that) {
case _KillHouseFreeBar() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( int? id, dynamic killHouse, dynamic exclusiveKiller, String? key, String? createDate, String? modifyDate, bool? trash, String? poultryName, String? poultryMobile, String? sellerName, String? sellerMobile, String? province, String? city, String? vetFarmName, String? vetFarmMobile, String? driverName, String? driverMobile, String? car, String? clearanceCode, String? barClearanceCode, int? quantity, int? numberOfCarcasses, int? weightOfCarcasses, int? killHouseVetQuantity, int? killHouseVetWeight, String? killHouseVetState, String? dateOfAcceptReject, dynamic acceptorRejector, int? liveWeight, String? barImage, String? buyType, bool? wareHouse, String? date, int? wage, int? totalWageAmount, int? unionShare, int? unionSharePercent, int? companyShare, int? companySharePercent, int? guildsShare, int? guildsSharePercent, int? cityShare, int? citySharePercent, int? walletShare, int? walletSharePercent, int? otherShare, int? otherSharePercent, bool? archiveWage, int? weightLoss, bool? calculateStatus, bool? temporaryTrash, bool? temporaryDeleted, String? enteredMessage, int? barCode, String? registerType, dynamic createdBy, dynamic modifiedBy, int? product)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _KillHouseFreeBar() when $default != null:
return $default(_that.id,_that.killHouse,_that.exclusiveKiller,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.poultryName,_that.poultryMobile,_that.sellerName,_that.sellerMobile,_that.province,_that.city,_that.vetFarmName,_that.vetFarmMobile,_that.driverName,_that.driverMobile,_that.car,_that.clearanceCode,_that.barClearanceCode,_that.quantity,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.killHouseVetQuantity,_that.killHouseVetWeight,_that.killHouseVetState,_that.dateOfAcceptReject,_that.acceptorRejector,_that.liveWeight,_that.barImage,_that.buyType,_that.wareHouse,_that.date,_that.wage,_that.totalWageAmount,_that.unionShare,_that.unionSharePercent,_that.companyShare,_that.companySharePercent,_that.guildsShare,_that.guildsSharePercent,_that.cityShare,_that.citySharePercent,_that.walletShare,_that.walletSharePercent,_that.otherShare,_that.otherSharePercent,_that.archiveWage,_that.weightLoss,_that.calculateStatus,_that.temporaryTrash,_that.temporaryDeleted,_that.enteredMessage,_that.barCode,_that.registerType,_that.createdBy,_that.modifiedBy,_that.product);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( int? id, dynamic killHouse, dynamic exclusiveKiller, String? key, String? createDate, String? modifyDate, bool? trash, String? poultryName, String? poultryMobile, String? sellerName, String? sellerMobile, String? province, String? city, String? vetFarmName, String? vetFarmMobile, String? driverName, String? driverMobile, String? car, String? clearanceCode, String? barClearanceCode, int? quantity, int? numberOfCarcasses, int? weightOfCarcasses, int? killHouseVetQuantity, int? killHouseVetWeight, String? killHouseVetState, String? dateOfAcceptReject, dynamic acceptorRejector, int? liveWeight, String? barImage, String? buyType, bool? wareHouse, String? date, int? wage, int? totalWageAmount, int? unionShare, int? unionSharePercent, int? companyShare, int? companySharePercent, int? guildsShare, int? guildsSharePercent, int? cityShare, int? citySharePercent, int? walletShare, int? walletSharePercent, int? otherShare, int? otherSharePercent, bool? archiveWage, int? weightLoss, bool? calculateStatus, bool? temporaryTrash, bool? temporaryDeleted, String? enteredMessage, int? barCode, String? registerType, dynamic createdBy, dynamic modifiedBy, int? product) $default,) {final _that = this;
switch (_that) {
case _KillHouseFreeBar():
return $default(_that.id,_that.killHouse,_that.exclusiveKiller,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.poultryName,_that.poultryMobile,_that.sellerName,_that.sellerMobile,_that.province,_that.city,_that.vetFarmName,_that.vetFarmMobile,_that.driverName,_that.driverMobile,_that.car,_that.clearanceCode,_that.barClearanceCode,_that.quantity,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.killHouseVetQuantity,_that.killHouseVetWeight,_that.killHouseVetState,_that.dateOfAcceptReject,_that.acceptorRejector,_that.liveWeight,_that.barImage,_that.buyType,_that.wareHouse,_that.date,_that.wage,_that.totalWageAmount,_that.unionShare,_that.unionSharePercent,_that.companyShare,_that.companySharePercent,_that.guildsShare,_that.guildsSharePercent,_that.cityShare,_that.citySharePercent,_that.walletShare,_that.walletSharePercent,_that.otherShare,_that.otherSharePercent,_that.archiveWage,_that.weightLoss,_that.calculateStatus,_that.temporaryTrash,_that.temporaryDeleted,_that.enteredMessage,_that.barCode,_that.registerType,_that.createdBy,_that.modifiedBy,_that.product);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( int? id, dynamic killHouse, dynamic exclusiveKiller, String? key, String? createDate, String? modifyDate, bool? trash, String? poultryName, String? poultryMobile, String? sellerName, String? sellerMobile, String? province, String? city, String? vetFarmName, String? vetFarmMobile, String? driverName, String? driverMobile, String? car, String? clearanceCode, String? barClearanceCode, int? quantity, int? numberOfCarcasses, int? weightOfCarcasses, int? killHouseVetQuantity, int? killHouseVetWeight, String? killHouseVetState, String? dateOfAcceptReject, dynamic acceptorRejector, int? liveWeight, String? barImage, String? buyType, bool? wareHouse, String? date, int? wage, int? totalWageAmount, int? unionShare, int? unionSharePercent, int? companyShare, int? companySharePercent, int? guildsShare, int? guildsSharePercent, int? cityShare, int? citySharePercent, int? walletShare, int? walletSharePercent, int? otherShare, int? otherSharePercent, bool? archiveWage, int? weightLoss, bool? calculateStatus, bool? temporaryTrash, bool? temporaryDeleted, String? enteredMessage, int? barCode, String? registerType, dynamic createdBy, dynamic modifiedBy, int? product)? $default,) {final _that = this;
switch (_that) {
case _KillHouseFreeBar() when $default != null:
return $default(_that.id,_that.killHouse,_that.exclusiveKiller,_that.key,_that.createDate,_that.modifyDate,_that.trash,_that.poultryName,_that.poultryMobile,_that.sellerName,_that.sellerMobile,_that.province,_that.city,_that.vetFarmName,_that.vetFarmMobile,_that.driverName,_that.driverMobile,_that.car,_that.clearanceCode,_that.barClearanceCode,_that.quantity,_that.numberOfCarcasses,_that.weightOfCarcasses,_that.killHouseVetQuantity,_that.killHouseVetWeight,_that.killHouseVetState,_that.dateOfAcceptReject,_that.acceptorRejector,_that.liveWeight,_that.barImage,_that.buyType,_that.wareHouse,_that.date,_that.wage,_that.totalWageAmount,_that.unionShare,_that.unionSharePercent,_that.companyShare,_that.companySharePercent,_that.guildsShare,_that.guildsSharePercent,_that.cityShare,_that.citySharePercent,_that.walletShare,_that.walletSharePercent,_that.otherShare,_that.otherSharePercent,_that.archiveWage,_that.weightLoss,_that.calculateStatus,_that.temporaryTrash,_that.temporaryDeleted,_that.enteredMessage,_that.barCode,_that.registerType,_that.createdBy,_that.modifiedBy,_that.product);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _KillHouseFreeBar implements KillHouseFreeBar {
const _KillHouseFreeBar({this.id, this.killHouse, this.exclusiveKiller, this.key, this.createDate, this.modifyDate, this.trash, this.poultryName, this.poultryMobile, this.sellerName, this.sellerMobile, this.province, this.city, this.vetFarmName, this.vetFarmMobile, this.driverName, this.driverMobile, this.car, this.clearanceCode, this.barClearanceCode, this.quantity, this.numberOfCarcasses, this.weightOfCarcasses, this.killHouseVetQuantity, this.killHouseVetWeight, this.killHouseVetState, this.dateOfAcceptReject, this.acceptorRejector, this.liveWeight, this.barImage, this.buyType, this.wareHouse, this.date, this.wage, this.totalWageAmount, this.unionShare, this.unionSharePercent, this.companyShare, this.companySharePercent, this.guildsShare, this.guildsSharePercent, this.cityShare, this.citySharePercent, this.walletShare, this.walletSharePercent, this.otherShare, this.otherSharePercent, this.archiveWage, this.weightLoss, this.calculateStatus, this.temporaryTrash, this.temporaryDeleted, this.enteredMessage, this.barCode, this.registerType, this.createdBy, this.modifiedBy, this.product});
factory _KillHouseFreeBar.fromJson(Map<String, dynamic> json) => _$KillHouseFreeBarFromJson(json);
@override final int? id;
@override final dynamic killHouse;
@override final dynamic exclusiveKiller;
@override final String? key;
@override final String? createDate;
@override final String? modifyDate;
@override final bool? trash;
@override final String? poultryName;
@override final String? poultryMobile;
@override final String? sellerName;
@override final String? sellerMobile;
@override final String? province;
@override final String? city;
@override final String? vetFarmName;
@override final String? vetFarmMobile;
@override final String? driverName;
@override final String? driverMobile;
@override final String? car;
@override final String? clearanceCode;
@override final String? barClearanceCode;
@override final int? quantity;
@override final int? numberOfCarcasses;
@override final int? weightOfCarcasses;
@override final int? killHouseVetQuantity;
@override final int? killHouseVetWeight;
@override final String? killHouseVetState;
@override final String? dateOfAcceptReject;
@override final dynamic acceptorRejector;
@override final int? liveWeight;
@override final String? barImage;
@override final String? buyType;
@override final bool? wareHouse;
@override final String? date;
@override final int? wage;
@override final int? totalWageAmount;
@override final int? unionShare;
@override final int? unionSharePercent;
@override final int? companyShare;
@override final int? companySharePercent;
@override final int? guildsShare;
@override final int? guildsSharePercent;
@override final int? cityShare;
@override final int? citySharePercent;
@override final int? walletShare;
@override final int? walletSharePercent;
@override final int? otherShare;
@override final int? otherSharePercent;
@override final bool? archiveWage;
@override final int? weightLoss;
@override final bool? calculateStatus;
@override final bool? temporaryTrash;
@override final bool? temporaryDeleted;
@override final String? enteredMessage;
@override final int? barCode;
@override final String? registerType;
@override final dynamic createdBy;
@override final dynamic modifiedBy;
@override final int? product;
/// Create a copy of KillHouseFreeBar
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$KillHouseFreeBarCopyWith<_KillHouseFreeBar> get copyWith => __$KillHouseFreeBarCopyWithImpl<_KillHouseFreeBar>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$KillHouseFreeBarToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _KillHouseFreeBar&&(identical(other.id, id) || other.id == id)&&const DeepCollectionEquality().equals(other.killHouse, killHouse)&&const DeepCollectionEquality().equals(other.exclusiveKiller, exclusiveKiller)&&(identical(other.key, key) || other.key == key)&&(identical(other.createDate, createDate) || other.createDate == createDate)&&(identical(other.modifyDate, modifyDate) || other.modifyDate == modifyDate)&&(identical(other.trash, trash) || other.trash == trash)&&(identical(other.poultryName, poultryName) || other.poultryName == poultryName)&&(identical(other.poultryMobile, poultryMobile) || other.poultryMobile == poultryMobile)&&(identical(other.sellerName, sellerName) || other.sellerName == sellerName)&&(identical(other.sellerMobile, sellerMobile) || other.sellerMobile == sellerMobile)&&(identical(other.province, province) || other.province == province)&&(identical(other.city, city) || other.city == city)&&(identical(other.vetFarmName, vetFarmName) || other.vetFarmName == vetFarmName)&&(identical(other.vetFarmMobile, vetFarmMobile) || other.vetFarmMobile == vetFarmMobile)&&(identical(other.driverName, driverName) || other.driverName == driverName)&&(identical(other.driverMobile, driverMobile) || other.driverMobile == driverMobile)&&(identical(other.car, car) || other.car == car)&&(identical(other.clearanceCode, clearanceCode) || other.clearanceCode == clearanceCode)&&(identical(other.barClearanceCode, barClearanceCode) || other.barClearanceCode == barClearanceCode)&&(identical(other.quantity, quantity) || other.quantity == quantity)&&(identical(other.numberOfCarcasses, numberOfCarcasses) || other.numberOfCarcasses == numberOfCarcasses)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.killHouseVetQuantity, killHouseVetQuantity) || other.killHouseVetQuantity == killHouseVetQuantity)&&(identical(other.killHouseVetWeight, killHouseVetWeight) || other.killHouseVetWeight == killHouseVetWeight)&&(identical(other.killHouseVetState, killHouseVetState) || other.killHouseVetState == killHouseVetState)&&(identical(other.dateOfAcceptReject, dateOfAcceptReject) || other.dateOfAcceptReject == dateOfAcceptReject)&&const DeepCollectionEquality().equals(other.acceptorRejector, acceptorRejector)&&(identical(other.liveWeight, liveWeight) || other.liveWeight == liveWeight)&&(identical(other.barImage, barImage) || other.barImage == barImage)&&(identical(other.buyType, buyType) || other.buyType == buyType)&&(identical(other.wareHouse, wareHouse) || other.wareHouse == wareHouse)&&(identical(other.date, date) || other.date == date)&&(identical(other.wage, wage) || other.wage == wage)&&(identical(other.totalWageAmount, totalWageAmount) || other.totalWageAmount == totalWageAmount)&&(identical(other.unionShare, unionShare) || other.unionShare == unionShare)&&(identical(other.unionSharePercent, unionSharePercent) || other.unionSharePercent == unionSharePercent)&&(identical(other.companyShare, companyShare) || other.companyShare == companyShare)&&(identical(other.companySharePercent, companySharePercent) || other.companySharePercent == companySharePercent)&&(identical(other.guildsShare, guildsShare) || other.guildsShare == guildsShare)&&(identical(other.guildsSharePercent, guildsSharePercent) || other.guildsSharePercent == guildsSharePercent)&&(identical(other.cityShare, cityShare) || other.cityShare == cityShare)&&(identical(other.citySharePercent, citySharePercent) || other.citySharePercent == citySharePercent)&&(identical(other.walletShare, walletShare) || other.walletShare == walletShare)&&(identical(other.walletSharePercent, walletSharePercent) || other.walletSharePercent == walletSharePercent)&&(identical(other.otherShare, otherShare) || other.otherShare == otherShare)&&(identical(other.otherSharePercent, otherSharePercent) || other.otherSharePercent == otherSharePercent)&&(identical(other.archiveWage, archiveWage) || other.archiveWage == archiveWage)&&(identical(other.weightLoss, weightLoss) || other.weightLoss == weightLoss)&&(identical(other.calculateStatus, calculateStatus) || other.calculateStatus == calculateStatus)&&(identical(other.temporaryTrash, temporaryTrash) || other.temporaryTrash == temporaryTrash)&&(identical(other.temporaryDeleted, temporaryDeleted) || other.temporaryDeleted == temporaryDeleted)&&(identical(other.enteredMessage, enteredMessage) || other.enteredMessage == enteredMessage)&&(identical(other.barCode, barCode) || other.barCode == barCode)&&(identical(other.registerType, registerType) || other.registerType == registerType)&&const DeepCollectionEquality().equals(other.createdBy, createdBy)&&const DeepCollectionEquality().equals(other.modifiedBy, modifiedBy)&&(identical(other.product, product) || other.product == product));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hashAll([runtimeType,id,const DeepCollectionEquality().hash(killHouse),const DeepCollectionEquality().hash(exclusiveKiller),key,createDate,modifyDate,trash,poultryName,poultryMobile,sellerName,sellerMobile,province,city,vetFarmName,vetFarmMobile,driverName,driverMobile,car,clearanceCode,barClearanceCode,quantity,numberOfCarcasses,weightOfCarcasses,killHouseVetQuantity,killHouseVetWeight,killHouseVetState,dateOfAcceptReject,const DeepCollectionEquality().hash(acceptorRejector),liveWeight,barImage,buyType,wareHouse,date,wage,totalWageAmount,unionShare,unionSharePercent,companyShare,companySharePercent,guildsShare,guildsSharePercent,cityShare,citySharePercent,walletShare,walletSharePercent,otherShare,otherSharePercent,archiveWage,weightLoss,calculateStatus,temporaryTrash,temporaryDeleted,enteredMessage,barCode,registerType,const DeepCollectionEquality().hash(createdBy),const DeepCollectionEquality().hash(modifiedBy),product]);
@override
String toString() {
return 'KillHouseFreeBar(id: $id, killHouse: $killHouse, exclusiveKiller: $exclusiveKiller, key: $key, createDate: $createDate, modifyDate: $modifyDate, trash: $trash, poultryName: $poultryName, poultryMobile: $poultryMobile, sellerName: $sellerName, sellerMobile: $sellerMobile, province: $province, city: $city, vetFarmName: $vetFarmName, vetFarmMobile: $vetFarmMobile, driverName: $driverName, driverMobile: $driverMobile, car: $car, clearanceCode: $clearanceCode, barClearanceCode: $barClearanceCode, quantity: $quantity, numberOfCarcasses: $numberOfCarcasses, weightOfCarcasses: $weightOfCarcasses, killHouseVetQuantity: $killHouseVetQuantity, killHouseVetWeight: $killHouseVetWeight, killHouseVetState: $killHouseVetState, dateOfAcceptReject: $dateOfAcceptReject, acceptorRejector: $acceptorRejector, liveWeight: $liveWeight, barImage: $barImage, buyType: $buyType, wareHouse: $wareHouse, date: $date, wage: $wage, totalWageAmount: $totalWageAmount, unionShare: $unionShare, unionSharePercent: $unionSharePercent, companyShare: $companyShare, companySharePercent: $companySharePercent, guildsShare: $guildsShare, guildsSharePercent: $guildsSharePercent, cityShare: $cityShare, citySharePercent: $citySharePercent, walletShare: $walletShare, walletSharePercent: $walletSharePercent, otherShare: $otherShare, otherSharePercent: $otherSharePercent, archiveWage: $archiveWage, weightLoss: $weightLoss, calculateStatus: $calculateStatus, temporaryTrash: $temporaryTrash, temporaryDeleted: $temporaryDeleted, enteredMessage: $enteredMessage, barCode: $barCode, registerType: $registerType, createdBy: $createdBy, modifiedBy: $modifiedBy, product: $product)';
}
}
/// @nodoc
abstract mixin class _$KillHouseFreeBarCopyWith<$Res> implements $KillHouseFreeBarCopyWith<$Res> {
factory _$KillHouseFreeBarCopyWith(_KillHouseFreeBar value, $Res Function(_KillHouseFreeBar) _then) = __$KillHouseFreeBarCopyWithImpl;
@override @useResult
$Res call({
int? id, dynamic killHouse, dynamic exclusiveKiller, String? key, String? createDate, String? modifyDate, bool? trash, String? poultryName, String? poultryMobile, String? sellerName, String? sellerMobile, String? province, String? city, String? vetFarmName, String? vetFarmMobile, String? driverName, String? driverMobile, String? car, String? clearanceCode, String? barClearanceCode, int? quantity, int? numberOfCarcasses, int? weightOfCarcasses, int? killHouseVetQuantity, int? killHouseVetWeight, String? killHouseVetState, String? dateOfAcceptReject, dynamic acceptorRejector, int? liveWeight, String? barImage, String? buyType, bool? wareHouse, String? date, int? wage, int? totalWageAmount, int? unionShare, int? unionSharePercent, int? companyShare, int? companySharePercent, int? guildsShare, int? guildsSharePercent, int? cityShare, int? citySharePercent, int? walletShare, int? walletSharePercent, int? otherShare, int? otherSharePercent, bool? archiveWage, int? weightLoss, bool? calculateStatus, bool? temporaryTrash, bool? temporaryDeleted, String? enteredMessage, int? barCode, String? registerType, dynamic createdBy, dynamic modifiedBy, int? product
});
}
/// @nodoc
class __$KillHouseFreeBarCopyWithImpl<$Res>
implements _$KillHouseFreeBarCopyWith<$Res> {
__$KillHouseFreeBarCopyWithImpl(this._self, this._then);
final _KillHouseFreeBar _self;
final $Res Function(_KillHouseFreeBar) _then;
/// Create a copy of KillHouseFreeBar
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? id = freezed,Object? killHouse = freezed,Object? exclusiveKiller = freezed,Object? key = freezed,Object? createDate = freezed,Object? modifyDate = freezed,Object? trash = freezed,Object? poultryName = freezed,Object? poultryMobile = freezed,Object? sellerName = freezed,Object? sellerMobile = freezed,Object? province = freezed,Object? city = freezed,Object? vetFarmName = freezed,Object? vetFarmMobile = freezed,Object? driverName = freezed,Object? driverMobile = freezed,Object? car = freezed,Object? clearanceCode = freezed,Object? barClearanceCode = freezed,Object? quantity = freezed,Object? numberOfCarcasses = freezed,Object? weightOfCarcasses = freezed,Object? killHouseVetQuantity = freezed,Object? killHouseVetWeight = freezed,Object? killHouseVetState = freezed,Object? dateOfAcceptReject = freezed,Object? acceptorRejector = freezed,Object? liveWeight = freezed,Object? barImage = freezed,Object? buyType = freezed,Object? wareHouse = freezed,Object? date = freezed,Object? wage = freezed,Object? totalWageAmount = freezed,Object? unionShare = freezed,Object? unionSharePercent = freezed,Object? companyShare = freezed,Object? companySharePercent = freezed,Object? guildsShare = freezed,Object? guildsSharePercent = freezed,Object? cityShare = freezed,Object? citySharePercent = freezed,Object? walletShare = freezed,Object? walletSharePercent = freezed,Object? otherShare = freezed,Object? otherSharePercent = freezed,Object? archiveWage = freezed,Object? weightLoss = freezed,Object? calculateStatus = freezed,Object? temporaryTrash = freezed,Object? temporaryDeleted = freezed,Object? enteredMessage = freezed,Object? barCode = freezed,Object? registerType = freezed,Object? createdBy = freezed,Object? modifiedBy = freezed,Object? product = freezed,}) {
return _then(_KillHouseFreeBar(
id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as int?,killHouse: freezed == killHouse ? _self.killHouse : killHouse // ignore: cast_nullable_to_non_nullable
as dynamic,exclusiveKiller: freezed == exclusiveKiller ? _self.exclusiveKiller : exclusiveKiller // ignore: cast_nullable_to_non_nullable
as dynamic,key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
as String?,createDate: freezed == createDate ? _self.createDate : createDate // ignore: cast_nullable_to_non_nullable
as String?,modifyDate: freezed == modifyDate ? _self.modifyDate : modifyDate // ignore: cast_nullable_to_non_nullable
as String?,trash: freezed == trash ? _self.trash : trash // ignore: cast_nullable_to_non_nullable
as bool?,poultryName: freezed == poultryName ? _self.poultryName : poultryName // ignore: cast_nullable_to_non_nullable
as String?,poultryMobile: freezed == poultryMobile ? _self.poultryMobile : poultryMobile // ignore: cast_nullable_to_non_nullable
as String?,sellerName: freezed == sellerName ? _self.sellerName : sellerName // ignore: cast_nullable_to_non_nullable
as String?,sellerMobile: freezed == sellerMobile ? _self.sellerMobile : sellerMobile // ignore: cast_nullable_to_non_nullable
as String?,province: freezed == province ? _self.province : province // ignore: cast_nullable_to_non_nullable
as String?,city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable
as String?,vetFarmName: freezed == vetFarmName ? _self.vetFarmName : vetFarmName // ignore: cast_nullable_to_non_nullable
as String?,vetFarmMobile: freezed == vetFarmMobile ? _self.vetFarmMobile : vetFarmMobile // ignore: cast_nullable_to_non_nullable
as String?,driverName: freezed == driverName ? _self.driverName : driverName // ignore: cast_nullable_to_non_nullable
as String?,driverMobile: freezed == driverMobile ? _self.driverMobile : driverMobile // ignore: cast_nullable_to_non_nullable
as String?,car: freezed == car ? _self.car : car // ignore: cast_nullable_to_non_nullable
as String?,clearanceCode: freezed == clearanceCode ? _self.clearanceCode : clearanceCode // ignore: cast_nullable_to_non_nullable
as String?,barClearanceCode: freezed == barClearanceCode ? _self.barClearanceCode : barClearanceCode // ignore: cast_nullable_to_non_nullable
as String?,quantity: freezed == quantity ? _self.quantity : quantity // ignore: cast_nullable_to_non_nullable
as int?,numberOfCarcasses: freezed == numberOfCarcasses ? _self.numberOfCarcasses : numberOfCarcasses // ignore: cast_nullable_to_non_nullable
as int?,weightOfCarcasses: freezed == weightOfCarcasses ? _self.weightOfCarcasses : weightOfCarcasses // ignore: cast_nullable_to_non_nullable
as int?,killHouseVetQuantity: freezed == killHouseVetQuantity ? _self.killHouseVetQuantity : killHouseVetQuantity // ignore: cast_nullable_to_non_nullable
as int?,killHouseVetWeight: freezed == killHouseVetWeight ? _self.killHouseVetWeight : killHouseVetWeight // ignore: cast_nullable_to_non_nullable
as int?,killHouseVetState: freezed == killHouseVetState ? _self.killHouseVetState : killHouseVetState // ignore: cast_nullable_to_non_nullable
as String?,dateOfAcceptReject: freezed == dateOfAcceptReject ? _self.dateOfAcceptReject : dateOfAcceptReject // ignore: cast_nullable_to_non_nullable
as String?,acceptorRejector: freezed == acceptorRejector ? _self.acceptorRejector : acceptorRejector // ignore: cast_nullable_to_non_nullable
as dynamic,liveWeight: freezed == liveWeight ? _self.liveWeight : liveWeight // ignore: cast_nullable_to_non_nullable
as int?,barImage: freezed == barImage ? _self.barImage : barImage // ignore: cast_nullable_to_non_nullable
as String?,buyType: freezed == buyType ? _self.buyType : buyType // ignore: cast_nullable_to_non_nullable
as String?,wareHouse: freezed == wareHouse ? _self.wareHouse : wareHouse // ignore: cast_nullable_to_non_nullable
as bool?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
as String?,wage: freezed == wage ? _self.wage : wage // ignore: cast_nullable_to_non_nullable
as int?,totalWageAmount: freezed == totalWageAmount ? _self.totalWageAmount : totalWageAmount // ignore: cast_nullable_to_non_nullable
as int?,unionShare: freezed == unionShare ? _self.unionShare : unionShare // ignore: cast_nullable_to_non_nullable
as int?,unionSharePercent: freezed == unionSharePercent ? _self.unionSharePercent : unionSharePercent // ignore: cast_nullable_to_non_nullable
as int?,companyShare: freezed == companyShare ? _self.companyShare : companyShare // ignore: cast_nullable_to_non_nullable
as int?,companySharePercent: freezed == companySharePercent ? _self.companySharePercent : companySharePercent // ignore: cast_nullable_to_non_nullable
as int?,guildsShare: freezed == guildsShare ? _self.guildsShare : guildsShare // ignore: cast_nullable_to_non_nullable
as int?,guildsSharePercent: freezed == guildsSharePercent ? _self.guildsSharePercent : guildsSharePercent // ignore: cast_nullable_to_non_nullable
as int?,cityShare: freezed == cityShare ? _self.cityShare : cityShare // ignore: cast_nullable_to_non_nullable
as int?,citySharePercent: freezed == citySharePercent ? _self.citySharePercent : citySharePercent // ignore: cast_nullable_to_non_nullable
as int?,walletShare: freezed == walletShare ? _self.walletShare : walletShare // ignore: cast_nullable_to_non_nullable
as int?,walletSharePercent: freezed == walletSharePercent ? _self.walletSharePercent : walletSharePercent // ignore: cast_nullable_to_non_nullable
as int?,otherShare: freezed == otherShare ? _self.otherShare : otherShare // ignore: cast_nullable_to_non_nullable
as int?,otherSharePercent: freezed == otherSharePercent ? _self.otherSharePercent : otherSharePercent // ignore: cast_nullable_to_non_nullable
as int?,archiveWage: freezed == archiveWage ? _self.archiveWage : archiveWage // ignore: cast_nullable_to_non_nullable
as bool?,weightLoss: freezed == weightLoss ? _self.weightLoss : weightLoss // ignore: cast_nullable_to_non_nullable
as int?,calculateStatus: freezed == calculateStatus ? _self.calculateStatus : calculateStatus // ignore: cast_nullable_to_non_nullable
as bool?,temporaryTrash: freezed == temporaryTrash ? _self.temporaryTrash : temporaryTrash // ignore: cast_nullable_to_non_nullable
as bool?,temporaryDeleted: freezed == temporaryDeleted ? _self.temporaryDeleted : temporaryDeleted // ignore: cast_nullable_to_non_nullable
as bool?,enteredMessage: freezed == enteredMessage ? _self.enteredMessage : enteredMessage // ignore: cast_nullable_to_non_nullable
as String?,barCode: freezed == barCode ? _self.barCode : barCode // ignore: cast_nullable_to_non_nullable
as int?,registerType: freezed == registerType ? _self.registerType : registerType // ignore: cast_nullable_to_non_nullable
as String?,createdBy: freezed == createdBy ? _self.createdBy : createdBy // ignore: cast_nullable_to_non_nullable
as dynamic,modifiedBy: freezed == modifiedBy ? _self.modifiedBy : modifiedBy // ignore: cast_nullable_to_non_nullable
as dynamic,product: freezed == product ? _self.product : product // ignore: cast_nullable_to_non_nullable
as int?,
));
}
}
// dart format on

View File

@@ -0,0 +1,131 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'kill_house_free_bar.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_KillHouseFreeBar _$KillHouseFreeBarFromJson(Map<String, dynamic> json) =>
_KillHouseFreeBar(
id: (json['id'] as num?)?.toInt(),
killHouse: json['kill_house'],
exclusiveKiller: json['exclusive_killer'],
key: json['key'] as String?,
createDate: json['create_date'] as String?,
modifyDate: json['modify_date'] as String?,
trash: json['trash'] as bool?,
poultryName: json['poultry_name'] as String?,
poultryMobile: json['poultry_mobile'] as String?,
sellerName: json['seller_name'] as String?,
sellerMobile: json['seller_mobile'] as String?,
province: json['province'] as String?,
city: json['city'] as String?,
vetFarmName: json['vet_farm_name'] as String?,
vetFarmMobile: json['vet_farm_mobile'] as String?,
driverName: json['driver_name'] as String?,
driverMobile: json['driver_mobile'] as String?,
car: json['car'] as String?,
clearanceCode: json['clearance_code'] as String?,
barClearanceCode: json['bar_clearance_code'] as String?,
quantity: (json['quantity'] as num?)?.toInt(),
numberOfCarcasses: (json['number_of_carcasses'] as num?)?.toInt(),
weightOfCarcasses: (json['weight_of_carcasses'] as num?)?.toInt(),
killHouseVetQuantity: (json['kill_house_vet_quantity'] as num?)?.toInt(),
killHouseVetWeight: (json['kill_house_vet_weight'] as num?)?.toInt(),
killHouseVetState: json['kill_house_vet_state'] as String?,
dateOfAcceptReject: json['date_of_accept_reject'] as String?,
acceptorRejector: json['acceptor_rejector'],
liveWeight: (json['live_weight'] as num?)?.toInt(),
barImage: json['bar_image'] as String?,
buyType: json['buy_type'] as String?,
wareHouse: json['ware_house'] as bool?,
date: json['date'] as String?,
wage: (json['wage'] as num?)?.toInt(),
totalWageAmount: (json['total_wage_amount'] as num?)?.toInt(),
unionShare: (json['union_share'] as num?)?.toInt(),
unionSharePercent: (json['union_share_percent'] as num?)?.toInt(),
companyShare: (json['company_share'] as num?)?.toInt(),
companySharePercent: (json['company_share_percent'] as num?)?.toInt(),
guildsShare: (json['guilds_share'] as num?)?.toInt(),
guildsSharePercent: (json['guilds_share_percent'] as num?)?.toInt(),
cityShare: (json['city_share'] as num?)?.toInt(),
citySharePercent: (json['city_share_percent'] as num?)?.toInt(),
walletShare: (json['wallet_share'] as num?)?.toInt(),
walletSharePercent: (json['wallet_share_percent'] as num?)?.toInt(),
otherShare: (json['other_share'] as num?)?.toInt(),
otherSharePercent: (json['other_share_percent'] as num?)?.toInt(),
archiveWage: json['archive_wage'] as bool?,
weightLoss: (json['weight_loss'] as num?)?.toInt(),
calculateStatus: json['calculate_status'] as bool?,
temporaryTrash: json['temporary_trash'] as bool?,
temporaryDeleted: json['temporary_deleted'] as bool?,
enteredMessage: json['entered_message'] as String?,
barCode: (json['bar_code'] as num?)?.toInt(),
registerType: json['register_type'] as String?,
createdBy: json['created_by'],
modifiedBy: json['modified_by'],
product: (json['product'] as num?)?.toInt(),
);
Map<String, dynamic> _$KillHouseFreeBarToJson(_KillHouseFreeBar instance) =>
<String, dynamic>{
'id': instance.id,
'kill_house': instance.killHouse,
'exclusive_killer': instance.exclusiveKiller,
'key': instance.key,
'create_date': instance.createDate,
'modify_date': instance.modifyDate,
'trash': instance.trash,
'poultry_name': instance.poultryName,
'poultry_mobile': instance.poultryMobile,
'seller_name': instance.sellerName,
'seller_mobile': instance.sellerMobile,
'province': instance.province,
'city': instance.city,
'vet_farm_name': instance.vetFarmName,
'vet_farm_mobile': instance.vetFarmMobile,
'driver_name': instance.driverName,
'driver_mobile': instance.driverMobile,
'car': instance.car,
'clearance_code': instance.clearanceCode,
'bar_clearance_code': instance.barClearanceCode,
'quantity': instance.quantity,
'number_of_carcasses': instance.numberOfCarcasses,
'weight_of_carcasses': instance.weightOfCarcasses,
'kill_house_vet_quantity': instance.killHouseVetQuantity,
'kill_house_vet_weight': instance.killHouseVetWeight,
'kill_house_vet_state': instance.killHouseVetState,
'date_of_accept_reject': instance.dateOfAcceptReject,
'acceptor_rejector': instance.acceptorRejector,
'live_weight': instance.liveWeight,
'bar_image': instance.barImage,
'buy_type': instance.buyType,
'ware_house': instance.wareHouse,
'date': instance.date,
'wage': instance.wage,
'total_wage_amount': instance.totalWageAmount,
'union_share': instance.unionShare,
'union_share_percent': instance.unionSharePercent,
'company_share': instance.companyShare,
'company_share_percent': instance.companySharePercent,
'guilds_share': instance.guildsShare,
'guilds_share_percent': instance.guildsSharePercent,
'city_share': instance.cityShare,
'city_share_percent': instance.citySharePercent,
'wallet_share': instance.walletShare,
'wallet_share_percent': instance.walletSharePercent,
'other_share': instance.otherShare,
'other_share_percent': instance.otherSharePercent,
'archive_wage': instance.archiveWage,
'weight_loss': instance.weightLoss,
'calculate_status': instance.calculateStatus,
'temporary_trash': instance.temporaryTrash,
'temporary_deleted': instance.temporaryDeleted,
'entered_message': instance.enteredMessage,
'bar_code': instance.barCode,
'register_type': instance.registerType,
'created_by': instance.createdBy,
'modified_by': instance.modifiedBy,
'product': instance.product,
};

View File

@@ -0,0 +1,67 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'roles_products.freezed.dart';
part 'roles_products.g.dart';
@freezed
abstract class RolesProductsModel with _$RolesProductsModel {
factory RolesProductsModel({required List<ProductModel> products}) =
_RolesProductsModel;
factory RolesProductsModel.fromJson(Map<String, dynamic> json) =>
_$RolesProductsModelFromJson(json);
}
@freezed
abstract class ProductModel with _$ProductModel {
factory ProductModel({
int? id,
String? key,
String? create_date, // Changed from createDate, removed @JsonKey
String? modify_date, // Changed from modifyDate, removed @JsonKey
bool? trash,
String? name,
int? provinceGovernmentalCarcassesQuantity,
int? provinceGovernmentalCarcassesWeight,
int? provinceFreeCarcassesQuantity,
int? provinceFreeCarcassesWeight,
int? receiveGovernmentalCarcassesQuantity,
int? receiveGovernmentalCarcassesWeight,
int? receiveFreeCarcassesQuantity,
int? receiveFreeCarcassesWeight,
int? freeBuyingCarcassesQuantity,
int? freeBuyingCarcassesWeight,
int? totalGovernmentalCarcassesQuantity,
int? totalGovernmentalCarcassesWeight,
int? totalFreeBarsCarcassesQuantity,
int? totalFreeBarsCarcassesWeight,
double? weightAverage,
int? totalCarcassesQuantity,
int? totalCarcassesWeight,
int? freezingQuantity,
int? freezingWeight,
int? lossWeight,
int? outProvinceAllocatedQuantity,
int? outProvinceAllocatedWeight,
int? provinceAllocatedQuantity,
int? provinceAllocatedWeight,
int? realAllocatedQuantity,
int? realAllocatedWeight,
int? coldHouseAllocatedWeight,
int? posAllocatedWeight,
int? segmentationWeight,
int? totalRemainQuantity,
int? totalRemainWeight,
int? freePrice,
int? approvedPrice,
bool? approvedPriceStatus,
dynamic createdBy,
dynamic modifiedBy,
int? parentProduct,
dynamic killHouse,
int? guild,
}) = _ProductModel;
factory ProductModel.fromJson(Map<String, dynamic> json) =>
_$ProductModelFromJson(json);
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,141 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'roles_products.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_RolesProductsModel _$RolesProductsModelFromJson(Map<String, dynamic> json) =>
_RolesProductsModel(
products: (json['products'] as List<dynamic>)
.map((e) => ProductModel.fromJson(e as Map<String, dynamic>))
.toList(),
);
Map<String, dynamic> _$RolesProductsModelToJson(_RolesProductsModel instance) =>
<String, dynamic>{'products': instance.products};
_ProductModel _$ProductModelFromJson(
Map<String, dynamic> json,
) => _ProductModel(
id: (json['id'] as num?)?.toInt(),
key: json['key'] as String?,
create_date: json['create_date'] as String?,
modify_date: json['modify_date'] as String?,
trash: json['trash'] as bool?,
name: json['name'] as String?,
provinceGovernmentalCarcassesQuantity:
(json['province_governmental_carcasses_quantity'] as num?)?.toInt(),
provinceGovernmentalCarcassesWeight:
(json['province_governmental_carcasses_weight'] as num?)?.toInt(),
provinceFreeCarcassesQuantity:
(json['province_free_carcasses_quantity'] as num?)?.toInt(),
provinceFreeCarcassesWeight: (json['province_free_carcasses_weight'] as num?)
?.toInt(),
receiveGovernmentalCarcassesQuantity:
(json['receive_governmental_carcasses_quantity'] as num?)?.toInt(),
receiveGovernmentalCarcassesWeight:
(json['receive_governmental_carcasses_weight'] as num?)?.toInt(),
receiveFreeCarcassesQuantity:
(json['receive_free_carcasses_quantity'] as num?)?.toInt(),
receiveFreeCarcassesWeight: (json['receive_free_carcasses_weight'] as num?)
?.toInt(),
freeBuyingCarcassesQuantity: (json['free_buying_carcasses_quantity'] as num?)
?.toInt(),
freeBuyingCarcassesWeight: (json['free_buying_carcasses_weight'] as num?)
?.toInt(),
totalGovernmentalCarcassesQuantity:
(json['total_governmental_carcasses_quantity'] as num?)?.toInt(),
totalGovernmentalCarcassesWeight:
(json['total_governmental_carcasses_weight'] as num?)?.toInt(),
totalFreeBarsCarcassesQuantity:
(json['total_free_bars_carcasses_quantity'] as num?)?.toInt(),
totalFreeBarsCarcassesWeight:
(json['total_free_bars_carcasses_weight'] as num?)?.toInt(),
weightAverage: (json['weight_average'] as num?)?.toDouble(),
totalCarcassesQuantity: (json['total_carcasses_quantity'] as num?)?.toInt(),
totalCarcassesWeight: (json['total_carcasses_weight'] as num?)?.toInt(),
freezingQuantity: (json['freezing_quantity'] as num?)?.toInt(),
freezingWeight: (json['freezing_weight'] as num?)?.toInt(),
lossWeight: (json['loss_weight'] as num?)?.toInt(),
outProvinceAllocatedQuantity:
(json['out_province_allocated_quantity'] as num?)?.toInt(),
outProvinceAllocatedWeight: (json['out_province_allocated_weight'] as num?)
?.toInt(),
provinceAllocatedQuantity: (json['province_allocated_quantity'] as num?)
?.toInt(),
provinceAllocatedWeight: (json['province_allocated_weight'] as num?)?.toInt(),
realAllocatedQuantity: (json['real_allocated_quantity'] as num?)?.toInt(),
realAllocatedWeight: (json['real_allocated_weight'] as num?)?.toInt(),
coldHouseAllocatedWeight: (json['cold_house_allocated_weight'] as num?)
?.toInt(),
posAllocatedWeight: (json['pos_allocated_weight'] as num?)?.toInt(),
segmentationWeight: (json['segmentation_weight'] as num?)?.toInt(),
totalRemainQuantity: (json['total_remain_quantity'] as num?)?.toInt(),
totalRemainWeight: (json['total_remain_weight'] as num?)?.toInt(),
freePrice: (json['free_price'] as num?)?.toInt(),
approvedPrice: (json['approved_price'] as num?)?.toInt(),
approvedPriceStatus: json['approved_price_status'] as bool?,
createdBy: json['created_by'],
modifiedBy: json['modified_by'],
parentProduct: (json['parent_product'] as num?)?.toInt(),
killHouse: json['kill_house'],
guild: (json['guild'] as num?)?.toInt(),
);
Map<String, dynamic> _$ProductModelToJson(
_ProductModel instance,
) => <String, dynamic>{
'id': instance.id,
'key': instance.key,
'create_date': instance.create_date,
'modify_date': instance.modify_date,
'trash': instance.trash,
'name': instance.name,
'province_governmental_carcasses_quantity':
instance.provinceGovernmentalCarcassesQuantity,
'province_governmental_carcasses_weight':
instance.provinceGovernmentalCarcassesWeight,
'province_free_carcasses_quantity': instance.provinceFreeCarcassesQuantity,
'province_free_carcasses_weight': instance.provinceFreeCarcassesWeight,
'receive_governmental_carcasses_quantity':
instance.receiveGovernmentalCarcassesQuantity,
'receive_governmental_carcasses_weight':
instance.receiveGovernmentalCarcassesWeight,
'receive_free_carcasses_quantity': instance.receiveFreeCarcassesQuantity,
'receive_free_carcasses_weight': instance.receiveFreeCarcassesWeight,
'free_buying_carcasses_quantity': instance.freeBuyingCarcassesQuantity,
'free_buying_carcasses_weight': instance.freeBuyingCarcassesWeight,
'total_governmental_carcasses_quantity':
instance.totalGovernmentalCarcassesQuantity,
'total_governmental_carcasses_weight':
instance.totalGovernmentalCarcassesWeight,
'total_free_bars_carcasses_quantity': instance.totalFreeBarsCarcassesQuantity,
'total_free_bars_carcasses_weight': instance.totalFreeBarsCarcassesWeight,
'weight_average': instance.weightAverage,
'total_carcasses_quantity': instance.totalCarcassesQuantity,
'total_carcasses_weight': instance.totalCarcassesWeight,
'freezing_quantity': instance.freezingQuantity,
'freezing_weight': instance.freezingWeight,
'loss_weight': instance.lossWeight,
'out_province_allocated_quantity': instance.outProvinceAllocatedQuantity,
'out_province_allocated_weight': instance.outProvinceAllocatedWeight,
'province_allocated_quantity': instance.provinceAllocatedQuantity,
'province_allocated_weight': instance.provinceAllocatedWeight,
'real_allocated_quantity': instance.realAllocatedQuantity,
'real_allocated_weight': instance.realAllocatedWeight,
'cold_house_allocated_weight': instance.coldHouseAllocatedWeight,
'pos_allocated_weight': instance.posAllocatedWeight,
'segmentation_weight': instance.segmentationWeight,
'total_remain_quantity': instance.totalRemainQuantity,
'total_remain_weight': instance.totalRemainWeight,
'free_price': instance.freePrice,
'approved_price': instance.approvedPrice,
'approved_price_status': instance.approvedPriceStatus,
'created_by': instance.createdBy,
'modified_by': instance.modifiedBy,
'parent_product': instance.parentProduct,
'kill_house': instance.killHouse,
'guild': instance.guild,
};

View File

@@ -0,0 +1,18 @@
import 'package:rasadyar_core/core.dart';
part 'user_info_model.freezed.dart';
part 'user_info_model.g.dart';
@freezed
abstract class UserInfoModel with _$UserInfoModel {
const factory UserInfoModel({
bool? isUser,
String? address,
String? backend,
String? apiKey,
}) = _UserInfoModel ;
factory UserInfoModel.fromJson(Map<String, dynamic> json) =>
_$UserInfoModelFromJson(json);
}

View File

@@ -0,0 +1,286 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'user_info_model.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$UserInfoModel {
bool? get isUser; String? get address; String? get backend; String? get apiKey;
/// Create a copy of UserInfoModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$UserInfoModelCopyWith<UserInfoModel> get copyWith => _$UserInfoModelCopyWithImpl<UserInfoModel>(this as UserInfoModel, _$identity);
/// Serializes this UserInfoModel to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is UserInfoModel&&(identical(other.isUser, isUser) || other.isUser == isUser)&&(identical(other.address, address) || other.address == address)&&(identical(other.backend, backend) || other.backend == backend)&&(identical(other.apiKey, apiKey) || other.apiKey == apiKey));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,isUser,address,backend,apiKey);
@override
String toString() {
return 'UserInfoModel(isUser: $isUser, address: $address, backend: $backend, apiKey: $apiKey)';
}
}
/// @nodoc
abstract mixin class $UserInfoModelCopyWith<$Res> {
factory $UserInfoModelCopyWith(UserInfoModel value, $Res Function(UserInfoModel) _then) = _$UserInfoModelCopyWithImpl;
@useResult
$Res call({
bool? isUser, String? address, String? backend, String? apiKey
});
}
/// @nodoc
class _$UserInfoModelCopyWithImpl<$Res>
implements $UserInfoModelCopyWith<$Res> {
_$UserInfoModelCopyWithImpl(this._self, this._then);
final UserInfoModel _self;
final $Res Function(UserInfoModel) _then;
/// Create a copy of UserInfoModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? isUser = freezed,Object? address = freezed,Object? backend = freezed,Object? apiKey = freezed,}) {
return _then(_self.copyWith(
isUser: freezed == isUser ? _self.isUser : isUser // ignore: cast_nullable_to_non_nullable
as bool?,address: freezed == address ? _self.address : address // ignore: cast_nullable_to_non_nullable
as String?,backend: freezed == backend ? _self.backend : backend // ignore: cast_nullable_to_non_nullable
as String?,apiKey: freezed == apiKey ? _self.apiKey : apiKey // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// Adds pattern-matching-related methods to [UserInfoModel].
extension UserInfoModelPatterns on UserInfoModel {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _UserInfoModel value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _UserInfoModel() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _UserInfoModel value) $default,){
final _that = this;
switch (_that) {
case _UserInfoModel():
return $default(_that);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _UserInfoModel value)? $default,){
final _that = this;
switch (_that) {
case _UserInfoModel() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool? isUser, String? address, String? backend, String? apiKey)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _UserInfoModel() when $default != null:
return $default(_that.isUser,_that.address,_that.backend,_that.apiKey);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool? isUser, String? address, String? backend, String? apiKey) $default,) {final _that = this;
switch (_that) {
case _UserInfoModel():
return $default(_that.isUser,_that.address,_that.backend,_that.apiKey);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool? isUser, String? address, String? backend, String? apiKey)? $default,) {final _that = this;
switch (_that) {
case _UserInfoModel() when $default != null:
return $default(_that.isUser,_that.address,_that.backend,_that.apiKey);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _UserInfoModel implements UserInfoModel {
const _UserInfoModel({this.isUser, this.address, this.backend, this.apiKey});
factory _UserInfoModel.fromJson(Map<String, dynamic> json) => _$UserInfoModelFromJson(json);
@override final bool? isUser;
@override final String? address;
@override final String? backend;
@override final String? apiKey;
/// Create a copy of UserInfoModel
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$UserInfoModelCopyWith<_UserInfoModel> get copyWith => __$UserInfoModelCopyWithImpl<_UserInfoModel>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$UserInfoModelToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _UserInfoModel&&(identical(other.isUser, isUser) || other.isUser == isUser)&&(identical(other.address, address) || other.address == address)&&(identical(other.backend, backend) || other.backend == backend)&&(identical(other.apiKey, apiKey) || other.apiKey == apiKey));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,isUser,address,backend,apiKey);
@override
String toString() {
return 'UserInfoModel(isUser: $isUser, address: $address, backend: $backend, apiKey: $apiKey)';
}
}
/// @nodoc
abstract mixin class _$UserInfoModelCopyWith<$Res> implements $UserInfoModelCopyWith<$Res> {
factory _$UserInfoModelCopyWith(_UserInfoModel value, $Res Function(_UserInfoModel) _then) = __$UserInfoModelCopyWithImpl;
@override @useResult
$Res call({
bool? isUser, String? address, String? backend, String? apiKey
});
}
/// @nodoc
class __$UserInfoModelCopyWithImpl<$Res>
implements _$UserInfoModelCopyWith<$Res> {
__$UserInfoModelCopyWithImpl(this._self, this._then);
final _UserInfoModel _self;
final $Res Function(_UserInfoModel) _then;
/// Create a copy of UserInfoModel
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? isUser = freezed,Object? address = freezed,Object? backend = freezed,Object? apiKey = freezed,}) {
return _then(_UserInfoModel(
isUser: freezed == isUser ? _self.isUser : isUser // ignore: cast_nullable_to_non_nullable
as bool?,address: freezed == address ? _self.address : address // ignore: cast_nullable_to_non_nullable
as String?,backend: freezed == backend ? _self.backend : backend // ignore: cast_nullable_to_non_nullable
as String?,apiKey: freezed == apiKey ? _self.apiKey : apiKey // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
// dart format on

View File

@@ -0,0 +1,23 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'user_info_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_UserInfoModel _$UserInfoModelFromJson(Map<String, dynamic> json) =>
_UserInfoModel(
isUser: json['is_user'] as bool?,
address: json['address'] as String?,
backend: json['backend'] as String?,
apiKey: json['api_key'] as String?,
);
Map<String, dynamic> _$UserInfoModelToJson(_UserInfoModel instance) =>
<String, dynamic>{
'is_user': instance.isUser,
'address': instance.address,
'backend': instance.backend,
'api_key': instance.apiKey,
};

View File

@@ -0,0 +1,65 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'user_profile.freezed.dart';
part 'user_profile.g.dart';
@freezed
abstract class UserProfile with _$UserProfile {
const factory UserProfile({
List<String>? role,
String? city,
String? province,
String? key,
String? userGateWayId,
dynamic userDjangoIdForeignKey,
dynamic provinceIdForeignKey,
dynamic cityIdForeignKey,
dynamic systemUserProfileIdKey,
String? fullname,
String? firstName,
String? lastName,
String? nationalCode,
String? nationalCodeImage,
String? nationalId,
String? mobile,
String? birthday,
String? image,
String? password,
bool? active,
UserState? state,
int? baseOrder,
int? cityNumber,
String? cityName,
int? provinceNumber,
String? provinceName,
String? unitName,
String? unitNationalId,
String? unitRegistrationNumber,
String? unitEconomicalNumber,
String? unitProvince,
String? unitCity,
String? unitPostalCode,
String? unitAddress,
String? personType,
String? type,
}) = _UserProfile;
factory UserProfile.fromJson(Map<String, dynamic> json) => _$UserProfileFromJson(json);
}
@freezed
abstract class UserState with _$UserState {
const factory UserState({
String? city,
String? image,
String? mobile,
String? birthday,
String? province,
String? lastName,
String? firstName,
String? nationalId,
String? nationalCode,
}) = _UserState;
factory UserState.fromJson(Map<String, dynamic> json) => _$UserStateFromJson(json);
}

View File

@@ -0,0 +1,701 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'user_profile.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$UserProfile {
List<String>? get role; String? get city; String? get province; String? get key; String? get userGateWayId; dynamic get userDjangoIdForeignKey; dynamic get provinceIdForeignKey; dynamic get cityIdForeignKey; dynamic get systemUserProfileIdKey; String? get fullname; String? get firstName; String? get lastName; String? get nationalCode; String? get nationalCodeImage; String? get nationalId; String? get mobile; String? get birthday; String? get image; String? get password; bool? get active; UserState? get state; int? get baseOrder; int? get cityNumber; String? get cityName; int? get provinceNumber; String? get provinceName; String? get unitName; String? get unitNationalId; String? get unitRegistrationNumber; String? get unitEconomicalNumber; String? get unitProvince; String? get unitCity; String? get unitPostalCode; String? get unitAddress; String? get personType; String? get type;
/// Create a copy of UserProfile
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$UserProfileCopyWith<UserProfile> get copyWith => _$UserProfileCopyWithImpl<UserProfile>(this as UserProfile, _$identity);
/// Serializes this UserProfile to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is UserProfile&&const DeepCollectionEquality().equals(other.role, role)&&(identical(other.city, city) || other.city == city)&&(identical(other.province, province) || other.province == province)&&(identical(other.key, key) || other.key == key)&&(identical(other.userGateWayId, userGateWayId) || other.userGateWayId == userGateWayId)&&const DeepCollectionEquality().equals(other.userDjangoIdForeignKey, userDjangoIdForeignKey)&&const DeepCollectionEquality().equals(other.provinceIdForeignKey, provinceIdForeignKey)&&const DeepCollectionEquality().equals(other.cityIdForeignKey, cityIdForeignKey)&&const DeepCollectionEquality().equals(other.systemUserProfileIdKey, systemUserProfileIdKey)&&(identical(other.fullname, fullname) || other.fullname == fullname)&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.nationalCode, nationalCode) || other.nationalCode == nationalCode)&&(identical(other.nationalCodeImage, nationalCodeImage) || other.nationalCodeImage == nationalCodeImage)&&(identical(other.nationalId, nationalId) || other.nationalId == nationalId)&&(identical(other.mobile, mobile) || other.mobile == mobile)&&(identical(other.birthday, birthday) || other.birthday == birthday)&&(identical(other.image, image) || other.image == image)&&(identical(other.password, password) || other.password == password)&&(identical(other.active, active) || other.active == active)&&(identical(other.state, state) || other.state == state)&&(identical(other.baseOrder, baseOrder) || other.baseOrder == baseOrder)&&(identical(other.cityNumber, cityNumber) || other.cityNumber == cityNumber)&&(identical(other.cityName, cityName) || other.cityName == cityName)&&(identical(other.provinceNumber, provinceNumber) || other.provinceNumber == provinceNumber)&&(identical(other.provinceName, provinceName) || other.provinceName == provinceName)&&(identical(other.unitName, unitName) || other.unitName == unitName)&&(identical(other.unitNationalId, unitNationalId) || other.unitNationalId == unitNationalId)&&(identical(other.unitRegistrationNumber, unitRegistrationNumber) || other.unitRegistrationNumber == unitRegistrationNumber)&&(identical(other.unitEconomicalNumber, unitEconomicalNumber) || other.unitEconomicalNumber == unitEconomicalNumber)&&(identical(other.unitProvince, unitProvince) || other.unitProvince == unitProvince)&&(identical(other.unitCity, unitCity) || other.unitCity == unitCity)&&(identical(other.unitPostalCode, unitPostalCode) || other.unitPostalCode == unitPostalCode)&&(identical(other.unitAddress, unitAddress) || other.unitAddress == unitAddress)&&(identical(other.personType, personType) || other.personType == personType)&&(identical(other.type, type) || other.type == type));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hashAll([runtimeType,const DeepCollectionEquality().hash(role),city,province,key,userGateWayId,const DeepCollectionEquality().hash(userDjangoIdForeignKey),const DeepCollectionEquality().hash(provinceIdForeignKey),const DeepCollectionEquality().hash(cityIdForeignKey),const DeepCollectionEquality().hash(systemUserProfileIdKey),fullname,firstName,lastName,nationalCode,nationalCodeImage,nationalId,mobile,birthday,image,password,active,state,baseOrder,cityNumber,cityName,provinceNumber,provinceName,unitName,unitNationalId,unitRegistrationNumber,unitEconomicalNumber,unitProvince,unitCity,unitPostalCode,unitAddress,personType,type]);
@override
String toString() {
return 'UserProfile(role: $role, city: $city, province: $province, key: $key, userGateWayId: $userGateWayId, userDjangoIdForeignKey: $userDjangoIdForeignKey, provinceIdForeignKey: $provinceIdForeignKey, cityIdForeignKey: $cityIdForeignKey, systemUserProfileIdKey: $systemUserProfileIdKey, fullname: $fullname, firstName: $firstName, lastName: $lastName, nationalCode: $nationalCode, nationalCodeImage: $nationalCodeImage, nationalId: $nationalId, mobile: $mobile, birthday: $birthday, image: $image, password: $password, active: $active, state: $state, baseOrder: $baseOrder, cityNumber: $cityNumber, cityName: $cityName, provinceNumber: $provinceNumber, provinceName: $provinceName, unitName: $unitName, unitNationalId: $unitNationalId, unitRegistrationNumber: $unitRegistrationNumber, unitEconomicalNumber: $unitEconomicalNumber, unitProvince: $unitProvince, unitCity: $unitCity, unitPostalCode: $unitPostalCode, unitAddress: $unitAddress, personType: $personType, type: $type)';
}
}
/// @nodoc
abstract mixin class $UserProfileCopyWith<$Res> {
factory $UserProfileCopyWith(UserProfile value, $Res Function(UserProfile) _then) = _$UserProfileCopyWithImpl;
@useResult
$Res call({
List<String>? role, String? city, String? province, String? key, String? userGateWayId, dynamic userDjangoIdForeignKey, dynamic provinceIdForeignKey, dynamic cityIdForeignKey, dynamic systemUserProfileIdKey, String? fullname, String? firstName, String? lastName, String? nationalCode, String? nationalCodeImage, String? nationalId, String? mobile, String? birthday, String? image, String? password, bool? active, UserState? state, int? baseOrder, int? cityNumber, String? cityName, int? provinceNumber, String? provinceName, String? unitName, String? unitNationalId, String? unitRegistrationNumber, String? unitEconomicalNumber, String? unitProvince, String? unitCity, String? unitPostalCode, String? unitAddress, String? personType, String? type
});
$UserStateCopyWith<$Res>? get state;
}
/// @nodoc
class _$UserProfileCopyWithImpl<$Res>
implements $UserProfileCopyWith<$Res> {
_$UserProfileCopyWithImpl(this._self, this._then);
final UserProfile _self;
final $Res Function(UserProfile) _then;
/// Create a copy of UserProfile
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? role = freezed,Object? city = freezed,Object? province = freezed,Object? key = freezed,Object? userGateWayId = freezed,Object? userDjangoIdForeignKey = freezed,Object? provinceIdForeignKey = freezed,Object? cityIdForeignKey = freezed,Object? systemUserProfileIdKey = freezed,Object? fullname = freezed,Object? firstName = freezed,Object? lastName = freezed,Object? nationalCode = freezed,Object? nationalCodeImage = freezed,Object? nationalId = freezed,Object? mobile = freezed,Object? birthday = freezed,Object? image = freezed,Object? password = freezed,Object? active = freezed,Object? state = freezed,Object? baseOrder = freezed,Object? cityNumber = freezed,Object? cityName = freezed,Object? provinceNumber = freezed,Object? provinceName = freezed,Object? unitName = freezed,Object? unitNationalId = freezed,Object? unitRegistrationNumber = freezed,Object? unitEconomicalNumber = freezed,Object? unitProvince = freezed,Object? unitCity = freezed,Object? unitPostalCode = freezed,Object? unitAddress = freezed,Object? personType = freezed,Object? type = freezed,}) {
return _then(_self.copyWith(
role: freezed == role ? _self.role : role // ignore: cast_nullable_to_non_nullable
as List<String>?,city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable
as String?,province: freezed == province ? _self.province : province // ignore: cast_nullable_to_non_nullable
as String?,key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
as String?,userGateWayId: freezed == userGateWayId ? _self.userGateWayId : userGateWayId // ignore: cast_nullable_to_non_nullable
as String?,userDjangoIdForeignKey: freezed == userDjangoIdForeignKey ? _self.userDjangoIdForeignKey : userDjangoIdForeignKey // ignore: cast_nullable_to_non_nullable
as dynamic,provinceIdForeignKey: freezed == provinceIdForeignKey ? _self.provinceIdForeignKey : provinceIdForeignKey // ignore: cast_nullable_to_non_nullable
as dynamic,cityIdForeignKey: freezed == cityIdForeignKey ? _self.cityIdForeignKey : cityIdForeignKey // ignore: cast_nullable_to_non_nullable
as dynamic,systemUserProfileIdKey: freezed == systemUserProfileIdKey ? _self.systemUserProfileIdKey : systemUserProfileIdKey // ignore: cast_nullable_to_non_nullable
as dynamic,fullname: freezed == fullname ? _self.fullname : fullname // ignore: cast_nullable_to_non_nullable
as String?,firstName: freezed == firstName ? _self.firstName : firstName // ignore: cast_nullable_to_non_nullable
as String?,lastName: freezed == lastName ? _self.lastName : lastName // ignore: cast_nullable_to_non_nullable
as String?,nationalCode: freezed == nationalCode ? _self.nationalCode : nationalCode // ignore: cast_nullable_to_non_nullable
as String?,nationalCodeImage: freezed == nationalCodeImage ? _self.nationalCodeImage : nationalCodeImage // ignore: cast_nullable_to_non_nullable
as String?,nationalId: freezed == nationalId ? _self.nationalId : nationalId // ignore: cast_nullable_to_non_nullable
as String?,mobile: freezed == mobile ? _self.mobile : mobile // ignore: cast_nullable_to_non_nullable
as String?,birthday: freezed == birthday ? _self.birthday : birthday // ignore: cast_nullable_to_non_nullable
as String?,image: freezed == image ? _self.image : image // ignore: cast_nullable_to_non_nullable
as String?,password: freezed == password ? _self.password : password // ignore: cast_nullable_to_non_nullable
as String?,active: freezed == active ? _self.active : active // ignore: cast_nullable_to_non_nullable
as bool?,state: freezed == state ? _self.state : state // ignore: cast_nullable_to_non_nullable
as UserState?,baseOrder: freezed == baseOrder ? _self.baseOrder : baseOrder // ignore: cast_nullable_to_non_nullable
as int?,cityNumber: freezed == cityNumber ? _self.cityNumber : cityNumber // ignore: cast_nullable_to_non_nullable
as int?,cityName: freezed == cityName ? _self.cityName : cityName // ignore: cast_nullable_to_non_nullable
as String?,provinceNumber: freezed == provinceNumber ? _self.provinceNumber : provinceNumber // ignore: cast_nullable_to_non_nullable
as int?,provinceName: freezed == provinceName ? _self.provinceName : provinceName // ignore: cast_nullable_to_non_nullable
as String?,unitName: freezed == unitName ? _self.unitName : unitName // ignore: cast_nullable_to_non_nullable
as String?,unitNationalId: freezed == unitNationalId ? _self.unitNationalId : unitNationalId // ignore: cast_nullable_to_non_nullable
as String?,unitRegistrationNumber: freezed == unitRegistrationNumber ? _self.unitRegistrationNumber : unitRegistrationNumber // ignore: cast_nullable_to_non_nullable
as String?,unitEconomicalNumber: freezed == unitEconomicalNumber ? _self.unitEconomicalNumber : unitEconomicalNumber // ignore: cast_nullable_to_non_nullable
as String?,unitProvince: freezed == unitProvince ? _self.unitProvince : unitProvince // ignore: cast_nullable_to_non_nullable
as String?,unitCity: freezed == unitCity ? _self.unitCity : unitCity // ignore: cast_nullable_to_non_nullable
as String?,unitPostalCode: freezed == unitPostalCode ? _self.unitPostalCode : unitPostalCode // ignore: cast_nullable_to_non_nullable
as String?,unitAddress: freezed == unitAddress ? _self.unitAddress : unitAddress // ignore: cast_nullable_to_non_nullable
as String?,personType: freezed == personType ? _self.personType : personType // ignore: cast_nullable_to_non_nullable
as String?,type: freezed == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
as String?,
));
}
/// Create a copy of UserProfile
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$UserStateCopyWith<$Res>? get state {
if (_self.state == null) {
return null;
}
return $UserStateCopyWith<$Res>(_self.state!, (value) {
return _then(_self.copyWith(state: value));
});
}
}
/// Adds pattern-matching-related methods to [UserProfile].
extension UserProfilePatterns on UserProfile {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _UserProfile value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _UserProfile() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _UserProfile value) $default,){
final _that = this;
switch (_that) {
case _UserProfile():
return $default(_that);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _UserProfile value)? $default,){
final _that = this;
switch (_that) {
case _UserProfile() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( List<String>? role, String? city, String? province, String? key, String? userGateWayId, dynamic userDjangoIdForeignKey, dynamic provinceIdForeignKey, dynamic cityIdForeignKey, dynamic systemUserProfileIdKey, String? fullname, String? firstName, String? lastName, String? nationalCode, String? nationalCodeImage, String? nationalId, String? mobile, String? birthday, String? image, String? password, bool? active, UserState? state, int? baseOrder, int? cityNumber, String? cityName, int? provinceNumber, String? provinceName, String? unitName, String? unitNationalId, String? unitRegistrationNumber, String? unitEconomicalNumber, String? unitProvince, String? unitCity, String? unitPostalCode, String? unitAddress, String? personType, String? type)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _UserProfile() when $default != null:
return $default(_that.role,_that.city,_that.province,_that.key,_that.userGateWayId,_that.userDjangoIdForeignKey,_that.provinceIdForeignKey,_that.cityIdForeignKey,_that.systemUserProfileIdKey,_that.fullname,_that.firstName,_that.lastName,_that.nationalCode,_that.nationalCodeImage,_that.nationalId,_that.mobile,_that.birthday,_that.image,_that.password,_that.active,_that.state,_that.baseOrder,_that.cityNumber,_that.cityName,_that.provinceNumber,_that.provinceName,_that.unitName,_that.unitNationalId,_that.unitRegistrationNumber,_that.unitEconomicalNumber,_that.unitProvince,_that.unitCity,_that.unitPostalCode,_that.unitAddress,_that.personType,_that.type);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( List<String>? role, String? city, String? province, String? key, String? userGateWayId, dynamic userDjangoIdForeignKey, dynamic provinceIdForeignKey, dynamic cityIdForeignKey, dynamic systemUserProfileIdKey, String? fullname, String? firstName, String? lastName, String? nationalCode, String? nationalCodeImage, String? nationalId, String? mobile, String? birthday, String? image, String? password, bool? active, UserState? state, int? baseOrder, int? cityNumber, String? cityName, int? provinceNumber, String? provinceName, String? unitName, String? unitNationalId, String? unitRegistrationNumber, String? unitEconomicalNumber, String? unitProvince, String? unitCity, String? unitPostalCode, String? unitAddress, String? personType, String? type) $default,) {final _that = this;
switch (_that) {
case _UserProfile():
return $default(_that.role,_that.city,_that.province,_that.key,_that.userGateWayId,_that.userDjangoIdForeignKey,_that.provinceIdForeignKey,_that.cityIdForeignKey,_that.systemUserProfileIdKey,_that.fullname,_that.firstName,_that.lastName,_that.nationalCode,_that.nationalCodeImage,_that.nationalId,_that.mobile,_that.birthday,_that.image,_that.password,_that.active,_that.state,_that.baseOrder,_that.cityNumber,_that.cityName,_that.provinceNumber,_that.provinceName,_that.unitName,_that.unitNationalId,_that.unitRegistrationNumber,_that.unitEconomicalNumber,_that.unitProvince,_that.unitCity,_that.unitPostalCode,_that.unitAddress,_that.personType,_that.type);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( List<String>? role, String? city, String? province, String? key, String? userGateWayId, dynamic userDjangoIdForeignKey, dynamic provinceIdForeignKey, dynamic cityIdForeignKey, dynamic systemUserProfileIdKey, String? fullname, String? firstName, String? lastName, String? nationalCode, String? nationalCodeImage, String? nationalId, String? mobile, String? birthday, String? image, String? password, bool? active, UserState? state, int? baseOrder, int? cityNumber, String? cityName, int? provinceNumber, String? provinceName, String? unitName, String? unitNationalId, String? unitRegistrationNumber, String? unitEconomicalNumber, String? unitProvince, String? unitCity, String? unitPostalCode, String? unitAddress, String? personType, String? type)? $default,) {final _that = this;
switch (_that) {
case _UserProfile() when $default != null:
return $default(_that.role,_that.city,_that.province,_that.key,_that.userGateWayId,_that.userDjangoIdForeignKey,_that.provinceIdForeignKey,_that.cityIdForeignKey,_that.systemUserProfileIdKey,_that.fullname,_that.firstName,_that.lastName,_that.nationalCode,_that.nationalCodeImage,_that.nationalId,_that.mobile,_that.birthday,_that.image,_that.password,_that.active,_that.state,_that.baseOrder,_that.cityNumber,_that.cityName,_that.provinceNumber,_that.provinceName,_that.unitName,_that.unitNationalId,_that.unitRegistrationNumber,_that.unitEconomicalNumber,_that.unitProvince,_that.unitCity,_that.unitPostalCode,_that.unitAddress,_that.personType,_that.type);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _UserProfile implements UserProfile {
const _UserProfile({final List<String>? role, this.city, this.province, this.key, this.userGateWayId, this.userDjangoIdForeignKey, this.provinceIdForeignKey, this.cityIdForeignKey, this.systemUserProfileIdKey, this.fullname, this.firstName, this.lastName, this.nationalCode, this.nationalCodeImage, this.nationalId, this.mobile, this.birthday, this.image, this.password, this.active, this.state, this.baseOrder, this.cityNumber, this.cityName, this.provinceNumber, this.provinceName, this.unitName, this.unitNationalId, this.unitRegistrationNumber, this.unitEconomicalNumber, this.unitProvince, this.unitCity, this.unitPostalCode, this.unitAddress, this.personType, this.type}): _role = role;
factory _UserProfile.fromJson(Map<String, dynamic> json) => _$UserProfileFromJson(json);
final List<String>? _role;
@override List<String>? get role {
final value = _role;
if (value == null) return null;
if (_role is EqualUnmodifiableListView) return _role;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
@override final String? city;
@override final String? province;
@override final String? key;
@override final String? userGateWayId;
@override final dynamic userDjangoIdForeignKey;
@override final dynamic provinceIdForeignKey;
@override final dynamic cityIdForeignKey;
@override final dynamic systemUserProfileIdKey;
@override final String? fullname;
@override final String? firstName;
@override final String? lastName;
@override final String? nationalCode;
@override final String? nationalCodeImage;
@override final String? nationalId;
@override final String? mobile;
@override final String? birthday;
@override final String? image;
@override final String? password;
@override final bool? active;
@override final UserState? state;
@override final int? baseOrder;
@override final int? cityNumber;
@override final String? cityName;
@override final int? provinceNumber;
@override final String? provinceName;
@override final String? unitName;
@override final String? unitNationalId;
@override final String? unitRegistrationNumber;
@override final String? unitEconomicalNumber;
@override final String? unitProvince;
@override final String? unitCity;
@override final String? unitPostalCode;
@override final String? unitAddress;
@override final String? personType;
@override final String? type;
/// Create a copy of UserProfile
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$UserProfileCopyWith<_UserProfile> get copyWith => __$UserProfileCopyWithImpl<_UserProfile>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$UserProfileToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _UserProfile&&const DeepCollectionEquality().equals(other._role, _role)&&(identical(other.city, city) || other.city == city)&&(identical(other.province, province) || other.province == province)&&(identical(other.key, key) || other.key == key)&&(identical(other.userGateWayId, userGateWayId) || other.userGateWayId == userGateWayId)&&const DeepCollectionEquality().equals(other.userDjangoIdForeignKey, userDjangoIdForeignKey)&&const DeepCollectionEquality().equals(other.provinceIdForeignKey, provinceIdForeignKey)&&const DeepCollectionEquality().equals(other.cityIdForeignKey, cityIdForeignKey)&&const DeepCollectionEquality().equals(other.systemUserProfileIdKey, systemUserProfileIdKey)&&(identical(other.fullname, fullname) || other.fullname == fullname)&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.nationalCode, nationalCode) || other.nationalCode == nationalCode)&&(identical(other.nationalCodeImage, nationalCodeImage) || other.nationalCodeImage == nationalCodeImage)&&(identical(other.nationalId, nationalId) || other.nationalId == nationalId)&&(identical(other.mobile, mobile) || other.mobile == mobile)&&(identical(other.birthday, birthday) || other.birthday == birthday)&&(identical(other.image, image) || other.image == image)&&(identical(other.password, password) || other.password == password)&&(identical(other.active, active) || other.active == active)&&(identical(other.state, state) || other.state == state)&&(identical(other.baseOrder, baseOrder) || other.baseOrder == baseOrder)&&(identical(other.cityNumber, cityNumber) || other.cityNumber == cityNumber)&&(identical(other.cityName, cityName) || other.cityName == cityName)&&(identical(other.provinceNumber, provinceNumber) || other.provinceNumber == provinceNumber)&&(identical(other.provinceName, provinceName) || other.provinceName == provinceName)&&(identical(other.unitName, unitName) || other.unitName == unitName)&&(identical(other.unitNationalId, unitNationalId) || other.unitNationalId == unitNationalId)&&(identical(other.unitRegistrationNumber, unitRegistrationNumber) || other.unitRegistrationNumber == unitRegistrationNumber)&&(identical(other.unitEconomicalNumber, unitEconomicalNumber) || other.unitEconomicalNumber == unitEconomicalNumber)&&(identical(other.unitProvince, unitProvince) || other.unitProvince == unitProvince)&&(identical(other.unitCity, unitCity) || other.unitCity == unitCity)&&(identical(other.unitPostalCode, unitPostalCode) || other.unitPostalCode == unitPostalCode)&&(identical(other.unitAddress, unitAddress) || other.unitAddress == unitAddress)&&(identical(other.personType, personType) || other.personType == personType)&&(identical(other.type, type) || other.type == type));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hashAll([runtimeType,const DeepCollectionEquality().hash(_role),city,province,key,userGateWayId,const DeepCollectionEquality().hash(userDjangoIdForeignKey),const DeepCollectionEquality().hash(provinceIdForeignKey),const DeepCollectionEquality().hash(cityIdForeignKey),const DeepCollectionEquality().hash(systemUserProfileIdKey),fullname,firstName,lastName,nationalCode,nationalCodeImage,nationalId,mobile,birthday,image,password,active,state,baseOrder,cityNumber,cityName,provinceNumber,provinceName,unitName,unitNationalId,unitRegistrationNumber,unitEconomicalNumber,unitProvince,unitCity,unitPostalCode,unitAddress,personType,type]);
@override
String toString() {
return 'UserProfile(role: $role, city: $city, province: $province, key: $key, userGateWayId: $userGateWayId, userDjangoIdForeignKey: $userDjangoIdForeignKey, provinceIdForeignKey: $provinceIdForeignKey, cityIdForeignKey: $cityIdForeignKey, systemUserProfileIdKey: $systemUserProfileIdKey, fullname: $fullname, firstName: $firstName, lastName: $lastName, nationalCode: $nationalCode, nationalCodeImage: $nationalCodeImage, nationalId: $nationalId, mobile: $mobile, birthday: $birthday, image: $image, password: $password, active: $active, state: $state, baseOrder: $baseOrder, cityNumber: $cityNumber, cityName: $cityName, provinceNumber: $provinceNumber, provinceName: $provinceName, unitName: $unitName, unitNationalId: $unitNationalId, unitRegistrationNumber: $unitRegistrationNumber, unitEconomicalNumber: $unitEconomicalNumber, unitProvince: $unitProvince, unitCity: $unitCity, unitPostalCode: $unitPostalCode, unitAddress: $unitAddress, personType: $personType, type: $type)';
}
}
/// @nodoc
abstract mixin class _$UserProfileCopyWith<$Res> implements $UserProfileCopyWith<$Res> {
factory _$UserProfileCopyWith(_UserProfile value, $Res Function(_UserProfile) _then) = __$UserProfileCopyWithImpl;
@override @useResult
$Res call({
List<String>? role, String? city, String? province, String? key, String? userGateWayId, dynamic userDjangoIdForeignKey, dynamic provinceIdForeignKey, dynamic cityIdForeignKey, dynamic systemUserProfileIdKey, String? fullname, String? firstName, String? lastName, String? nationalCode, String? nationalCodeImage, String? nationalId, String? mobile, String? birthday, String? image, String? password, bool? active, UserState? state, int? baseOrder, int? cityNumber, String? cityName, int? provinceNumber, String? provinceName, String? unitName, String? unitNationalId, String? unitRegistrationNumber, String? unitEconomicalNumber, String? unitProvince, String? unitCity, String? unitPostalCode, String? unitAddress, String? personType, String? type
});
@override $UserStateCopyWith<$Res>? get state;
}
/// @nodoc
class __$UserProfileCopyWithImpl<$Res>
implements _$UserProfileCopyWith<$Res> {
__$UserProfileCopyWithImpl(this._self, this._then);
final _UserProfile _self;
final $Res Function(_UserProfile) _then;
/// Create a copy of UserProfile
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? role = freezed,Object? city = freezed,Object? province = freezed,Object? key = freezed,Object? userGateWayId = freezed,Object? userDjangoIdForeignKey = freezed,Object? provinceIdForeignKey = freezed,Object? cityIdForeignKey = freezed,Object? systemUserProfileIdKey = freezed,Object? fullname = freezed,Object? firstName = freezed,Object? lastName = freezed,Object? nationalCode = freezed,Object? nationalCodeImage = freezed,Object? nationalId = freezed,Object? mobile = freezed,Object? birthday = freezed,Object? image = freezed,Object? password = freezed,Object? active = freezed,Object? state = freezed,Object? baseOrder = freezed,Object? cityNumber = freezed,Object? cityName = freezed,Object? provinceNumber = freezed,Object? provinceName = freezed,Object? unitName = freezed,Object? unitNationalId = freezed,Object? unitRegistrationNumber = freezed,Object? unitEconomicalNumber = freezed,Object? unitProvince = freezed,Object? unitCity = freezed,Object? unitPostalCode = freezed,Object? unitAddress = freezed,Object? personType = freezed,Object? type = freezed,}) {
return _then(_UserProfile(
role: freezed == role ? _self._role : role // ignore: cast_nullable_to_non_nullable
as List<String>?,city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable
as String?,province: freezed == province ? _self.province : province // ignore: cast_nullable_to_non_nullable
as String?,key: freezed == key ? _self.key : key // ignore: cast_nullable_to_non_nullable
as String?,userGateWayId: freezed == userGateWayId ? _self.userGateWayId : userGateWayId // ignore: cast_nullable_to_non_nullable
as String?,userDjangoIdForeignKey: freezed == userDjangoIdForeignKey ? _self.userDjangoIdForeignKey : userDjangoIdForeignKey // ignore: cast_nullable_to_non_nullable
as dynamic,provinceIdForeignKey: freezed == provinceIdForeignKey ? _self.provinceIdForeignKey : provinceIdForeignKey // ignore: cast_nullable_to_non_nullable
as dynamic,cityIdForeignKey: freezed == cityIdForeignKey ? _self.cityIdForeignKey : cityIdForeignKey // ignore: cast_nullable_to_non_nullable
as dynamic,systemUserProfileIdKey: freezed == systemUserProfileIdKey ? _self.systemUserProfileIdKey : systemUserProfileIdKey // ignore: cast_nullable_to_non_nullable
as dynamic,fullname: freezed == fullname ? _self.fullname : fullname // ignore: cast_nullable_to_non_nullable
as String?,firstName: freezed == firstName ? _self.firstName : firstName // ignore: cast_nullable_to_non_nullable
as String?,lastName: freezed == lastName ? _self.lastName : lastName // ignore: cast_nullable_to_non_nullable
as String?,nationalCode: freezed == nationalCode ? _self.nationalCode : nationalCode // ignore: cast_nullable_to_non_nullable
as String?,nationalCodeImage: freezed == nationalCodeImage ? _self.nationalCodeImage : nationalCodeImage // ignore: cast_nullable_to_non_nullable
as String?,nationalId: freezed == nationalId ? _self.nationalId : nationalId // ignore: cast_nullable_to_non_nullable
as String?,mobile: freezed == mobile ? _self.mobile : mobile // ignore: cast_nullable_to_non_nullable
as String?,birthday: freezed == birthday ? _self.birthday : birthday // ignore: cast_nullable_to_non_nullable
as String?,image: freezed == image ? _self.image : image // ignore: cast_nullable_to_non_nullable
as String?,password: freezed == password ? _self.password : password // ignore: cast_nullable_to_non_nullable
as String?,active: freezed == active ? _self.active : active // ignore: cast_nullable_to_non_nullable
as bool?,state: freezed == state ? _self.state : state // ignore: cast_nullable_to_non_nullable
as UserState?,baseOrder: freezed == baseOrder ? _self.baseOrder : baseOrder // ignore: cast_nullable_to_non_nullable
as int?,cityNumber: freezed == cityNumber ? _self.cityNumber : cityNumber // ignore: cast_nullable_to_non_nullable
as int?,cityName: freezed == cityName ? _self.cityName : cityName // ignore: cast_nullable_to_non_nullable
as String?,provinceNumber: freezed == provinceNumber ? _self.provinceNumber : provinceNumber // ignore: cast_nullable_to_non_nullable
as int?,provinceName: freezed == provinceName ? _self.provinceName : provinceName // ignore: cast_nullable_to_non_nullable
as String?,unitName: freezed == unitName ? _self.unitName : unitName // ignore: cast_nullable_to_non_nullable
as String?,unitNationalId: freezed == unitNationalId ? _self.unitNationalId : unitNationalId // ignore: cast_nullable_to_non_nullable
as String?,unitRegistrationNumber: freezed == unitRegistrationNumber ? _self.unitRegistrationNumber : unitRegistrationNumber // ignore: cast_nullable_to_non_nullable
as String?,unitEconomicalNumber: freezed == unitEconomicalNumber ? _self.unitEconomicalNumber : unitEconomicalNumber // ignore: cast_nullable_to_non_nullable
as String?,unitProvince: freezed == unitProvince ? _self.unitProvince : unitProvince // ignore: cast_nullable_to_non_nullable
as String?,unitCity: freezed == unitCity ? _self.unitCity : unitCity // ignore: cast_nullable_to_non_nullable
as String?,unitPostalCode: freezed == unitPostalCode ? _self.unitPostalCode : unitPostalCode // ignore: cast_nullable_to_non_nullable
as String?,unitAddress: freezed == unitAddress ? _self.unitAddress : unitAddress // ignore: cast_nullable_to_non_nullable
as String?,personType: freezed == personType ? _self.personType : personType // ignore: cast_nullable_to_non_nullable
as String?,type: freezed == type ? _self.type : type // ignore: cast_nullable_to_non_nullable
as String?,
));
}
/// Create a copy of UserProfile
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$UserStateCopyWith<$Res>? get state {
if (_self.state == null) {
return null;
}
return $UserStateCopyWith<$Res>(_self.state!, (value) {
return _then(_self.copyWith(state: value));
});
}
}
/// @nodoc
mixin _$UserState {
String? get city; String? get image; String? get mobile; String? get birthday; String? get province; String? get lastName; String? get firstName; String? get nationalId; String? get nationalCode;
/// Create a copy of UserState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$UserStateCopyWith<UserState> get copyWith => _$UserStateCopyWithImpl<UserState>(this as UserState, _$identity);
/// Serializes this UserState to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is UserState&&(identical(other.city, city) || other.city == city)&&(identical(other.image, image) || other.image == image)&&(identical(other.mobile, mobile) || other.mobile == mobile)&&(identical(other.birthday, birthday) || other.birthday == birthday)&&(identical(other.province, province) || other.province == province)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.nationalId, nationalId) || other.nationalId == nationalId)&&(identical(other.nationalCode, nationalCode) || other.nationalCode == nationalCode));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,city,image,mobile,birthday,province,lastName,firstName,nationalId,nationalCode);
@override
String toString() {
return 'UserState(city: $city, image: $image, mobile: $mobile, birthday: $birthday, province: $province, lastName: $lastName, firstName: $firstName, nationalId: $nationalId, nationalCode: $nationalCode)';
}
}
/// @nodoc
abstract mixin class $UserStateCopyWith<$Res> {
factory $UserStateCopyWith(UserState value, $Res Function(UserState) _then) = _$UserStateCopyWithImpl;
@useResult
$Res call({
String? city, String? image, String? mobile, String? birthday, String? province, String? lastName, String? firstName, String? nationalId, String? nationalCode
});
}
/// @nodoc
class _$UserStateCopyWithImpl<$Res>
implements $UserStateCopyWith<$Res> {
_$UserStateCopyWithImpl(this._self, this._then);
final UserState _self;
final $Res Function(UserState) _then;
/// Create a copy of UserState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? city = freezed,Object? image = freezed,Object? mobile = freezed,Object? birthday = freezed,Object? province = freezed,Object? lastName = freezed,Object? firstName = freezed,Object? nationalId = freezed,Object? nationalCode = freezed,}) {
return _then(_self.copyWith(
city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable
as String?,image: freezed == image ? _self.image : image // ignore: cast_nullable_to_non_nullable
as String?,mobile: freezed == mobile ? _self.mobile : mobile // ignore: cast_nullable_to_non_nullable
as String?,birthday: freezed == birthday ? _self.birthday : birthday // ignore: cast_nullable_to_non_nullable
as String?,province: freezed == province ? _self.province : province // ignore: cast_nullable_to_non_nullable
as String?,lastName: freezed == lastName ? _self.lastName : lastName // ignore: cast_nullable_to_non_nullable
as String?,firstName: freezed == firstName ? _self.firstName : firstName // ignore: cast_nullable_to_non_nullable
as String?,nationalId: freezed == nationalId ? _self.nationalId : nationalId // ignore: cast_nullable_to_non_nullable
as String?,nationalCode: freezed == nationalCode ? _self.nationalCode : nationalCode // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// Adds pattern-matching-related methods to [UserState].
extension UserStatePatterns on UserState {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _UserState value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _UserState() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _UserState value) $default,){
final _that = this;
switch (_that) {
case _UserState():
return $default(_that);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _UserState value)? $default,){
final _that = this;
switch (_that) {
case _UserState() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? city, String? image, String? mobile, String? birthday, String? province, String? lastName, String? firstName, String? nationalId, String? nationalCode)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _UserState() when $default != null:
return $default(_that.city,_that.image,_that.mobile,_that.birthday,_that.province,_that.lastName,_that.firstName,_that.nationalId,_that.nationalCode);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? city, String? image, String? mobile, String? birthday, String? province, String? lastName, String? firstName, String? nationalId, String? nationalCode) $default,) {final _that = this;
switch (_that) {
case _UserState():
return $default(_that.city,_that.image,_that.mobile,_that.birthday,_that.province,_that.lastName,_that.firstName,_that.nationalId,_that.nationalCode);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? city, String? image, String? mobile, String? birthday, String? province, String? lastName, String? firstName, String? nationalId, String? nationalCode)? $default,) {final _that = this;
switch (_that) {
case _UserState() when $default != null:
return $default(_that.city,_that.image,_that.mobile,_that.birthday,_that.province,_that.lastName,_that.firstName,_that.nationalId,_that.nationalCode);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _UserState implements UserState {
const _UserState({this.city, this.image, this.mobile, this.birthday, this.province, this.lastName, this.firstName, this.nationalId, this.nationalCode});
factory _UserState.fromJson(Map<String, dynamic> json) => _$UserStateFromJson(json);
@override final String? city;
@override final String? image;
@override final String? mobile;
@override final String? birthday;
@override final String? province;
@override final String? lastName;
@override final String? firstName;
@override final String? nationalId;
@override final String? nationalCode;
/// Create a copy of UserState
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$UserStateCopyWith<_UserState> get copyWith => __$UserStateCopyWithImpl<_UserState>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$UserStateToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _UserState&&(identical(other.city, city) || other.city == city)&&(identical(other.image, image) || other.image == image)&&(identical(other.mobile, mobile) || other.mobile == mobile)&&(identical(other.birthday, birthday) || other.birthday == birthday)&&(identical(other.province, province) || other.province == province)&&(identical(other.lastName, lastName) || other.lastName == lastName)&&(identical(other.firstName, firstName) || other.firstName == firstName)&&(identical(other.nationalId, nationalId) || other.nationalId == nationalId)&&(identical(other.nationalCode, nationalCode) || other.nationalCode == nationalCode));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,city,image,mobile,birthday,province,lastName,firstName,nationalId,nationalCode);
@override
String toString() {
return 'UserState(city: $city, image: $image, mobile: $mobile, birthday: $birthday, province: $province, lastName: $lastName, firstName: $firstName, nationalId: $nationalId, nationalCode: $nationalCode)';
}
}
/// @nodoc
abstract mixin class _$UserStateCopyWith<$Res> implements $UserStateCopyWith<$Res> {
factory _$UserStateCopyWith(_UserState value, $Res Function(_UserState) _then) = __$UserStateCopyWithImpl;
@override @useResult
$Res call({
String? city, String? image, String? mobile, String? birthday, String? province, String? lastName, String? firstName, String? nationalId, String? nationalCode
});
}
/// @nodoc
class __$UserStateCopyWithImpl<$Res>
implements _$UserStateCopyWith<$Res> {
__$UserStateCopyWithImpl(this._self, this._then);
final _UserState _self;
final $Res Function(_UserState) _then;
/// Create a copy of UserState
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? city = freezed,Object? image = freezed,Object? mobile = freezed,Object? birthday = freezed,Object? province = freezed,Object? lastName = freezed,Object? firstName = freezed,Object? nationalId = freezed,Object? nationalCode = freezed,}) {
return _then(_UserState(
city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable
as String?,image: freezed == image ? _self.image : image // ignore: cast_nullable_to_non_nullable
as String?,mobile: freezed == mobile ? _self.mobile : mobile // ignore: cast_nullable_to_non_nullable
as String?,birthday: freezed == birthday ? _self.birthday : birthday // ignore: cast_nullable_to_non_nullable
as String?,province: freezed == province ? _self.province : province // ignore: cast_nullable_to_non_nullable
as String?,lastName: freezed == lastName ? _self.lastName : lastName // ignore: cast_nullable_to_non_nullable
as String?,firstName: freezed == firstName ? _self.firstName : firstName // ignore: cast_nullable_to_non_nullable
as String?,nationalId: freezed == nationalId ? _self.nationalId : nationalId // ignore: cast_nullable_to_non_nullable
as String?,nationalCode: freezed == nationalCode ? _self.nationalCode : nationalCode // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
// dart format on

View File

@@ -0,0 +1,113 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'user_profile.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_UserProfile _$UserProfileFromJson(Map<String, dynamic> json) => _UserProfile(
role: (json['role'] as List<dynamic>?)?.map((e) => e as String).toList(),
city: json['city'] as String?,
province: json['province'] as String?,
key: json['key'] as String?,
userGateWayId: json['user_gate_way_id'] as String?,
userDjangoIdForeignKey: json['user_django_id_foreign_key'],
provinceIdForeignKey: json['province_id_foreign_key'],
cityIdForeignKey: json['city_id_foreign_key'],
systemUserProfileIdKey: json['system_user_profile_id_key'],
fullname: json['fullname'] as String?,
firstName: json['first_name'] as String?,
lastName: json['last_name'] as String?,
nationalCode: json['national_code'] as String?,
nationalCodeImage: json['national_code_image'] as String?,
nationalId: json['national_id'] as String?,
mobile: json['mobile'] as String?,
birthday: json['birthday'] as String?,
image: json['image'] as String?,
password: json['password'] as String?,
active: json['active'] as bool?,
state: json['state'] == null
? null
: UserState.fromJson(json['state'] as Map<String, dynamic>),
baseOrder: (json['base_order'] as num?)?.toInt(),
cityNumber: (json['city_number'] as num?)?.toInt(),
cityName: json['city_name'] as String?,
provinceNumber: (json['province_number'] as num?)?.toInt(),
provinceName: json['province_name'] as String?,
unitName: json['unit_name'] as String?,
unitNationalId: json['unit_national_id'] as String?,
unitRegistrationNumber: json['unit_registration_number'] as String?,
unitEconomicalNumber: json['unit_economical_number'] as String?,
unitProvince: json['unit_province'] as String?,
unitCity: json['unit_city'] as String?,
unitPostalCode: json['unit_postal_code'] as String?,
unitAddress: json['unit_address'] as String?,
personType: json['person_type'] as String?,
type: json['type'] as String?,
);
Map<String, dynamic> _$UserProfileToJson(_UserProfile instance) =>
<String, dynamic>{
'role': instance.role,
'city': instance.city,
'province': instance.province,
'key': instance.key,
'user_gate_way_id': instance.userGateWayId,
'user_django_id_foreign_key': instance.userDjangoIdForeignKey,
'province_id_foreign_key': instance.provinceIdForeignKey,
'city_id_foreign_key': instance.cityIdForeignKey,
'system_user_profile_id_key': instance.systemUserProfileIdKey,
'fullname': instance.fullname,
'first_name': instance.firstName,
'last_name': instance.lastName,
'national_code': instance.nationalCode,
'national_code_image': instance.nationalCodeImage,
'national_id': instance.nationalId,
'mobile': instance.mobile,
'birthday': instance.birthday,
'image': instance.image,
'password': instance.password,
'active': instance.active,
'state': instance.state,
'base_order': instance.baseOrder,
'city_number': instance.cityNumber,
'city_name': instance.cityName,
'province_number': instance.provinceNumber,
'province_name': instance.provinceName,
'unit_name': instance.unitName,
'unit_national_id': instance.unitNationalId,
'unit_registration_number': instance.unitRegistrationNumber,
'unit_economical_number': instance.unitEconomicalNumber,
'unit_province': instance.unitProvince,
'unit_city': instance.unitCity,
'unit_postal_code': instance.unitPostalCode,
'unit_address': instance.unitAddress,
'person_type': instance.personType,
'type': instance.type,
};
_UserState _$UserStateFromJson(Map<String, dynamic> json) => _UserState(
city: json['city'] as String?,
image: json['image'] as String?,
mobile: json['mobile'] as String?,
birthday: json['birthday'] as String?,
province: json['province'] as String?,
lastName: json['last_name'] as String?,
firstName: json['first_name'] as String?,
nationalId: json['national_id'] as String?,
nationalCode: json['national_code'] as String?,
);
Map<String, dynamic> _$UserStateToJson(_UserState instance) =>
<String, dynamic>{
'city': instance.city,
'image': instance.image,
'mobile': instance.mobile,
'birthday': instance.birthday,
'province': instance.province,
'last_name': instance.lastName,
'first_name': instance.firstName,
'national_id': instance.nationalId,
'national_code': instance.nationalCode,
};

View File

@@ -0,0 +1,30 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'user_profile_model.freezed.dart';
part 'user_profile_model.g.dart';
@freezed
abstract class UserProfileModel with _$UserProfileModel {
const factory UserProfileModel({
String? accessToken,
String? expiresIn,
String? scope,
String? expireTime,
String? mobile,
String? fullname,
String? firstname,
String? lastname,
String? city,
String? province,
String? nationalCode,
String? nationalId,
String? birthday,
String? image,
int? baseOrder,
List<String>? role,
}) = _UserProfileModel;
factory UserProfileModel.fromJson(Map<String, dynamic> json) =>
_$UserProfileModelFromJson(json);
}

View File

@@ -0,0 +1,330 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'user_profile_model.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$UserProfileModel {
String? get accessToken; String? get expiresIn; String? get scope; String? get expireTime; String? get mobile; String? get fullname; String? get firstname; String? get lastname; String? get city; String? get province; String? get nationalCode; String? get nationalId; String? get birthday; String? get image; int? get baseOrder; List<String>? get role;
/// Create a copy of UserProfileModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$UserProfileModelCopyWith<UserProfileModel> get copyWith => _$UserProfileModelCopyWithImpl<UserProfileModel>(this as UserProfileModel, _$identity);
/// Serializes this UserProfileModel to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is UserProfileModel&&(identical(other.accessToken, accessToken) || other.accessToken == accessToken)&&(identical(other.expiresIn, expiresIn) || other.expiresIn == expiresIn)&&(identical(other.scope, scope) || other.scope == scope)&&(identical(other.expireTime, expireTime) || other.expireTime == expireTime)&&(identical(other.mobile, mobile) || other.mobile == mobile)&&(identical(other.fullname, fullname) || other.fullname == fullname)&&(identical(other.firstname, firstname) || other.firstname == firstname)&&(identical(other.lastname, lastname) || other.lastname == lastname)&&(identical(other.city, city) || other.city == city)&&(identical(other.province, province) || other.province == province)&&(identical(other.nationalCode, nationalCode) || other.nationalCode == nationalCode)&&(identical(other.nationalId, nationalId) || other.nationalId == nationalId)&&(identical(other.birthday, birthday) || other.birthday == birthday)&&(identical(other.image, image) || other.image == image)&&(identical(other.baseOrder, baseOrder) || other.baseOrder == baseOrder)&&const DeepCollectionEquality().equals(other.role, role));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,accessToken,expiresIn,scope,expireTime,mobile,fullname,firstname,lastname,city,province,nationalCode,nationalId,birthday,image,baseOrder,const DeepCollectionEquality().hash(role));
@override
String toString() {
return 'UserProfileModel(accessToken: $accessToken, expiresIn: $expiresIn, scope: $scope, expireTime: $expireTime, mobile: $mobile, fullname: $fullname, firstname: $firstname, lastname: $lastname, city: $city, province: $province, nationalCode: $nationalCode, nationalId: $nationalId, birthday: $birthday, image: $image, baseOrder: $baseOrder, role: $role)';
}
}
/// @nodoc
abstract mixin class $UserProfileModelCopyWith<$Res> {
factory $UserProfileModelCopyWith(UserProfileModel value, $Res Function(UserProfileModel) _then) = _$UserProfileModelCopyWithImpl;
@useResult
$Res call({
String? accessToken, String? expiresIn, String? scope, String? expireTime, String? mobile, String? fullname, String? firstname, String? lastname, String? city, String? province, String? nationalCode, String? nationalId, String? birthday, String? image, int? baseOrder, List<String>? role
});
}
/// @nodoc
class _$UserProfileModelCopyWithImpl<$Res>
implements $UserProfileModelCopyWith<$Res> {
_$UserProfileModelCopyWithImpl(this._self, this._then);
final UserProfileModel _self;
final $Res Function(UserProfileModel) _then;
/// Create a copy of UserProfileModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? accessToken = freezed,Object? expiresIn = freezed,Object? scope = freezed,Object? expireTime = freezed,Object? mobile = freezed,Object? fullname = freezed,Object? firstname = freezed,Object? lastname = freezed,Object? city = freezed,Object? province = freezed,Object? nationalCode = freezed,Object? nationalId = freezed,Object? birthday = freezed,Object? image = freezed,Object? baseOrder = freezed,Object? role = freezed,}) {
return _then(_self.copyWith(
accessToken: freezed == accessToken ? _self.accessToken : accessToken // ignore: cast_nullable_to_non_nullable
as String?,expiresIn: freezed == expiresIn ? _self.expiresIn : expiresIn // ignore: cast_nullable_to_non_nullable
as String?,scope: freezed == scope ? _self.scope : scope // ignore: cast_nullable_to_non_nullable
as String?,expireTime: freezed == expireTime ? _self.expireTime : expireTime // ignore: cast_nullable_to_non_nullable
as String?,mobile: freezed == mobile ? _self.mobile : mobile // ignore: cast_nullable_to_non_nullable
as String?,fullname: freezed == fullname ? _self.fullname : fullname // ignore: cast_nullable_to_non_nullable
as String?,firstname: freezed == firstname ? _self.firstname : firstname // ignore: cast_nullable_to_non_nullable
as String?,lastname: freezed == lastname ? _self.lastname : lastname // ignore: cast_nullable_to_non_nullable
as String?,city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable
as String?,province: freezed == province ? _self.province : province // ignore: cast_nullable_to_non_nullable
as String?,nationalCode: freezed == nationalCode ? _self.nationalCode : nationalCode // ignore: cast_nullable_to_non_nullable
as String?,nationalId: freezed == nationalId ? _self.nationalId : nationalId // ignore: cast_nullable_to_non_nullable
as String?,birthday: freezed == birthday ? _self.birthday : birthday // ignore: cast_nullable_to_non_nullable
as String?,image: freezed == image ? _self.image : image // ignore: cast_nullable_to_non_nullable
as String?,baseOrder: freezed == baseOrder ? _self.baseOrder : baseOrder // ignore: cast_nullable_to_non_nullable
as int?,role: freezed == role ? _self.role : role // ignore: cast_nullable_to_non_nullable
as List<String>?,
));
}
}
/// Adds pattern-matching-related methods to [UserProfileModel].
extension UserProfileModelPatterns on UserProfileModel {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _UserProfileModel value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _UserProfileModel() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _UserProfileModel value) $default,){
final _that = this;
switch (_that) {
case _UserProfileModel():
return $default(_that);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _UserProfileModel value)? $default,){
final _that = this;
switch (_that) {
case _UserProfileModel() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? accessToken, String? expiresIn, String? scope, String? expireTime, String? mobile, String? fullname, String? firstname, String? lastname, String? city, String? province, String? nationalCode, String? nationalId, String? birthday, String? image, int? baseOrder, List<String>? role)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _UserProfileModel() when $default != null:
return $default(_that.accessToken,_that.expiresIn,_that.scope,_that.expireTime,_that.mobile,_that.fullname,_that.firstname,_that.lastname,_that.city,_that.province,_that.nationalCode,_that.nationalId,_that.birthday,_that.image,_that.baseOrder,_that.role);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? accessToken, String? expiresIn, String? scope, String? expireTime, String? mobile, String? fullname, String? firstname, String? lastname, String? city, String? province, String? nationalCode, String? nationalId, String? birthday, String? image, int? baseOrder, List<String>? role) $default,) {final _that = this;
switch (_that) {
case _UserProfileModel():
return $default(_that.accessToken,_that.expiresIn,_that.scope,_that.expireTime,_that.mobile,_that.fullname,_that.firstname,_that.lastname,_that.city,_that.province,_that.nationalCode,_that.nationalId,_that.birthday,_that.image,_that.baseOrder,_that.role);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? accessToken, String? expiresIn, String? scope, String? expireTime, String? mobile, String? fullname, String? firstname, String? lastname, String? city, String? province, String? nationalCode, String? nationalId, String? birthday, String? image, int? baseOrder, List<String>? role)? $default,) {final _that = this;
switch (_that) {
case _UserProfileModel() when $default != null:
return $default(_that.accessToken,_that.expiresIn,_that.scope,_that.expireTime,_that.mobile,_that.fullname,_that.firstname,_that.lastname,_that.city,_that.province,_that.nationalCode,_that.nationalId,_that.birthday,_that.image,_that.baseOrder,_that.role);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _UserProfileModel implements UserProfileModel {
const _UserProfileModel({this.accessToken, this.expiresIn, this.scope, this.expireTime, this.mobile, this.fullname, this.firstname, this.lastname, this.city, this.province, this.nationalCode, this.nationalId, this.birthday, this.image, this.baseOrder, final List<String>? role}): _role = role;
factory _UserProfileModel.fromJson(Map<String, dynamic> json) => _$UserProfileModelFromJson(json);
@override final String? accessToken;
@override final String? expiresIn;
@override final String? scope;
@override final String? expireTime;
@override final String? mobile;
@override final String? fullname;
@override final String? firstname;
@override final String? lastname;
@override final String? city;
@override final String? province;
@override final String? nationalCode;
@override final String? nationalId;
@override final String? birthday;
@override final String? image;
@override final int? baseOrder;
final List<String>? _role;
@override List<String>? get role {
final value = _role;
if (value == null) return null;
if (_role is EqualUnmodifiableListView) return _role;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
/// Create a copy of UserProfileModel
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$UserProfileModelCopyWith<_UserProfileModel> get copyWith => __$UserProfileModelCopyWithImpl<_UserProfileModel>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$UserProfileModelToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _UserProfileModel&&(identical(other.accessToken, accessToken) || other.accessToken == accessToken)&&(identical(other.expiresIn, expiresIn) || other.expiresIn == expiresIn)&&(identical(other.scope, scope) || other.scope == scope)&&(identical(other.expireTime, expireTime) || other.expireTime == expireTime)&&(identical(other.mobile, mobile) || other.mobile == mobile)&&(identical(other.fullname, fullname) || other.fullname == fullname)&&(identical(other.firstname, firstname) || other.firstname == firstname)&&(identical(other.lastname, lastname) || other.lastname == lastname)&&(identical(other.city, city) || other.city == city)&&(identical(other.province, province) || other.province == province)&&(identical(other.nationalCode, nationalCode) || other.nationalCode == nationalCode)&&(identical(other.nationalId, nationalId) || other.nationalId == nationalId)&&(identical(other.birthday, birthday) || other.birthday == birthday)&&(identical(other.image, image) || other.image == image)&&(identical(other.baseOrder, baseOrder) || other.baseOrder == baseOrder)&&const DeepCollectionEquality().equals(other._role, _role));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,accessToken,expiresIn,scope,expireTime,mobile,fullname,firstname,lastname,city,province,nationalCode,nationalId,birthday,image,baseOrder,const DeepCollectionEquality().hash(_role));
@override
String toString() {
return 'UserProfileModel(accessToken: $accessToken, expiresIn: $expiresIn, scope: $scope, expireTime: $expireTime, mobile: $mobile, fullname: $fullname, firstname: $firstname, lastname: $lastname, city: $city, province: $province, nationalCode: $nationalCode, nationalId: $nationalId, birthday: $birthday, image: $image, baseOrder: $baseOrder, role: $role)';
}
}
/// @nodoc
abstract mixin class _$UserProfileModelCopyWith<$Res> implements $UserProfileModelCopyWith<$Res> {
factory _$UserProfileModelCopyWith(_UserProfileModel value, $Res Function(_UserProfileModel) _then) = __$UserProfileModelCopyWithImpl;
@override @useResult
$Res call({
String? accessToken, String? expiresIn, String? scope, String? expireTime, String? mobile, String? fullname, String? firstname, String? lastname, String? city, String? province, String? nationalCode, String? nationalId, String? birthday, String? image, int? baseOrder, List<String>? role
});
}
/// @nodoc
class __$UserProfileModelCopyWithImpl<$Res>
implements _$UserProfileModelCopyWith<$Res> {
__$UserProfileModelCopyWithImpl(this._self, this._then);
final _UserProfileModel _self;
final $Res Function(_UserProfileModel) _then;
/// Create a copy of UserProfileModel
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? accessToken = freezed,Object? expiresIn = freezed,Object? scope = freezed,Object? expireTime = freezed,Object? mobile = freezed,Object? fullname = freezed,Object? firstname = freezed,Object? lastname = freezed,Object? city = freezed,Object? province = freezed,Object? nationalCode = freezed,Object? nationalId = freezed,Object? birthday = freezed,Object? image = freezed,Object? baseOrder = freezed,Object? role = freezed,}) {
return _then(_UserProfileModel(
accessToken: freezed == accessToken ? _self.accessToken : accessToken // ignore: cast_nullable_to_non_nullable
as String?,expiresIn: freezed == expiresIn ? _self.expiresIn : expiresIn // ignore: cast_nullable_to_non_nullable
as String?,scope: freezed == scope ? _self.scope : scope // ignore: cast_nullable_to_non_nullable
as String?,expireTime: freezed == expireTime ? _self.expireTime : expireTime // ignore: cast_nullable_to_non_nullable
as String?,mobile: freezed == mobile ? _self.mobile : mobile // ignore: cast_nullable_to_non_nullable
as String?,fullname: freezed == fullname ? _self.fullname : fullname // ignore: cast_nullable_to_non_nullable
as String?,firstname: freezed == firstname ? _self.firstname : firstname // ignore: cast_nullable_to_non_nullable
as String?,lastname: freezed == lastname ? _self.lastname : lastname // ignore: cast_nullable_to_non_nullable
as String?,city: freezed == city ? _self.city : city // ignore: cast_nullable_to_non_nullable
as String?,province: freezed == province ? _self.province : province // ignore: cast_nullable_to_non_nullable
as String?,nationalCode: freezed == nationalCode ? _self.nationalCode : nationalCode // ignore: cast_nullable_to_non_nullable
as String?,nationalId: freezed == nationalId ? _self.nationalId : nationalId // ignore: cast_nullable_to_non_nullable
as String?,birthday: freezed == birthday ? _self.birthday : birthday // ignore: cast_nullable_to_non_nullable
as String?,image: freezed == image ? _self.image : image // ignore: cast_nullable_to_non_nullable
as String?,baseOrder: freezed == baseOrder ? _self.baseOrder : baseOrder // ignore: cast_nullable_to_non_nullable
as int?,role: freezed == role ? _self._role : role // ignore: cast_nullable_to_non_nullable
as List<String>?,
));
}
}
// dart format on

View File

@@ -0,0 +1,47 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'user_profile_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_UserProfileModel _$UserProfileModelFromJson(Map<String, dynamic> json) =>
_UserProfileModel(
accessToken: json['access_token'] as String?,
expiresIn: json['expires_in'] as String?,
scope: json['scope'] as String?,
expireTime: json['expire_time'] as String?,
mobile: json['mobile'] as String?,
fullname: json['fullname'] as String?,
firstname: json['firstname'] as String?,
lastname: json['lastname'] as String?,
city: json['city'] as String?,
province: json['province'] as String?,
nationalCode: json['national_code'] as String?,
nationalId: json['national_id'] as String?,
birthday: json['birthday'] as String?,
image: json['image'] as String?,
baseOrder: (json['base_order'] as num?)?.toInt(),
role: (json['role'] as List<dynamic>?)?.map((e) => e as String).toList(),
);
Map<String, dynamic> _$UserProfileModelToJson(_UserProfileModel instance) =>
<String, dynamic>{
'access_token': instance.accessToken,
'expires_in': instance.expiresIn,
'scope': instance.scope,
'expire_time': instance.expireTime,
'mobile': instance.mobile,
'fullname': instance.fullname,
'firstname': instance.firstname,
'lastname': instance.lastname,
'city': instance.city,
'province': instance.province,
'national_code': instance.nationalCode,
'national_id': instance.nationalId,
'birthday': instance.birthday,
'image': instance.image,
'base_order': instance.baseOrder,
'role': instance.role,
};

View File

@@ -0,0 +1,15 @@
import 'package:rasadyar_chicken/features/common/data/model/response/user_info/user_info_model.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/user_profile_model/user_profile_model.dart';
abstract class AuthRepository {
Future<UserProfileModel?> login({required Map<String, dynamic> authRequest});
Future<void> logout();
Future<bool> hasAuthenticated();
Future<UserInfoModel?> getUserInfo(String phoneNumber);
/// Calls `/steward-app-login/` with Bearer token and required `server` query param.
Future<void> stewardAppLogin({required String token, Map<String, dynamic>? queryParameters});
}

View File

@@ -0,0 +1,33 @@
import 'package:rasadyar_chicken/features/common/data/datasources/remote/auth/auth_remote.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/user_info/user_info_model.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/user_profile_model/user_profile_model.dart';
import 'auth_repository.dart';
class AuthRepositoryImpl implements AuthRepository {
final AuthRemoteDataSource authRemote;
AuthRepositoryImpl(this.authRemote);
@override
Future<UserProfileModel?> login({required Map<String, dynamic> authRequest}) async =>
await authRemote.login(authRequest: authRequest);
@override
Future<void> logout() async => await authRemote.logout();
@override
Future<bool> hasAuthenticated() async => await authRemote.hasAuthenticated();
@override
Future<UserInfoModel?> getUserInfo(String phoneNumber) async =>
await authRemote.getUserInfo(phoneNumber);
@override
Future<void> stewardAppLogin({
required String token,
Map<String, dynamic>? queryParameters,
}) async {
await authRemote.stewardAppLogin(token: token, queryParameters: queryParameters);
}
}

View File

@@ -0,0 +1,85 @@
import 'package:rasadyar_chicken/features/common/data/model/local/widely_used_local_model.dart';
import 'package:rasadyar_chicken/features/common/data/model/request/change_password/change_password_request_model.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/bar_information/bar_information.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/broadcast_price/broadcast_price.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/guild/guild_model.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/guild_profile/guild_profile.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/inventory/inventory_model.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/iran_province_city/iran_province_city_model.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/kill_house_distribution_info/kill_house_distribution_info.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/roles_products/roles_products.dart';
import 'package:rasadyar_chicken/features/steward/data/model/response/segmentation_model/segmentation_model.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/user_profile/user_profile.dart';
import 'package:rasadyar_core/core.dart';
abstract class CommonRepository {
//region Remote
Future<List<InventoryModel>?> getInventory({
required String token,
CancelToken? cancelToken,
});
Future<KillHouseDistributionInfo?> getKillHouseDistributionInfo({
required String token,
});
Future<BarInformation?> getGeneralBarInformation({
required String token,
Map<String, dynamic>? queryParameters,
});
Future<List<ProductModel>?> getRolesProducts({required String token});
Future<List<GuildModel>?> getGuilds({
required String token,
Map<String, dynamic>? queryParameters,
});
Future<GuildProfile?> getProfile({required String token});
Future<List<IranProvinceCityModel>?> getProvince({CancelToken? cancelToken});
Future<List<IranProvinceCityModel>?> getCity({required String provinceName});
Future<UserProfile?> getUserProfile({required String token});
Future<void> updateUserProfile({
required String token,
required UserProfile userProfile,
});
Future<void> updatePassword({
required String token,
required ChangePasswordRequestModel model,
});
Future<PaginationModel<SegmentationModel>?> getSegmentation({
required String token,
Map<String, dynamic>? queryParameters,
});
Future<void> createSegmentation({
required String token,
required SegmentationModel model,
});
Future<void> editSegmentation({
required String token,
required SegmentationModel model,
});
Future<SegmentationModel?> deleteSegmentation({
required String token,
required String key,
});
Future<BroadcastPrice?> getBroadcastPrice({required String token});
//endregion
//region local
Future<void> initWidleyUsed();
WidelyUsedLocalModel? getAllWidely();
//endregion
}

View File

@@ -0,0 +1,172 @@
import 'package:rasadyar_chicken/features/common/data/datasources/local/chicken_local.dart';
import 'package:rasadyar_chicken/features/common/data/datasources/remote/common/common_remote.dart';
import 'package:rasadyar_chicken/features/common/data/model/local/widely_used_local_model.dart';
import 'package:rasadyar_chicken/features/common/data/model/request/change_password/change_password_request_model.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/bar_information/bar_information.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/broadcast_price/broadcast_price.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/guild/guild_model.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/guild_profile/guild_profile.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/inventory/inventory_model.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/iran_province_city/iran_province_city_model.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/kill_house_distribution_info/kill_house_distribution_info.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/roles_products/roles_products.dart';
import 'package:rasadyar_chicken/features/steward/data/model/response/segmentation_model/segmentation_model.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/user_profile/user_profile.dart';
import 'package:rasadyar_core/core.dart';
import 'common_repository.dart';
class CommonRepositoryImp implements CommonRepository {
final CommonRemoteDatasource remote;
final ChickenLocalDataSource local;
CommonRepositoryImp({required this.remote, required this.local});
//region Remote
@override
Future<List<InventoryModel>?> getInventory({
required String token,
CancelToken? cancelToken,
}) async {
var res = await remote.getInventory(token: token, cancelToken: cancelToken);
return res;
}
@override
Future<KillHouseDistributionInfo?> getKillHouseDistributionInfo({
required String token,
}) async {
var res = await remote.getKillHouseDistributionInfo(token: token);
return res;
}
@override
Future<BarInformation?> getGeneralBarInformation({
required String token,
Map<String, dynamic>? queryParameters,
}) async {
var res = await remote.getGeneralBarInformation(
token: token,
queryParameters: queryParameters,
);
return res;
}
@override
Future<List<ProductModel>?> getRolesProducts({required String token}) async {
var res = await remote.getRolesProducts(token: token);
return res;
}
@override
Future<List<GuildModel>?> getGuilds({
required String token,
Map<String, dynamic>? queryParameters,
}) async {
var res = await remote.getGuilds(
token: token,
queryParameters: queryParameters,
);
return res;
}
@override
Future<GuildProfile?> getProfile({required String token}) async {
var res = await remote.getProfile(token: token);
return res;
}
@override
Future<List<IranProvinceCityModel>?> getCity({
required String provinceName,
}) async {
var res = await remote.getCity(provinceName: provinceName);
return res;
}
@override
Future<List<IranProvinceCityModel>?> getProvince({
CancelToken? cancelToken,
}) async {
var res = await remote.getProvince(cancelToken: cancelToken);
return res;
}
@override
Future<UserProfile?> getUserProfile({required String token}) async {
var res = await remote.getUserProfile(token: token);
return res;
}
@override
Future<void> updateUserProfile({
required String token,
required UserProfile userProfile,
}) async {
await remote.updateUserProfile(token: token, userProfile: userProfile);
}
@override
Future<void> updatePassword({
required String token,
required ChangePasswordRequestModel model,
}) async {
await remote.updatePassword(token: token, model: model);
}
@override
Future<PaginationModel<SegmentationModel>?> getSegmentation({
required String token,
Map<String, dynamic>? queryParameters,
}) async {
var res = await remote.getSegmentation(
token: token,
queryParameters: queryParameters,
);
return res;
}
@override
Future<void> createSegmentation({
required String token,
required SegmentationModel model,
}) async {
await remote.createSegmentation(token: token, model: model);
}
@override
Future<void> editSegmentation({
required String token,
required SegmentationModel model,
}) async {
await remote.editSegmentation(token: token, model: model);
}
@override
Future<SegmentationModel?> deleteSegmentation({
required String token,
required String key,
}) async {
var res = await remote.deleteSegmentation(token: token, key: key);
return res;
}
@override
Future<BroadcastPrice?> getBroadcastPrice({required String token}) async {
var res = await remote.getBroadcastPrice(token: token);
return res;
}
//endregion
//region local
@override
WidelyUsedLocalModel? getAllWidely() => local.getAllWidely();
@override
Future<void> initWidleyUsed() async {
await local.initWidleyUsed();
}
//endregion
}

View File

@@ -4,9 +4,9 @@ import 'dart:io';
import 'package:flutter/material.dart';
import 'package:rasadyar_chicken/data/common/dio_error_handler.dart';
import 'package:rasadyar_chicken/data/di/chicken_di.dart';
import 'package:rasadyar_chicken/data/models/response/user_info/user_info_model.dart';
import 'package:rasadyar_chicken/data/models/response/user_profile_model/user_profile_model.dart';
import 'package:rasadyar_chicken/data/repositories/auth/auth_repository.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/user_info/user_info_model.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/user_profile_model/user_profile_model.dart';
import 'package:rasadyar_chicken/features/common/data/repositories/auth/auth_repository.dart';
import 'package:rasadyar_chicken/features/common/presentation/routes/routes.dart';
import 'package:rasadyar_chicken/features/steward/presentation/routes/routes.dart';
import 'package:rasadyar_chicken/presentation/widget/captcha/logic.dart';

View File

@@ -1,13 +1,13 @@
import 'package:flutter/material.dart';
import 'package:rasadyar_chicken/data/di/chicken_di.dart';
import 'package:rasadyar_chicken/data/models/request/change_password/change_password_request_model.dart';
import 'package:rasadyar_chicken/data/models/response/iran_province_city/iran_province_city_model.dart';
import 'package:rasadyar_chicken/data/models/response/user_profile/user_profile.dart';
import 'package:rasadyar_chicken/data/repositories/chicken/chicken_repository.dart';
import 'package:rasadyar_chicken/features/common/data/model/request/change_password/change_password_request_model.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/iran_province_city/iran_province_city_model.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/user_profile/user_profile.dart';
import 'package:rasadyar_chicken/features/common/data/repositories/common/common_repository.dart';
import 'package:rasadyar_core/core.dart';
class ProfileLogic extends GetxController {
ChickenRepository chickenRepository = diChicken.get<ChickenRepository>();
CommonRepository commonRepository = diChicken.get<CommonRepository>();
GService gService = Get.find<GService>();
TokenStorageService tokenService = Get.find<TokenStorageService>();
RxInt selectedInformationType = 0.obs;
@@ -79,11 +79,10 @@ class ProfileLogic extends GetxController {
});
}
Future<void> getUserProfile() async {
userProfile.value = Resource.loading();
await safeCall<UserProfile?>(
call: () async => await chickenRepository.getUserProfile(
call: () async => await commonRepository.getUserProfile(
token: tokenService.accessToken.value!,
),
onSuccess: (result) {
@@ -97,7 +96,7 @@ class ProfileLogic extends GetxController {
Future<void> getCites() async {
await safeCall(
call: () => chickenRepository.getCity(
call: () => commonRepository.getCity(
provinceName: selectedProvince.value?.name ?? '',
),
onSuccess: (result) {
@@ -124,7 +123,7 @@ class ProfileLogic extends GetxController {
);
isOnLoading.value = true;
await safeCall(
call: () async => await chickenRepository.updateUserProfile(
call: () async => await commonRepository.updateUserProfile(
token: tokenService.accessToken.value!,
userProfile: userProfile,
),
@@ -145,7 +144,7 @@ class ProfileLogic extends GetxController {
);
await safeCall(
call: () async => await chickenRepository.updatePassword(
call: () async => await commonRepository.updatePassword(
token: tokenService.accessToken.value!,
model: model,
),

View File

@@ -4,7 +4,7 @@ import 'package:flutter/cupertino.dart' hide Image;
import 'package:flutter/material.dart';
import 'package:rasadyar_chicken/data/common/fa_user_role.dart';
import 'package:rasadyar_chicken/data/di/chicken_di.dart';
import 'package:rasadyar_chicken/data/models/response/user_profile/user_profile.dart';
import 'package:rasadyar_chicken/features/common/data/model/response/user_profile/user_profile.dart';
import 'package:rasadyar_core/core.dart';
import 'logic.dart';

View File

@@ -1,3 +1,5 @@
abstract class PoultryFarmLocalDataSource {
// TODO: Implement local data source methods
}

View File

@@ -1,3 +1,5 @@
abstract class PoultryFarmRemoteDataSource {
Future<void> getPoultryFarms();
}

View File

@@ -1,3 +1,5 @@
abstract class PoultryFarmRepository {
// TODO: Implement repository interface
}

View File

@@ -1,3 +1,92 @@
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/hatching/hatching_models.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/hatching_report/hatching_report.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/home_poultry_science/home_poultry_science_model.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/poultry_farm/poultry_farm.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/approved_price/approved_price.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/all_poultry/all_poultry.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/sell_for_freezing/sell_for_freezing.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/poultry_export/poultry_export.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/kill_request_poultry/kill_request_poultry.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/poultry_hatching/poultry_hatching.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/kill_house_poultry/kill_house_poultry.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/model/request/kill_registration/kill_registration.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/poultry_order/poultry_order.dart';
import 'package:rasadyar_core/core.dart';
abstract class PoultryScienceRemoteDataSource {
Future<void> getPoultryScience();
Future<HomePoultryScienceModel?> getHomePoultryScience({
required String token,
required String type,
});
Future<PaginationModel<HatchingModel>?> getHatchingPoultry({
required String token,
Map<String, dynamic>? queryParameters,
});
Future<void> submitPoultryScienceReport({
required String token,
required FormData data,
ProgressCallback? onSendProgress,
});
Future<PaginationModel<HatchingReport>?> getPoultryScienceReport({
required String token,
Map<String, dynamic>? queryParameters,
});
Future<PaginationModel<PoultryFarm>?> getPoultryScienceFarmList({
required String token,
Map<String, dynamic>? queryParameters,
});
Future<ApprovedPrice?> getApprovedPrice({
required String token,
Map<String, dynamic>? queryParameters,
});
Future<List<AllPoultry>?> getAllPoultry({
required String token,
Map<String, dynamic>? queryParameters,
});
Future<SellForFreezing?> getSellForFreezing({
required String token,
Map<String, dynamic>? queryParameters,
});
Future<PoultryExport?> getPoultryExport({
required String token,
Map<String, dynamic>? queryParameters,
});
Future<List<KillRequestPoultry>?> getUserPoultry({
required String token,
Map<String, dynamic>? queryParameters,
});
Future<List<PoultryHatching>?> getPoultryHatching({
required String token,
Map<String, dynamic>? queryParameters,
});
Future<List<KillHousePoultry>?> getKillHouseList({
required String token,
Map<String, dynamic>? queryParameters,
});
Future<void> submitKillRegistration({
required String token,
required KillRegistrationRequest request,
});
Future<PaginationModel<PoultryOrder>?> getPoultryOderList({
required String token,
Map<String, dynamic>? queryParameters,
});
Future<void> deletePoultryOder({
required String token,
required String orderId,
});
}

View File

@@ -0,0 +1,249 @@
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/hatching/hatching_models.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/hatching_report/hatching_report.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/home_poultry_science/home_poultry_science_model.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/poultry_farm/poultry_farm.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/approved_price/approved_price.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/all_poultry/all_poultry.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/sell_for_freezing/sell_for_freezing.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/poultry_export/poultry_export.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/kill_request_poultry/kill_request_poultry.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/poultry_hatching/poultry_hatching.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/kill_house_poultry/kill_house_poultry.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/model/request/kill_registration/kill_registration.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/model/response/poultry_order/poultry_order.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/datasources/remote/poultry_science_remote_data_source.dart';
import 'package:rasadyar_core/core.dart';
class PoultryScienceRemoteDataSourceImpl
implements PoultryScienceRemoteDataSource {
final DioRemote _httpClient;
PoultryScienceRemoteDataSourceImpl(this._httpClient);
@override
Future<HomePoultryScienceModel?> getHomePoultryScience({
required String token,
required String type,
}) async {
var res = await _httpClient.get(
'/poultry_and_hatching_for_poultry_science/',
queryParameters: {'type': type},
headers: {'Authorization': 'Bearer $token'},
fromJson: (json) => HomePoultryScienceModel.fromJson(json),
);
return res.data;
}
@override
Future<PaginationModel<HatchingModel>?> getHatchingPoultry({
required String token,
Map<String, dynamic>? queryParameters,
}) async {
var res = await _httpClient.get(
'/poultry_and_hatching_for_poultry_science/',
headers: {'Authorization': 'Bearer $token'},
queryParameters: queryParameters,
fromJson: (json) => PaginationModel<HatchingModel>.fromJson(
json,
(json) => HatchingModel.fromJson(json as Map<String, dynamic>),
),
);
return res.data;
}
@override
Future<void> submitPoultryScienceReport({
required String token,
required FormData data,
ProgressCallback? onSendProgress,
}) async {
await _httpClient.post(
'/poultry_science_report/',
headers: {'Authorization': 'Bearer $token'},
data: data,
onSendProgress: onSendProgress,
);
}
@override
Future<PaginationModel<HatchingReport>?> getPoultryScienceReport({
required String token,
Map<String, dynamic>? queryParameters,
}) async {
var res = await _httpClient.get(
'/poultry_science_report/',
headers: {'Authorization': 'Bearer $token'},
queryParameters: queryParameters,
fromJson: (json) => PaginationModel<HatchingReport>.fromJson(
json,
(json) => HatchingReport.fromJson(json as Map<String, dynamic>),
),
);
return res.data;
}
@override
Future<PaginationModel<PoultryFarm>?> getPoultryScienceFarmList({
required String token,
Map<String, dynamic>? queryParameters,
}) async {
var res = await _httpClient.get(
'/poultry_and_hatching_for_poultry_science/',
headers: {'Authorization': 'Bearer $token'},
queryParameters: queryParameters,
fromJson: (json) => PaginationModel<PoultryFarm>.fromJson(
json,
(json) => PoultryFarm.fromJson(json as Map<String, dynamic>),
),
);
return res.data;
}
//region kill Registration
@override
Future<ApprovedPrice?> getApprovedPrice({
required String token,
Map<String, dynamic>? queryParameters,
}) async {
var res = await _httpClient.get(
'/approved-price/',
headers: {'Authorization': 'Bearer $token'},
queryParameters: queryParameters,
fromJson: (json) => ApprovedPrice.fromJson(json),
);
return res.data;
}
@override
Future<List<AllPoultry>?> getAllPoultry({
required String token,
Map<String, dynamic>? queryParameters,
}) async {
var res = await _httpClient.get(
'/get-all-poultry/',
headers: {'Authorization': 'Bearer $token'},
queryParameters: queryParameters,
fromJsonList: (json) => json
.map((e) => AllPoultry.fromJson(e as Map<String, dynamic>))
.toList(),
);
return res.data;
}
@override
Future<PoultryExport?> getPoultryExport({
required String token,
Map<String, dynamic>? queryParameters,
}) async {
var res = await _httpClient.get(
'/poultry-export/',
headers: {'Authorization': 'Bearer $token'},
queryParameters: queryParameters,
fromJson: (json) => PoultryExport.fromJson(json),
);
return res.data;
}
@override
Future<SellForFreezing?> getSellForFreezing({
required String token,
Map<String, dynamic>? queryParameters,
}) async {
var res = await _httpClient.get(
'/sell-for-freezing/',
headers: {'Authorization': 'Bearer $token'},
queryParameters: queryParameters,
fromJson: (json) => SellForFreezing.fromJson(json),
);
return res.data;
}
@override
Future<List<KillRequestPoultry>?> getUserPoultry({
required String token,
Map<String, dynamic>? queryParameters,
}) async {
var res = await _httpClient.get(
'/Poultry/',
headers: {'Authorization': 'Bearer $token'},
queryParameters: queryParameters,
fromJsonList: (json) =>
json.map((e) => KillRequestPoultry.fromJson(e)).toList(),
);
return res.data;
}
@override
Future<List<PoultryHatching>?> getPoultryHatching({
required String token,
Map<String, dynamic>? queryParameters,
}) async {
var res = await _httpClient.get(
'/poultry_hatching/',
headers: {'Authorization': 'Bearer $token'},
queryParameters: queryParameters,
fromJsonList: (json) =>
json.map((e) => PoultryHatching.fromJson(e)).toList(),
);
return res.data;
}
@override
Future<List<KillHousePoultry>?> getKillHouseList({
required String token,
Map<String, dynamic>? queryParameters,
}) async {
var res = await _httpClient.get(
'/kill_house_list/',
headers: {'Authorization': 'Bearer $token'},
queryParameters: queryParameters,
fromJsonList: (json) =>
json.map((e) => KillHousePoultry.fromJson(e)).toList(),
);
return res.data;
}
@override
Future<void> submitKillRegistration({
required String token,
required KillRegistrationRequest request,
}) async {
await _httpClient.post(
'/Poultry_Request/',
headers: {'Authorization': 'Bearer $token'},
data: request.toJson(),
);
}
@override
Future<PaginationModel<PoultryOrder>?> getPoultryOderList({
required String token,
Map<String, dynamic>? queryParameters,
}) async {
var res = await _httpClient.get(
'/Poultry_Request/',
headers: {'Authorization': 'Bearer $token'},
queryParameters: queryParameters,
fromJson: (json) => PaginationModel<PoultryOrder>.fromJson(
json,
(data) => PoultryOrder.fromJson(data as Map<String, dynamic>),
),
);
return res.data;
}
@override
Future<void> deletePoultryOder({
required String token,
required String orderId,
}) async {
await _httpClient.delete(
'/Poultry_Request/$orderId/',
headers: {'Authorization': 'Bearer $token'},
);
}
//endregion
}

View File

@@ -0,0 +1,38 @@
import 'package:rasadyar_chicken/features/poultry_science/data/datasources/remote/poultry_science_remote_data_source.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/datasources/remote/poultry_science_remote_data_source_impl.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/repositories/poultry_science_repository.dart';
import 'package:rasadyar_chicken/features/poultry_science/data/repositories/poultry_science_repository_impl.dart';
import 'package:rasadyar_core/core.dart';
/// Setup dependency injection for poultry_science feature
Future<void> setupPoultryScienceDI(GetIt di, DioRemote dioRemote) async {
di.registerLazySingleton<PoultryScienceRemoteDataSource>(
() => PoultryScienceRemoteDataSourceImpl(dioRemote),
);
di.registerLazySingleton<PoultryScienceRepository>(
() =>
PoultryScienceRepositoryImpl(di.get<PoultryScienceRemoteDataSource>()),
);
}
/// Re-register poultry_science dependencies (used when base URL changes)
Future<void> reRegisterPoultryScienceDI(GetIt di, DioRemote dioRemote) async {
await reRegister(di, () => PoultryScienceRemoteDataSourceImpl(dioRemote));
await reRegister(
di,
() =>
PoultryScienceRepositoryImpl(di.get<PoultryScienceRemoteDataSource>()),
);
}
/// Helper function to re-register a dependency
Future<void> reRegister<T extends Object>(
GetIt di,
T Function() factory,
) async {
if (di.isRegistered<T>()) {
await di.unregister<T>();
}
di.registerLazySingleton<T>(factory);
}

View File

@@ -0,0 +1,36 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'kill_registration.freezed.dart';
part 'kill_registration.g.dart';
@freezed
abstract class KillRegistrationRequest with _$KillRegistrationRequest {
const factory KillRegistrationRequest({
bool? approvedPrice,
bool? market,
String? killReqKey,
String? operatorKey,
String? poultryHatchingKey,
int? quantity,
String? sendDate,
String? chickenBreed,
// ignore: invalid_annotation_target
@JsonKey(name: "Index_weight") double? indexWeight,
String? losses,
List<dynamic>? auctionList,
bool? freezing,
bool? export,
bool? cash,
bool? credit,
List<dynamic>? killHouseList,
String? role,
String? poultryKey,
int? amount,
String? financialOperation,
bool? freeSaleInProvince,
String? confirmPoultryMobile,
}) = _KillRegistrationRequest;
factory KillRegistrationRequest.fromJson(Map<String, dynamic> json) =>
_$KillRegistrationRequestFromJson(json);
}

View File

@@ -0,0 +1,358 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'kill_registration.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$KillRegistrationRequest {
bool? get approvedPrice; bool? get market; String? get killReqKey; String? get operatorKey; String? get poultryHatchingKey; int? get quantity; String? get sendDate; String? get chickenBreed;// ignore: invalid_annotation_target
@JsonKey(name: "Index_weight") double? get indexWeight; String? get losses; List<dynamic>? get auctionList; bool? get freezing; bool? get export; bool? get cash; bool? get credit; List<dynamic>? get killHouseList; String? get role; String? get poultryKey; int? get amount; String? get financialOperation; bool? get freeSaleInProvince; String? get confirmPoultryMobile;
/// Create a copy of KillRegistrationRequest
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$KillRegistrationRequestCopyWith<KillRegistrationRequest> get copyWith => _$KillRegistrationRequestCopyWithImpl<KillRegistrationRequest>(this as KillRegistrationRequest, _$identity);
/// Serializes this KillRegistrationRequest to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is KillRegistrationRequest&&(identical(other.approvedPrice, approvedPrice) || other.approvedPrice == approvedPrice)&&(identical(other.market, market) || other.market == market)&&(identical(other.killReqKey, killReqKey) || other.killReqKey == killReqKey)&&(identical(other.operatorKey, operatorKey) || other.operatorKey == operatorKey)&&(identical(other.poultryHatchingKey, poultryHatchingKey) || other.poultryHatchingKey == poultryHatchingKey)&&(identical(other.quantity, quantity) || other.quantity == quantity)&&(identical(other.sendDate, sendDate) || other.sendDate == sendDate)&&(identical(other.chickenBreed, chickenBreed) || other.chickenBreed == chickenBreed)&&(identical(other.indexWeight, indexWeight) || other.indexWeight == indexWeight)&&(identical(other.losses, losses) || other.losses == losses)&&const DeepCollectionEquality().equals(other.auctionList, auctionList)&&(identical(other.freezing, freezing) || other.freezing == freezing)&&(identical(other.export, export) || other.export == export)&&(identical(other.cash, cash) || other.cash == cash)&&(identical(other.credit, credit) || other.credit == credit)&&const DeepCollectionEquality().equals(other.killHouseList, killHouseList)&&(identical(other.role, role) || other.role == role)&&(identical(other.poultryKey, poultryKey) || other.poultryKey == poultryKey)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.financialOperation, financialOperation) || other.financialOperation == financialOperation)&&(identical(other.freeSaleInProvince, freeSaleInProvince) || other.freeSaleInProvince == freeSaleInProvince)&&(identical(other.confirmPoultryMobile, confirmPoultryMobile) || other.confirmPoultryMobile == confirmPoultryMobile));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hashAll([runtimeType,approvedPrice,market,killReqKey,operatorKey,poultryHatchingKey,quantity,sendDate,chickenBreed,indexWeight,losses,const DeepCollectionEquality().hash(auctionList),freezing,export,cash,credit,const DeepCollectionEquality().hash(killHouseList),role,poultryKey,amount,financialOperation,freeSaleInProvince,confirmPoultryMobile]);
@override
String toString() {
return 'KillRegistrationRequest(approvedPrice: $approvedPrice, market: $market, killReqKey: $killReqKey, operatorKey: $operatorKey, poultryHatchingKey: $poultryHatchingKey, quantity: $quantity, sendDate: $sendDate, chickenBreed: $chickenBreed, indexWeight: $indexWeight, losses: $losses, auctionList: $auctionList, freezing: $freezing, export: $export, cash: $cash, credit: $credit, killHouseList: $killHouseList, role: $role, poultryKey: $poultryKey, amount: $amount, financialOperation: $financialOperation, freeSaleInProvince: $freeSaleInProvince, confirmPoultryMobile: $confirmPoultryMobile)';
}
}
/// @nodoc
abstract mixin class $KillRegistrationRequestCopyWith<$Res> {
factory $KillRegistrationRequestCopyWith(KillRegistrationRequest value, $Res Function(KillRegistrationRequest) _then) = _$KillRegistrationRequestCopyWithImpl;
@useResult
$Res call({
bool? approvedPrice, bool? market, String? killReqKey, String? operatorKey, String? poultryHatchingKey, int? quantity, String? sendDate, String? chickenBreed,@JsonKey(name: "Index_weight") double? indexWeight, String? losses, List<dynamic>? auctionList, bool? freezing, bool? export, bool? cash, bool? credit, List<dynamic>? killHouseList, String? role, String? poultryKey, int? amount, String? financialOperation, bool? freeSaleInProvince, String? confirmPoultryMobile
});
}
/// @nodoc
class _$KillRegistrationRequestCopyWithImpl<$Res>
implements $KillRegistrationRequestCopyWith<$Res> {
_$KillRegistrationRequestCopyWithImpl(this._self, this._then);
final KillRegistrationRequest _self;
final $Res Function(KillRegistrationRequest) _then;
/// Create a copy of KillRegistrationRequest
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? approvedPrice = freezed,Object? market = freezed,Object? killReqKey = freezed,Object? operatorKey = freezed,Object? poultryHatchingKey = freezed,Object? quantity = freezed,Object? sendDate = freezed,Object? chickenBreed = freezed,Object? indexWeight = freezed,Object? losses = freezed,Object? auctionList = freezed,Object? freezing = freezed,Object? export = freezed,Object? cash = freezed,Object? credit = freezed,Object? killHouseList = freezed,Object? role = freezed,Object? poultryKey = freezed,Object? amount = freezed,Object? financialOperation = freezed,Object? freeSaleInProvince = freezed,Object? confirmPoultryMobile = freezed,}) {
return _then(_self.copyWith(
approvedPrice: freezed == approvedPrice ? _self.approvedPrice : approvedPrice // ignore: cast_nullable_to_non_nullable
as bool?,market: freezed == market ? _self.market : market // ignore: cast_nullable_to_non_nullable
as bool?,killReqKey: freezed == killReqKey ? _self.killReqKey : killReqKey // ignore: cast_nullable_to_non_nullable
as String?,operatorKey: freezed == operatorKey ? _self.operatorKey : operatorKey // ignore: cast_nullable_to_non_nullable
as String?,poultryHatchingKey: freezed == poultryHatchingKey ? _self.poultryHatchingKey : poultryHatchingKey // ignore: cast_nullable_to_non_nullable
as String?,quantity: freezed == quantity ? _self.quantity : quantity // ignore: cast_nullable_to_non_nullable
as int?,sendDate: freezed == sendDate ? _self.sendDate : sendDate // ignore: cast_nullable_to_non_nullable
as String?,chickenBreed: freezed == chickenBreed ? _self.chickenBreed : chickenBreed // ignore: cast_nullable_to_non_nullable
as String?,indexWeight: freezed == indexWeight ? _self.indexWeight : indexWeight // ignore: cast_nullable_to_non_nullable
as double?,losses: freezed == losses ? _self.losses : losses // ignore: cast_nullable_to_non_nullable
as String?,auctionList: freezed == auctionList ? _self.auctionList : auctionList // ignore: cast_nullable_to_non_nullable
as List<dynamic>?,freezing: freezed == freezing ? _self.freezing : freezing // ignore: cast_nullable_to_non_nullable
as bool?,export: freezed == export ? _self.export : export // ignore: cast_nullable_to_non_nullable
as bool?,cash: freezed == cash ? _self.cash : cash // ignore: cast_nullable_to_non_nullable
as bool?,credit: freezed == credit ? _self.credit : credit // ignore: cast_nullable_to_non_nullable
as bool?,killHouseList: freezed == killHouseList ? _self.killHouseList : killHouseList // ignore: cast_nullable_to_non_nullable
as List<dynamic>?,role: freezed == role ? _self.role : role // ignore: cast_nullable_to_non_nullable
as String?,poultryKey: freezed == poultryKey ? _self.poultryKey : poultryKey // ignore: cast_nullable_to_non_nullable
as String?,amount: freezed == amount ? _self.amount : amount // ignore: cast_nullable_to_non_nullable
as int?,financialOperation: freezed == financialOperation ? _self.financialOperation : financialOperation // ignore: cast_nullable_to_non_nullable
as String?,freeSaleInProvince: freezed == freeSaleInProvince ? _self.freeSaleInProvince : freeSaleInProvince // ignore: cast_nullable_to_non_nullable
as bool?,confirmPoultryMobile: freezed == confirmPoultryMobile ? _self.confirmPoultryMobile : confirmPoultryMobile // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// Adds pattern-matching-related methods to [KillRegistrationRequest].
extension KillRegistrationRequestPatterns on KillRegistrationRequest {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _KillRegistrationRequest value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _KillRegistrationRequest() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _KillRegistrationRequest value) $default,){
final _that = this;
switch (_that) {
case _KillRegistrationRequest():
return $default(_that);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _KillRegistrationRequest value)? $default,){
final _that = this;
switch (_that) {
case _KillRegistrationRequest() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool? approvedPrice, bool? market, String? killReqKey, String? operatorKey, String? poultryHatchingKey, int? quantity, String? sendDate, String? chickenBreed, @JsonKey(name: "Index_weight") double? indexWeight, String? losses, List<dynamic>? auctionList, bool? freezing, bool? export, bool? cash, bool? credit, List<dynamic>? killHouseList, String? role, String? poultryKey, int? amount, String? financialOperation, bool? freeSaleInProvince, String? confirmPoultryMobile)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _KillRegistrationRequest() when $default != null:
return $default(_that.approvedPrice,_that.market,_that.killReqKey,_that.operatorKey,_that.poultryHatchingKey,_that.quantity,_that.sendDate,_that.chickenBreed,_that.indexWeight,_that.losses,_that.auctionList,_that.freezing,_that.export,_that.cash,_that.credit,_that.killHouseList,_that.role,_that.poultryKey,_that.amount,_that.financialOperation,_that.freeSaleInProvince,_that.confirmPoultryMobile);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool? approvedPrice, bool? market, String? killReqKey, String? operatorKey, String? poultryHatchingKey, int? quantity, String? sendDate, String? chickenBreed, @JsonKey(name: "Index_weight") double? indexWeight, String? losses, List<dynamic>? auctionList, bool? freezing, bool? export, bool? cash, bool? credit, List<dynamic>? killHouseList, String? role, String? poultryKey, int? amount, String? financialOperation, bool? freeSaleInProvince, String? confirmPoultryMobile) $default,) {final _that = this;
switch (_that) {
case _KillRegistrationRequest():
return $default(_that.approvedPrice,_that.market,_that.killReqKey,_that.operatorKey,_that.poultryHatchingKey,_that.quantity,_that.sendDate,_that.chickenBreed,_that.indexWeight,_that.losses,_that.auctionList,_that.freezing,_that.export,_that.cash,_that.credit,_that.killHouseList,_that.role,_that.poultryKey,_that.amount,_that.financialOperation,_that.freeSaleInProvince,_that.confirmPoultryMobile);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool? approvedPrice, bool? market, String? killReqKey, String? operatorKey, String? poultryHatchingKey, int? quantity, String? sendDate, String? chickenBreed, @JsonKey(name: "Index_weight") double? indexWeight, String? losses, List<dynamic>? auctionList, bool? freezing, bool? export, bool? cash, bool? credit, List<dynamic>? killHouseList, String? role, String? poultryKey, int? amount, String? financialOperation, bool? freeSaleInProvince, String? confirmPoultryMobile)? $default,) {final _that = this;
switch (_that) {
case _KillRegistrationRequest() when $default != null:
return $default(_that.approvedPrice,_that.market,_that.killReqKey,_that.operatorKey,_that.poultryHatchingKey,_that.quantity,_that.sendDate,_that.chickenBreed,_that.indexWeight,_that.losses,_that.auctionList,_that.freezing,_that.export,_that.cash,_that.credit,_that.killHouseList,_that.role,_that.poultryKey,_that.amount,_that.financialOperation,_that.freeSaleInProvince,_that.confirmPoultryMobile);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _KillRegistrationRequest implements KillRegistrationRequest {
const _KillRegistrationRequest({this.approvedPrice, this.market, this.killReqKey, this.operatorKey, this.poultryHatchingKey, this.quantity, this.sendDate, this.chickenBreed, @JsonKey(name: "Index_weight") this.indexWeight, this.losses, final List<dynamic>? auctionList, this.freezing, this.export, this.cash, this.credit, final List<dynamic>? killHouseList, this.role, this.poultryKey, this.amount, this.financialOperation, this.freeSaleInProvince, this.confirmPoultryMobile}): _auctionList = auctionList,_killHouseList = killHouseList;
factory _KillRegistrationRequest.fromJson(Map<String, dynamic> json) => _$KillRegistrationRequestFromJson(json);
@override final bool? approvedPrice;
@override final bool? market;
@override final String? killReqKey;
@override final String? operatorKey;
@override final String? poultryHatchingKey;
@override final int? quantity;
@override final String? sendDate;
@override final String? chickenBreed;
// ignore: invalid_annotation_target
@override@JsonKey(name: "Index_weight") final double? indexWeight;
@override final String? losses;
final List<dynamic>? _auctionList;
@override List<dynamic>? get auctionList {
final value = _auctionList;
if (value == null) return null;
if (_auctionList is EqualUnmodifiableListView) return _auctionList;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
@override final bool? freezing;
@override final bool? export;
@override final bool? cash;
@override final bool? credit;
final List<dynamic>? _killHouseList;
@override List<dynamic>? get killHouseList {
final value = _killHouseList;
if (value == null) return null;
if (_killHouseList is EqualUnmodifiableListView) return _killHouseList;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
@override final String? role;
@override final String? poultryKey;
@override final int? amount;
@override final String? financialOperation;
@override final bool? freeSaleInProvince;
@override final String? confirmPoultryMobile;
/// Create a copy of KillRegistrationRequest
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$KillRegistrationRequestCopyWith<_KillRegistrationRequest> get copyWith => __$KillRegistrationRequestCopyWithImpl<_KillRegistrationRequest>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$KillRegistrationRequestToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _KillRegistrationRequest&&(identical(other.approvedPrice, approvedPrice) || other.approvedPrice == approvedPrice)&&(identical(other.market, market) || other.market == market)&&(identical(other.killReqKey, killReqKey) || other.killReqKey == killReqKey)&&(identical(other.operatorKey, operatorKey) || other.operatorKey == operatorKey)&&(identical(other.poultryHatchingKey, poultryHatchingKey) || other.poultryHatchingKey == poultryHatchingKey)&&(identical(other.quantity, quantity) || other.quantity == quantity)&&(identical(other.sendDate, sendDate) || other.sendDate == sendDate)&&(identical(other.chickenBreed, chickenBreed) || other.chickenBreed == chickenBreed)&&(identical(other.indexWeight, indexWeight) || other.indexWeight == indexWeight)&&(identical(other.losses, losses) || other.losses == losses)&&const DeepCollectionEquality().equals(other._auctionList, _auctionList)&&(identical(other.freezing, freezing) || other.freezing == freezing)&&(identical(other.export, export) || other.export == export)&&(identical(other.cash, cash) || other.cash == cash)&&(identical(other.credit, credit) || other.credit == credit)&&const DeepCollectionEquality().equals(other._killHouseList, _killHouseList)&&(identical(other.role, role) || other.role == role)&&(identical(other.poultryKey, poultryKey) || other.poultryKey == poultryKey)&&(identical(other.amount, amount) || other.amount == amount)&&(identical(other.financialOperation, financialOperation) || other.financialOperation == financialOperation)&&(identical(other.freeSaleInProvince, freeSaleInProvince) || other.freeSaleInProvince == freeSaleInProvince)&&(identical(other.confirmPoultryMobile, confirmPoultryMobile) || other.confirmPoultryMobile == confirmPoultryMobile));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hashAll([runtimeType,approvedPrice,market,killReqKey,operatorKey,poultryHatchingKey,quantity,sendDate,chickenBreed,indexWeight,losses,const DeepCollectionEquality().hash(_auctionList),freezing,export,cash,credit,const DeepCollectionEquality().hash(_killHouseList),role,poultryKey,amount,financialOperation,freeSaleInProvince,confirmPoultryMobile]);
@override
String toString() {
return 'KillRegistrationRequest(approvedPrice: $approvedPrice, market: $market, killReqKey: $killReqKey, operatorKey: $operatorKey, poultryHatchingKey: $poultryHatchingKey, quantity: $quantity, sendDate: $sendDate, chickenBreed: $chickenBreed, indexWeight: $indexWeight, losses: $losses, auctionList: $auctionList, freezing: $freezing, export: $export, cash: $cash, credit: $credit, killHouseList: $killHouseList, role: $role, poultryKey: $poultryKey, amount: $amount, financialOperation: $financialOperation, freeSaleInProvince: $freeSaleInProvince, confirmPoultryMobile: $confirmPoultryMobile)';
}
}
/// @nodoc
abstract mixin class _$KillRegistrationRequestCopyWith<$Res> implements $KillRegistrationRequestCopyWith<$Res> {
factory _$KillRegistrationRequestCopyWith(_KillRegistrationRequest value, $Res Function(_KillRegistrationRequest) _then) = __$KillRegistrationRequestCopyWithImpl;
@override @useResult
$Res call({
bool? approvedPrice, bool? market, String? killReqKey, String? operatorKey, String? poultryHatchingKey, int? quantity, String? sendDate, String? chickenBreed,@JsonKey(name: "Index_weight") double? indexWeight, String? losses, List<dynamic>? auctionList, bool? freezing, bool? export, bool? cash, bool? credit, List<dynamic>? killHouseList, String? role, String? poultryKey, int? amount, String? financialOperation, bool? freeSaleInProvince, String? confirmPoultryMobile
});
}
/// @nodoc
class __$KillRegistrationRequestCopyWithImpl<$Res>
implements _$KillRegistrationRequestCopyWith<$Res> {
__$KillRegistrationRequestCopyWithImpl(this._self, this._then);
final _KillRegistrationRequest _self;
final $Res Function(_KillRegistrationRequest) _then;
/// Create a copy of KillRegistrationRequest
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? approvedPrice = freezed,Object? market = freezed,Object? killReqKey = freezed,Object? operatorKey = freezed,Object? poultryHatchingKey = freezed,Object? quantity = freezed,Object? sendDate = freezed,Object? chickenBreed = freezed,Object? indexWeight = freezed,Object? losses = freezed,Object? auctionList = freezed,Object? freezing = freezed,Object? export = freezed,Object? cash = freezed,Object? credit = freezed,Object? killHouseList = freezed,Object? role = freezed,Object? poultryKey = freezed,Object? amount = freezed,Object? financialOperation = freezed,Object? freeSaleInProvince = freezed,Object? confirmPoultryMobile = freezed,}) {
return _then(_KillRegistrationRequest(
approvedPrice: freezed == approvedPrice ? _self.approvedPrice : approvedPrice // ignore: cast_nullable_to_non_nullable
as bool?,market: freezed == market ? _self.market : market // ignore: cast_nullable_to_non_nullable
as bool?,killReqKey: freezed == killReqKey ? _self.killReqKey : killReqKey // ignore: cast_nullable_to_non_nullable
as String?,operatorKey: freezed == operatorKey ? _self.operatorKey : operatorKey // ignore: cast_nullable_to_non_nullable
as String?,poultryHatchingKey: freezed == poultryHatchingKey ? _self.poultryHatchingKey : poultryHatchingKey // ignore: cast_nullable_to_non_nullable
as String?,quantity: freezed == quantity ? _self.quantity : quantity // ignore: cast_nullable_to_non_nullable
as int?,sendDate: freezed == sendDate ? _self.sendDate : sendDate // ignore: cast_nullable_to_non_nullable
as String?,chickenBreed: freezed == chickenBreed ? _self.chickenBreed : chickenBreed // ignore: cast_nullable_to_non_nullable
as String?,indexWeight: freezed == indexWeight ? _self.indexWeight : indexWeight // ignore: cast_nullable_to_non_nullable
as double?,losses: freezed == losses ? _self.losses : losses // ignore: cast_nullable_to_non_nullable
as String?,auctionList: freezed == auctionList ? _self._auctionList : auctionList // ignore: cast_nullable_to_non_nullable
as List<dynamic>?,freezing: freezed == freezing ? _self.freezing : freezing // ignore: cast_nullable_to_non_nullable
as bool?,export: freezed == export ? _self.export : export // ignore: cast_nullable_to_non_nullable
as bool?,cash: freezed == cash ? _self.cash : cash // ignore: cast_nullable_to_non_nullable
as bool?,credit: freezed == credit ? _self.credit : credit // ignore: cast_nullable_to_non_nullable
as bool?,killHouseList: freezed == killHouseList ? _self._killHouseList : killHouseList // ignore: cast_nullable_to_non_nullable
as List<dynamic>?,role: freezed == role ? _self.role : role // ignore: cast_nullable_to_non_nullable
as String?,poultryKey: freezed == poultryKey ? _self.poultryKey : poultryKey // ignore: cast_nullable_to_non_nullable
as String?,amount: freezed == amount ? _self.amount : amount // ignore: cast_nullable_to_non_nullable
as int?,financialOperation: freezed == financialOperation ? _self.financialOperation : financialOperation // ignore: cast_nullable_to_non_nullable
as String?,freeSaleInProvince: freezed == freeSaleInProvince ? _self.freeSaleInProvince : freeSaleInProvince // ignore: cast_nullable_to_non_nullable
as bool?,confirmPoultryMobile: freezed == confirmPoultryMobile ? _self.confirmPoultryMobile : confirmPoultryMobile // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
// dart format on

View File

@@ -0,0 +1,61 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'kill_registration.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_KillRegistrationRequest _$KillRegistrationRequestFromJson(
Map<String, dynamic> json,
) => _KillRegistrationRequest(
approvedPrice: json['approved_price'] as bool?,
market: json['market'] as bool?,
killReqKey: json['kill_req_key'] as String?,
operatorKey: json['operator_key'] as String?,
poultryHatchingKey: json['poultry_hatching_key'] as String?,
quantity: (json['quantity'] as num?)?.toInt(),
sendDate: json['send_date'] as String?,
chickenBreed: json['chicken_breed'] as String?,
indexWeight: (json['Index_weight'] as num?)?.toDouble(),
losses: json['losses'] as String?,
auctionList: json['auction_list'] as List<dynamic>?,
freezing: json['freezing'] as bool?,
export: json['export'] as bool?,
cash: json['cash'] as bool?,
credit: json['credit'] as bool?,
killHouseList: json['kill_house_list'] as List<dynamic>?,
role: json['role'] as String?,
poultryKey: json['poultry_key'] as String?,
amount: (json['amount'] as num?)?.toInt(),
financialOperation: json['financial_operation'] as String?,
freeSaleInProvince: json['free_sale_in_province'] as bool?,
confirmPoultryMobile: json['confirm_poultry_mobile'] as String?,
);
Map<String, dynamic> _$KillRegistrationRequestToJson(
_KillRegistrationRequest instance,
) => <String, dynamic>{
'approved_price': instance.approvedPrice,
'market': instance.market,
'kill_req_key': instance.killReqKey,
'operator_key': instance.operatorKey,
'poultry_hatching_key': instance.poultryHatchingKey,
'quantity': instance.quantity,
'send_date': instance.sendDate,
'chicken_breed': instance.chickenBreed,
'Index_weight': instance.indexWeight,
'losses': instance.losses,
'auction_list': instance.auctionList,
'freezing': instance.freezing,
'export': instance.export,
'cash': instance.cash,
'credit': instance.credit,
'kill_house_list': instance.killHouseList,
'role': instance.role,
'poultry_key': instance.poultryKey,
'amount': instance.amount,
'financial_operation': instance.financialOperation,
'free_sale_in_province': instance.freeSaleInProvince,
'confirm_poultry_mobile': instance.confirmPoultryMobile,
};

View File

@@ -0,0 +1,60 @@
import 'package:rasadyar_core/core.dart';
part 'all_poultry.freezed.dart';
part 'all_poultry.g.dart';
@freezed
abstract class AllPoultry with _$AllPoultry {
const factory AllPoultry({
User? user,
String? key,
String? unitName,
Address? address,
int? lastHatchingRemainQuantity,
bool? provinceAllowSellFree,
ChainCompany? chainCompany,
}) = _AllPoultry;
factory AllPoultry.fromJson(Map<String, dynamic> json) =>
_$AllPoultryFromJson(json);
}
@freezed
abstract class User with _$User {
const factory User({
String? fullname,
String? mobile,
}) = _User;
factory User.fromJson(Map<String, dynamic> json) => _$UserFromJson(json);
}
@freezed
abstract class Address with _$Address {
const factory Address({
City? city,
}) = _Address;
factory Address.fromJson(Map<String, dynamic> json) =>
_$AddressFromJson(json);
}
@freezed
abstract class City with _$City {
const factory City({
String? name,
}) = _City;
factory City.fromJson(Map<String, dynamic> json) => _$CityFromJson(json);
}
@freezed
abstract class ChainCompany with _$ChainCompany {
const factory ChainCompany({
bool? chainCompany,
String? hatchingKey,
}) = _ChainCompany;
factory ChainCompany.fromJson(Map<String, dynamic> json) =>
_$ChainCompanyFromJson(json);
}

View File

@@ -0,0 +1,74 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'all_poultry.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_AllPoultry _$AllPoultryFromJson(Map<String, dynamic> json) => _AllPoultry(
user: json['user'] == null
? null
: User.fromJson(json['user'] as Map<String, dynamic>),
key: json['key'] as String?,
unitName: json['unit_name'] as String?,
address: json['address'] == null
? null
: Address.fromJson(json['address'] as Map<String, dynamic>),
lastHatchingRemainQuantity: (json['last_hatching_remain_quantity'] as num?)
?.toInt(),
provinceAllowSellFree: json['province_allow_sell_free'] as bool?,
chainCompany: json['chain_company'] == null
? null
: ChainCompany.fromJson(json['chain_company'] as Map<String, dynamic>),
);
Map<String, dynamic> _$AllPoultryToJson(_AllPoultry instance) =>
<String, dynamic>{
'user': instance.user,
'key': instance.key,
'unit_name': instance.unitName,
'address': instance.address,
'last_hatching_remain_quantity': instance.lastHatchingRemainQuantity,
'province_allow_sell_free': instance.provinceAllowSellFree,
'chain_company': instance.chainCompany,
};
_User _$UserFromJson(Map<String, dynamic> json) => _User(
fullname: json['fullname'] as String?,
mobile: json['mobile'] as String?,
);
Map<String, dynamic> _$UserToJson(_User instance) => <String, dynamic>{
'fullname': instance.fullname,
'mobile': instance.mobile,
};
_Address _$AddressFromJson(Map<String, dynamic> json) => _Address(
city: json['city'] == null
? null
: City.fromJson(json['city'] as Map<String, dynamic>),
);
Map<String, dynamic> _$AddressToJson(_Address instance) => <String, dynamic>{
'city': instance.city,
};
_City _$CityFromJson(Map<String, dynamic> json) =>
_City(name: json['name'] as String?);
Map<String, dynamic> _$CityToJson(_City instance) => <String, dynamic>{
'name': instance.name,
};
_ChainCompany _$ChainCompanyFromJson(Map<String, dynamic> json) =>
_ChainCompany(
chainCompany: json['chain_company'] as bool?,
hatchingKey: json['hatching_key'] as String?,
);
Map<String, dynamic> _$ChainCompanyToJson(_ChainCompany instance) =>
<String, dynamic>{
'chain_company': instance.chainCompany,
'hatching_key': instance.hatchingKey,
};

View File

@@ -0,0 +1,18 @@
import 'package:rasadyar_core/core.dart';
part 'approved_price.freezed.dart';
part 'approved_price.g.dart';
@freezed
abstract class ApprovedPrice with _$ApprovedPrice {
const factory ApprovedPrice({
bool? approved,
double? lowestPrice,
double? highestPrice,
double? lowestWeight,
double? highestWeight,
}) = _ApprovedPrice;
factory ApprovedPrice.fromJson(Map<String, dynamic> json) =>
_$ApprovedPriceFromJson(json);
}

View File

@@ -0,0 +1,289 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'approved_price.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$ApprovedPrice {
bool? get approved; double? get lowestPrice; double? get highestPrice; double? get lowestWeight; double? get highestWeight;
/// Create a copy of ApprovedPrice
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$ApprovedPriceCopyWith<ApprovedPrice> get copyWith => _$ApprovedPriceCopyWithImpl<ApprovedPrice>(this as ApprovedPrice, _$identity);
/// Serializes this ApprovedPrice to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is ApprovedPrice&&(identical(other.approved, approved) || other.approved == approved)&&(identical(other.lowestPrice, lowestPrice) || other.lowestPrice == lowestPrice)&&(identical(other.highestPrice, highestPrice) || other.highestPrice == highestPrice)&&(identical(other.lowestWeight, lowestWeight) || other.lowestWeight == lowestWeight)&&(identical(other.highestWeight, highestWeight) || other.highestWeight == highestWeight));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,approved,lowestPrice,highestPrice,lowestWeight,highestWeight);
@override
String toString() {
return 'ApprovedPrice(approved: $approved, lowestPrice: $lowestPrice, highestPrice: $highestPrice, lowestWeight: $lowestWeight, highestWeight: $highestWeight)';
}
}
/// @nodoc
abstract mixin class $ApprovedPriceCopyWith<$Res> {
factory $ApprovedPriceCopyWith(ApprovedPrice value, $Res Function(ApprovedPrice) _then) = _$ApprovedPriceCopyWithImpl;
@useResult
$Res call({
bool? approved, double? lowestPrice, double? highestPrice, double? lowestWeight, double? highestWeight
});
}
/// @nodoc
class _$ApprovedPriceCopyWithImpl<$Res>
implements $ApprovedPriceCopyWith<$Res> {
_$ApprovedPriceCopyWithImpl(this._self, this._then);
final ApprovedPrice _self;
final $Res Function(ApprovedPrice) _then;
/// Create a copy of ApprovedPrice
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? approved = freezed,Object? lowestPrice = freezed,Object? highestPrice = freezed,Object? lowestWeight = freezed,Object? highestWeight = freezed,}) {
return _then(_self.copyWith(
approved: freezed == approved ? _self.approved : approved // ignore: cast_nullable_to_non_nullable
as bool?,lowestPrice: freezed == lowestPrice ? _self.lowestPrice : lowestPrice // ignore: cast_nullable_to_non_nullable
as double?,highestPrice: freezed == highestPrice ? _self.highestPrice : highestPrice // ignore: cast_nullable_to_non_nullable
as double?,lowestWeight: freezed == lowestWeight ? _self.lowestWeight : lowestWeight // ignore: cast_nullable_to_non_nullable
as double?,highestWeight: freezed == highestWeight ? _self.highestWeight : highestWeight // ignore: cast_nullable_to_non_nullable
as double?,
));
}
}
/// Adds pattern-matching-related methods to [ApprovedPrice].
extension ApprovedPricePatterns on ApprovedPrice {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _ApprovedPrice value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _ApprovedPrice() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _ApprovedPrice value) $default,){
final _that = this;
switch (_that) {
case _ApprovedPrice():
return $default(_that);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _ApprovedPrice value)? $default,){
final _that = this;
switch (_that) {
case _ApprovedPrice() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool? approved, double? lowestPrice, double? highestPrice, double? lowestWeight, double? highestWeight)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _ApprovedPrice() when $default != null:
return $default(_that.approved,_that.lowestPrice,_that.highestPrice,_that.lowestWeight,_that.highestWeight);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool? approved, double? lowestPrice, double? highestPrice, double? lowestWeight, double? highestWeight) $default,) {final _that = this;
switch (_that) {
case _ApprovedPrice():
return $default(_that.approved,_that.lowestPrice,_that.highestPrice,_that.lowestWeight,_that.highestWeight);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool? approved, double? lowestPrice, double? highestPrice, double? lowestWeight, double? highestWeight)? $default,) {final _that = this;
switch (_that) {
case _ApprovedPrice() when $default != null:
return $default(_that.approved,_that.lowestPrice,_that.highestPrice,_that.lowestWeight,_that.highestWeight);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _ApprovedPrice implements ApprovedPrice {
const _ApprovedPrice({this.approved, this.lowestPrice, this.highestPrice, this.lowestWeight, this.highestWeight});
factory _ApprovedPrice.fromJson(Map<String, dynamic> json) => _$ApprovedPriceFromJson(json);
@override final bool? approved;
@override final double? lowestPrice;
@override final double? highestPrice;
@override final double? lowestWeight;
@override final double? highestWeight;
/// Create a copy of ApprovedPrice
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$ApprovedPriceCopyWith<_ApprovedPrice> get copyWith => __$ApprovedPriceCopyWithImpl<_ApprovedPrice>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$ApprovedPriceToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _ApprovedPrice&&(identical(other.approved, approved) || other.approved == approved)&&(identical(other.lowestPrice, lowestPrice) || other.lowestPrice == lowestPrice)&&(identical(other.highestPrice, highestPrice) || other.highestPrice == highestPrice)&&(identical(other.lowestWeight, lowestWeight) || other.lowestWeight == lowestWeight)&&(identical(other.highestWeight, highestWeight) || other.highestWeight == highestWeight));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,approved,lowestPrice,highestPrice,lowestWeight,highestWeight);
@override
String toString() {
return 'ApprovedPrice(approved: $approved, lowestPrice: $lowestPrice, highestPrice: $highestPrice, lowestWeight: $lowestWeight, highestWeight: $highestWeight)';
}
}
/// @nodoc
abstract mixin class _$ApprovedPriceCopyWith<$Res> implements $ApprovedPriceCopyWith<$Res> {
factory _$ApprovedPriceCopyWith(_ApprovedPrice value, $Res Function(_ApprovedPrice) _then) = __$ApprovedPriceCopyWithImpl;
@override @useResult
$Res call({
bool? approved, double? lowestPrice, double? highestPrice, double? lowestWeight, double? highestWeight
});
}
/// @nodoc
class __$ApprovedPriceCopyWithImpl<$Res>
implements _$ApprovedPriceCopyWith<$Res> {
__$ApprovedPriceCopyWithImpl(this._self, this._then);
final _ApprovedPrice _self;
final $Res Function(_ApprovedPrice) _then;
/// Create a copy of ApprovedPrice
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? approved = freezed,Object? lowestPrice = freezed,Object? highestPrice = freezed,Object? lowestWeight = freezed,Object? highestWeight = freezed,}) {
return _then(_ApprovedPrice(
approved: freezed == approved ? _self.approved : approved // ignore: cast_nullable_to_non_nullable
as bool?,lowestPrice: freezed == lowestPrice ? _self.lowestPrice : lowestPrice // ignore: cast_nullable_to_non_nullable
as double?,highestPrice: freezed == highestPrice ? _self.highestPrice : highestPrice // ignore: cast_nullable_to_non_nullable
as double?,lowestWeight: freezed == lowestWeight ? _self.lowestWeight : lowestWeight // ignore: cast_nullable_to_non_nullable
as double?,highestWeight: freezed == highestWeight ? _self.highestWeight : highestWeight // ignore: cast_nullable_to_non_nullable
as double?,
));
}
}
// dart format on

View File

@@ -0,0 +1,25 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'approved_price.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_ApprovedPrice _$ApprovedPriceFromJson(Map<String, dynamic> json) =>
_ApprovedPrice(
approved: json['approved'] as bool?,
lowestPrice: (json['lowest_price'] as num?)?.toDouble(),
highestPrice: (json['highest_price'] as num?)?.toDouble(),
lowestWeight: (json['lowest_weight'] as num?)?.toDouble(),
highestWeight: (json['highest_weight'] as num?)?.toDouble(),
);
Map<String, dynamic> _$ApprovedPriceToJson(_ApprovedPrice instance) =>
<String, dynamic>{
'approved': instance.approved,
'lowest_price': instance.lowestPrice,
'highest_price': instance.highestPrice,
'lowest_weight': instance.lowestWeight,
'highest_weight': instance.highestWeight,
};

View File

@@ -0,0 +1,421 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'hatching_models.freezed.dart';
part 'hatching_models.g.dart';
@freezed
abstract class HatchingModel with _$HatchingModel{
const factory HatchingModel({
int? id,
Poultry? poultry,
ChainCompany? chainCompany,
num? age,
dynamic inspectionLosses,
VetFarm? vetFarm,
ActiveKill? activeKill,
KillingInfo? killingInfo,
FreeGovernmentalInfo? freeGovernmentalInfo,
ReportInfo? reportInfo,
String? key,
String? createDate,
String? modifyDate,
bool? trash,
bool? hasChainCompany,
int? poultryIdForeignKey,
int? poultryHatchingIdKey,
num? quantity,
num? losses,
num? leftOver,
num? killedQuantity,
num? extraKilledQuantity,
num? governmentalKilledQuantity,
num? governmentalQuantity,
num? freeKilledQuantity,
num? freeQuantity,
num? chainKilledQuantity,
num? chainKilledWeight,
num? outProvinceKilledWeight,
num? outProvinceKilledQuantity,
num? exportKilledWeight,
num? exportKilledQuantity,
num? totalCommitment,
String? commitmentType,
num? totalCommitmentQuantity,
num? totalFreeCommitmentQuantity,
num? totalFreeCommitmentWeight,
num? totalKilledWeight,
num? totalAverageKilledWeight,
num? requestLeftOver,
num? hall,
String? date,
String? predicateDate,
String? chickenBreed,
num? period,
String? allowHatching,
String? state,
bool? archive,
bool? violation,
String? message,
Registrar? registrar,
List<BreedItem>? breed,
num? cityNumber,
String? cityName,
num? provinceNumber,
String? provinceName,
LastChange? lastChange,
num? chickenAge,
num? nowAge,
LatestHatchingChange? latestHatchingChange,
String? violationReport,
String? violationMessage,
List<String>? violationImage,
String? violationReporter,
String? violationReportDate,
String? violationReportEditor,
String? violationReportEditDate,
num? totalLosses,
num? directLosses,
String? directLossesInputer,
String? directLossesDate,
String? directLossesEditor,
String? directLossesLastEditDate,
String? endPeriodLossesInputer,
String? endPeriodLossesDate,
String? endPeriodLossesEditor,
String? endPeriodLossesLastEditDate,
String? breedingUniqueId,
String? licenceNumber,
bool? temporaryTrash,
bool? temporaryDeleted,
String? firstDateInputArchive,
String? secondDateInputArchive,
String? inputArchiver,
String? outputArchiveDate,
String? outputArchiver,
num? barDifferenceRequestWeight,
num? barDifferenceRequestQuantity,
String? healthCertificate,
num? samasatDischargePercentage,
String? personTypeName,
String? interactTypeName,
String? unionTypeName,
String? certId,
num? increaseQuantity,
String? tenantFullname,
String? tenantNationalCode,
String? tenantMobile,
String? tenantCity,
bool? hasTenant,
String? archiveDate,
String? createdBy,
String? modifiedBy,
}) = _HatchingModel;
factory HatchingModel.fromJson(Map<String, dynamic> json) => _$HatchingModelFromJson(json);
}
@freezed
abstract class Poultry with _$Poultry {
const factory Poultry({
int? id,
PoultryUser? user,
PoultryAddress? address,
String? key,
bool? trash,
int? ownerIdForeignKey,
int? userIdForeignKey,
int? addressIdForeignKey,
bool? hasChainCompany,
int? userBankIdForeignKey,
String? cityOperator,
String? unitName,
String? gisCode,
num? operatingLicenceCapacity,
num? numberOfHalls,
bool? tenant,
bool? hasTenant,
String? personType,
String? economicCode,
String? systemCode,
String? epidemiologicalCode,
String? breedingUniqueId,
num? totalCapacity,
String? licenceNumber,
String? healthCertificateNumber,
num? numberOfRequests,
String? hatchingDate,
String? lastPartyDate,
num? numberOfIncubators,
num? herdAgeByDay,
num? herdAgeByWeek,
num? numberOfParty,
String? communicationType,
String? cooperative,
String? dateOfRegister,
String? unitStatus,
bool? active,
dynamic identityDocuments,
String? samasatUserCode,
String? baseOrder,
String? incubationDate,
num? walletAmount,
num? city,
num? cityNumber,
String? cityName,
num? provinceNumber,
String? provinceName,
int? walletIdForeignKey,
int? poultryIdKey,
num? lat,
num? long,
String? date,
num? killingAveAge,
num? activeLeftOver,
num? killingAveCount,
num? killingAveWeight,
num? killingLiveWeight,
num? killingCarcassesWeight,
num? killingLossWeightPercent,
num? realKillingAveWeight,
num? realKillingLiveWeight,
num? realKillingCarcassesWeight,
num? realKillingLossWeightPercent,
int? interestLicenseId,
bool? orderLimit,
int? owner,
int? userBankInfo,
int? wallet,
}) = _Poultry;
factory Poultry.fromJson(Map<String, dynamic> json) => _$PoultryFromJson(json);
}
@freezed
abstract class PoultryUser with _$PoultryUser {
const factory PoultryUser({
String? fullname,
String? mobile,
}) = _PoultryUser;
factory PoultryUser.fromJson(Map<String, dynamic> json) => _$PoultryUserFromJson(json);
}
@freezed
abstract class PoultryAddress with _$PoultryAddress {
const factory PoultryAddress({
ProvinceRef? province,
CityRef? city,
String? address,
String? postalCode,
}) = _PoultryAddress;
factory PoultryAddress.fromJson(Map<String, dynamic> json) => _$PoultryAddressFromJson(json);
}
@freezed
abstract class ProvinceRef with _$ProvinceRef {
const factory ProvinceRef({
String? key,
String? name,
}) = _ProvinceRef;
factory ProvinceRef.fromJson(Map<String, dynamic> json) => _$ProvinceRefFromJson(json);
}
@freezed
abstract class CityRef with _$CityRef {
const factory CityRef({
String? key,
String? name,
}) = _CityRef;
factory CityRef.fromJson(Map<String, dynamic> json) => _$CityRefFromJson(json);
}
@freezed
abstract class ChainCompany with _$ChainCompany {
const factory ChainCompany({
ChainUser? user,
dynamic userBankInfo,
String? key,
bool? trash,
String? name,
String? city,
String? province,
String? postalCode,
String? address,
num? wallet,
}) = _ChainCompany;
factory ChainCompany.fromJson(Map<String, dynamic> json) => _$ChainCompanyFromJson(json);
}
@freezed
abstract class ChainUser with _$ChainUser {
const factory ChainUser({
List<String>? role,
String? city,
String? province,
String? key,
String? userGateWayId,
int? userDjangoIdForeignKey,
int? provinceIdForeignKey,
int? cityIdForeignKey,
int? systemUserProfileIdKey,
String? fullname,
String? firstName,
String? lastName,
String? nationalCode,
String? nationalCodeImage,
String? nationalId,
String? mobile,
String? birthday,
String? image,
String? password,
bool? active,
ChainUserState? state,
num? baseOrder,
num? cityNumber,
String? cityName,
num? provinceNumber,
String? provinceName,
String? unitName,
String? unitNationalId,
String? unitRegistrationNumber,
String? unitEconomicalNumber,
String? unitProvince,
String? unitCity,
String? unitPostalCode,
String? unitAddress,
}) = _ChainUser;
factory ChainUser.fromJson(Map<String, dynamic> json) => _$ChainUserFromJson(json);
}
@freezed
abstract class ChainUserState with _$ChainUserState {
const factory ChainUserState({
String? city,
String? image,
String? mobile,
String? birthday,
String? province,
String? lastName,
String? firstName,
String? nationalId,
String? nationalCode,
}) = _ChainUserState;
factory ChainUserState.fromJson(Map<String, dynamic> json) => _$ChainUserStateFromJson(json);
}
@freezed
abstract class VetFarm with _$VetFarm {
const factory VetFarm({
String? vetFarmFullName,
String? vetFarmMobile,
}) = _VetFarm;
factory VetFarm.fromJson(Map<String, dynamic> json) => _$VetFarmFromJson(json);
}
@freezed
abstract class ActiveKill with _$ActiveKill {
const factory ActiveKill({
bool? activeKill,
num? countOfRequest,
}) = _ActiveKill;
factory ActiveKill.fromJson(Map<String, dynamic> json) => _$ActiveKillFromJson(json);
}
@freezed
abstract class KillingInfo with _$KillingInfo {
const factory KillingInfo({
String? violationMessage,
num? provinceKillRequests,
num? provinceKillRequestsQuantity,
num? provinceKillRequestsWeight,
num? killHouseRequests,
num? killHouseRequestsFirstQuantity,
num? killHouseRequestsFirstWeight,
num? barCompleteWithKillHouse,
num? acceptedRealQuantityFinal,
num? acceptedRealWightFinal,
num? wareHouseBars,
num? wareHouseBarsQuantity,
num? wareHouseBarsWeight,
num? wareHouseBarsWeightLose,
}) = _KillingInfo;
factory KillingInfo.fromJson(Map<String, dynamic> json) => _$KillingInfoFromJson(json);
}
@freezed
abstract class FreeGovernmentalInfo with _$FreeGovernmentalInfo {
const factory FreeGovernmentalInfo({
num? governmentalAllocatedQuantity,
num? totalCommitmentQuantity,
num? freeAllocatedQuantity,
num? totalFreeCommitmentQuantity,
num? leftTotalFreeCommitmentQuantity,
}) = _FreeGovernmentalInfo;
factory FreeGovernmentalInfo.fromJson(Map<String, dynamic> json) => _$FreeGovernmentalInfoFromJson(json);
}
@freezed
abstract class ReportInfo with _$ReportInfo {
const factory ReportInfo({
bool? poultryScience,
bool? image,
}) = _ReportInfo;
factory ReportInfo.fromJson(Map<String, dynamic> json) => _$ReportInfoFromJson(json);
}
@freezed
abstract class LatestHatchingChange with _$LatestHatchingChange {
const factory LatestHatchingChange({
String? date,
String? role,
String? fullName,
}) = _LatestHatchingChange;
factory LatestHatchingChange.fromJson(Map<String, dynamic> json) => _$LatestHatchingChangeFromJson(json);
}
@freezed
abstract class Registrar with _$Registrar {
const factory Registrar({
String? date,
String? role,
String? fullname,
}) = _Registrar;
factory Registrar.fromJson(Map<String, dynamic> json) => _$RegistrarFromJson(json);
}
@freezed
abstract class LastChange with _$LastChange {
const factory LastChange({
String? date,
String? role,
String? type,
String? fullName,
}) = _LastChange;
factory LastChange.fromJson(Map<String, dynamic> json) => _$LastChangeFromJson(json);
}
@freezed
abstract class BreedItem with _$BreedItem {
const factory BreedItem({
String? breed,
num? mainQuantity,
num? remainQuantity,
}) = _BreedItem;
factory BreedItem.fromJson(Map<String, dynamic> json) => _$BreedItemFromJson(json);
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,723 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'hatching_models.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_HatchingModel _$HatchingModelFromJson(
Map<String, dynamic> json,
) => _HatchingModel(
id: (json['id'] as num?)?.toInt(),
poultry: json['poultry'] == null
? null
: Poultry.fromJson(json['poultry'] as Map<String, dynamic>),
chainCompany: json['chain_company'] == null
? null
: ChainCompany.fromJson(json['chain_company'] as Map<String, dynamic>),
age: json['age'] as num?,
inspectionLosses: json['inspection_losses'],
vetFarm: json['vet_farm'] == null
? null
: VetFarm.fromJson(json['vet_farm'] as Map<String, dynamic>),
activeKill: json['active_kill'] == null
? null
: ActiveKill.fromJson(json['active_kill'] as Map<String, dynamic>),
killingInfo: json['killing_info'] == null
? null
: KillingInfo.fromJson(json['killing_info'] as Map<String, dynamic>),
freeGovernmentalInfo: json['free_governmental_info'] == null
? null
: FreeGovernmentalInfo.fromJson(
json['free_governmental_info'] as Map<String, dynamic>,
),
reportInfo: json['report_info'] == null
? null
: ReportInfo.fromJson(json['report_info'] as Map<String, dynamic>),
key: json['key'] as String?,
createDate: json['create_date'] as String?,
modifyDate: json['modify_date'] as String?,
trash: json['trash'] as bool?,
hasChainCompany: json['has_chain_company'] as bool?,
poultryIdForeignKey: (json['poultry_id_foreign_key'] as num?)?.toInt(),
poultryHatchingIdKey: (json['poultry_hatching_id_key'] as num?)?.toInt(),
quantity: json['quantity'] as num?,
losses: json['losses'] as num?,
leftOver: json['left_over'] as num?,
killedQuantity: json['killed_quantity'] as num?,
extraKilledQuantity: json['extra_killed_quantity'] as num?,
governmentalKilledQuantity: json['governmental_killed_quantity'] as num?,
governmentalQuantity: json['governmental_quantity'] as num?,
freeKilledQuantity: json['free_killed_quantity'] as num?,
freeQuantity: json['free_quantity'] as num?,
chainKilledQuantity: json['chain_killed_quantity'] as num?,
chainKilledWeight: json['chain_killed_weight'] as num?,
outProvinceKilledWeight: json['out_province_killed_weight'] as num?,
outProvinceKilledQuantity: json['out_province_killed_quantity'] as num?,
exportKilledWeight: json['export_killed_weight'] as num?,
exportKilledQuantity: json['export_killed_quantity'] as num?,
totalCommitment: json['total_commitment'] as num?,
commitmentType: json['commitment_type'] as String?,
totalCommitmentQuantity: json['total_commitment_quantity'] as num?,
totalFreeCommitmentQuantity: json['total_free_commitment_quantity'] as num?,
totalFreeCommitmentWeight: json['total_free_commitment_weight'] as num?,
totalKilledWeight: json['total_killed_weight'] as num?,
totalAverageKilledWeight: json['total_average_killed_weight'] as num?,
requestLeftOver: json['request_left_over'] as num?,
hall: json['hall'] as num?,
date: json['date'] as String?,
predicateDate: json['predicate_date'] as String?,
chickenBreed: json['chicken_breed'] as String?,
period: json['period'] as num?,
allowHatching: json['allow_hatching'] as String?,
state: json['state'] as String?,
archive: json['archive'] as bool?,
violation: json['violation'] as bool?,
message: json['message'] as String?,
registrar: json['registrar'] == null
? null
: Registrar.fromJson(json['registrar'] as Map<String, dynamic>),
breed: (json['breed'] as List<dynamic>?)
?.map((e) => BreedItem.fromJson(e as Map<String, dynamic>))
.toList(),
cityNumber: json['city_number'] as num?,
cityName: json['city_name'] as String?,
provinceNumber: json['province_number'] as num?,
provinceName: json['province_name'] as String?,
lastChange: json['last_change'] == null
? null
: LastChange.fromJson(json['last_change'] as Map<String, dynamic>),
chickenAge: json['chicken_age'] as num?,
nowAge: json['now_age'] as num?,
latestHatchingChange: json['latest_hatching_change'] == null
? null
: LatestHatchingChange.fromJson(
json['latest_hatching_change'] as Map<String, dynamic>,
),
violationReport: json['violation_report'] as String?,
violationMessage: json['violation_message'] as String?,
violationImage: (json['violation_image'] as List<dynamic>?)
?.map((e) => e as String)
.toList(),
violationReporter: json['violation_reporter'] as String?,
violationReportDate: json['violation_report_date'] as String?,
violationReportEditor: json['violation_report_editor'] as String?,
violationReportEditDate: json['violation_report_edit_date'] as String?,
totalLosses: json['total_losses'] as num?,
directLosses: json['direct_losses'] as num?,
directLossesInputer: json['direct_losses_inputer'] as String?,
directLossesDate: json['direct_losses_date'] as String?,
directLossesEditor: json['direct_losses_editor'] as String?,
directLossesLastEditDate: json['direct_losses_last_edit_date'] as String?,
endPeriodLossesInputer: json['end_period_losses_inputer'] as String?,
endPeriodLossesDate: json['end_period_losses_date'] as String?,
endPeriodLossesEditor: json['end_period_losses_editor'] as String?,
endPeriodLossesLastEditDate:
json['end_period_losses_last_edit_date'] as String?,
breedingUniqueId: json['breeding_unique_id'] as String?,
licenceNumber: json['licence_number'] as String?,
temporaryTrash: json['temporary_trash'] as bool?,
temporaryDeleted: json['temporary_deleted'] as bool?,
firstDateInputArchive: json['first_date_input_archive'] as String?,
secondDateInputArchive: json['second_date_input_archive'] as String?,
inputArchiver: json['input_archiver'] as String?,
outputArchiveDate: json['output_archive_date'] as String?,
outputArchiver: json['output_archiver'] as String?,
barDifferenceRequestWeight: json['bar_difference_request_weight'] as num?,
barDifferenceRequestQuantity: json['bar_difference_request_quantity'] as num?,
healthCertificate: json['health_certificate'] as String?,
samasatDischargePercentage: json['samasat_discharge_percentage'] as num?,
personTypeName: json['person_type_name'] as String?,
interactTypeName: json['interact_type_name'] as String?,
unionTypeName: json['union_type_name'] as String?,
certId: json['cert_id'] as String?,
increaseQuantity: json['increase_quantity'] as num?,
tenantFullname: json['tenant_fullname'] as String?,
tenantNationalCode: json['tenant_national_code'] as String?,
tenantMobile: json['tenant_mobile'] as String?,
tenantCity: json['tenant_city'] as String?,
hasTenant: json['has_tenant'] as bool?,
archiveDate: json['archive_date'] as String?,
createdBy: json['created_by'] as String?,
modifiedBy: json['modified_by'] as String?,
);
Map<String, dynamic> _$HatchingModelToJson(_HatchingModel instance) =>
<String, dynamic>{
'id': instance.id,
'poultry': instance.poultry,
'chain_company': instance.chainCompany,
'age': instance.age,
'inspection_losses': instance.inspectionLosses,
'vet_farm': instance.vetFarm,
'active_kill': instance.activeKill,
'killing_info': instance.killingInfo,
'free_governmental_info': instance.freeGovernmentalInfo,
'report_info': instance.reportInfo,
'key': instance.key,
'create_date': instance.createDate,
'modify_date': instance.modifyDate,
'trash': instance.trash,
'has_chain_company': instance.hasChainCompany,
'poultry_id_foreign_key': instance.poultryIdForeignKey,
'poultry_hatching_id_key': instance.poultryHatchingIdKey,
'quantity': instance.quantity,
'losses': instance.losses,
'left_over': instance.leftOver,
'killed_quantity': instance.killedQuantity,
'extra_killed_quantity': instance.extraKilledQuantity,
'governmental_killed_quantity': instance.governmentalKilledQuantity,
'governmental_quantity': instance.governmentalQuantity,
'free_killed_quantity': instance.freeKilledQuantity,
'free_quantity': instance.freeQuantity,
'chain_killed_quantity': instance.chainKilledQuantity,
'chain_killed_weight': instance.chainKilledWeight,
'out_province_killed_weight': instance.outProvinceKilledWeight,
'out_province_killed_quantity': instance.outProvinceKilledQuantity,
'export_killed_weight': instance.exportKilledWeight,
'export_killed_quantity': instance.exportKilledQuantity,
'total_commitment': instance.totalCommitment,
'commitment_type': instance.commitmentType,
'total_commitment_quantity': instance.totalCommitmentQuantity,
'total_free_commitment_quantity': instance.totalFreeCommitmentQuantity,
'total_free_commitment_weight': instance.totalFreeCommitmentWeight,
'total_killed_weight': instance.totalKilledWeight,
'total_average_killed_weight': instance.totalAverageKilledWeight,
'request_left_over': instance.requestLeftOver,
'hall': instance.hall,
'date': instance.date,
'predicate_date': instance.predicateDate,
'chicken_breed': instance.chickenBreed,
'period': instance.period,
'allow_hatching': instance.allowHatching,
'state': instance.state,
'archive': instance.archive,
'violation': instance.violation,
'message': instance.message,
'registrar': instance.registrar,
'breed': instance.breed,
'city_number': instance.cityNumber,
'city_name': instance.cityName,
'province_number': instance.provinceNumber,
'province_name': instance.provinceName,
'last_change': instance.lastChange,
'chicken_age': instance.chickenAge,
'now_age': instance.nowAge,
'latest_hatching_change': instance.latestHatchingChange,
'violation_report': instance.violationReport,
'violation_message': instance.violationMessage,
'violation_image': instance.violationImage,
'violation_reporter': instance.violationReporter,
'violation_report_date': instance.violationReportDate,
'violation_report_editor': instance.violationReportEditor,
'violation_report_edit_date': instance.violationReportEditDate,
'total_losses': instance.totalLosses,
'direct_losses': instance.directLosses,
'direct_losses_inputer': instance.directLossesInputer,
'direct_losses_date': instance.directLossesDate,
'direct_losses_editor': instance.directLossesEditor,
'direct_losses_last_edit_date': instance.directLossesLastEditDate,
'end_period_losses_inputer': instance.endPeriodLossesInputer,
'end_period_losses_date': instance.endPeriodLossesDate,
'end_period_losses_editor': instance.endPeriodLossesEditor,
'end_period_losses_last_edit_date': instance.endPeriodLossesLastEditDate,
'breeding_unique_id': instance.breedingUniqueId,
'licence_number': instance.licenceNumber,
'temporary_trash': instance.temporaryTrash,
'temporary_deleted': instance.temporaryDeleted,
'first_date_input_archive': instance.firstDateInputArchive,
'second_date_input_archive': instance.secondDateInputArchive,
'input_archiver': instance.inputArchiver,
'output_archive_date': instance.outputArchiveDate,
'output_archiver': instance.outputArchiver,
'bar_difference_request_weight': instance.barDifferenceRequestWeight,
'bar_difference_request_quantity': instance.barDifferenceRequestQuantity,
'health_certificate': instance.healthCertificate,
'samasat_discharge_percentage': instance.samasatDischargePercentage,
'person_type_name': instance.personTypeName,
'interact_type_name': instance.interactTypeName,
'union_type_name': instance.unionTypeName,
'cert_id': instance.certId,
'increase_quantity': instance.increaseQuantity,
'tenant_fullname': instance.tenantFullname,
'tenant_national_code': instance.tenantNationalCode,
'tenant_mobile': instance.tenantMobile,
'tenant_city': instance.tenantCity,
'has_tenant': instance.hasTenant,
'archive_date': instance.archiveDate,
'created_by': instance.createdBy,
'modified_by': instance.modifiedBy,
};
_Poultry _$PoultryFromJson(Map<String, dynamic> json) => _Poultry(
id: (json['id'] as num?)?.toInt(),
user: json['user'] == null
? null
: PoultryUser.fromJson(json['user'] as Map<String, dynamic>),
address: json['address'] == null
? null
: PoultryAddress.fromJson(json['address'] as Map<String, dynamic>),
key: json['key'] as String?,
trash: json['trash'] as bool?,
ownerIdForeignKey: (json['owner_id_foreign_key'] as num?)?.toInt(),
userIdForeignKey: (json['user_id_foreign_key'] as num?)?.toInt(),
addressIdForeignKey: (json['address_id_foreign_key'] as num?)?.toInt(),
hasChainCompany: json['has_chain_company'] as bool?,
userBankIdForeignKey: (json['user_bank_id_foreign_key'] as num?)?.toInt(),
cityOperator: json['city_operator'] as String?,
unitName: json['unit_name'] as String?,
gisCode: json['gis_code'] as String?,
operatingLicenceCapacity: json['operating_licence_capacity'] as num?,
numberOfHalls: json['number_of_halls'] as num?,
tenant: json['tenant'] as bool?,
hasTenant: json['has_tenant'] as bool?,
personType: json['person_type'] as String?,
economicCode: json['economic_code'] as String?,
systemCode: json['system_code'] as String?,
epidemiologicalCode: json['epidemiological_code'] as String?,
breedingUniqueId: json['breeding_unique_id'] as String?,
totalCapacity: json['total_capacity'] as num?,
licenceNumber: json['licence_number'] as String?,
healthCertificateNumber: json['health_certificate_number'] as String?,
numberOfRequests: json['number_of_requests'] as num?,
hatchingDate: json['hatching_date'] as String?,
lastPartyDate: json['last_party_date'] as String?,
numberOfIncubators: json['number_of_incubators'] as num?,
herdAgeByDay: json['herd_age_by_day'] as num?,
herdAgeByWeek: json['herd_age_by_week'] as num?,
numberOfParty: json['number_of_party'] as num?,
communicationType: json['communication_type'] as String?,
cooperative: json['cooperative'] as String?,
dateOfRegister: json['date_of_register'] as String?,
unitStatus: json['unit_status'] as String?,
active: json['active'] as bool?,
identityDocuments: json['identity_documents'],
samasatUserCode: json['samasat_user_code'] as String?,
baseOrder: json['base_order'] as String?,
incubationDate: json['incubation_date'] as String?,
walletAmount: json['wallet_amount'] as num?,
city: json['city'] as num?,
cityNumber: json['city_number'] as num?,
cityName: json['city_name'] as String?,
provinceNumber: json['province_number'] as num?,
provinceName: json['province_name'] as String?,
walletIdForeignKey: (json['wallet_id_foreign_key'] as num?)?.toInt(),
poultryIdKey: (json['poultry_id_key'] as num?)?.toInt(),
lat: json['lat'] as num?,
long: json['long'] as num?,
date: json['date'] as String?,
killingAveAge: json['killing_ave_age'] as num?,
activeLeftOver: json['active_left_over'] as num?,
killingAveCount: json['killing_ave_count'] as num?,
killingAveWeight: json['killing_ave_weight'] as num?,
killingLiveWeight: json['killing_live_weight'] as num?,
killingCarcassesWeight: json['killing_carcasses_weight'] as num?,
killingLossWeightPercent: json['killing_loss_weight_percent'] as num?,
realKillingAveWeight: json['real_killing_ave_weight'] as num?,
realKillingLiveWeight: json['real_killing_live_weight'] as num?,
realKillingCarcassesWeight: json['real_killing_carcasses_weight'] as num?,
realKillingLossWeightPercent:
json['real_killing_loss_weight_percent'] as num?,
interestLicenseId: (json['interest_license_id'] as num?)?.toInt(),
orderLimit: json['order_limit'] as bool?,
owner: (json['owner'] as num?)?.toInt(),
userBankInfo: (json['user_bank_info'] as num?)?.toInt(),
wallet: (json['wallet'] as num?)?.toInt(),
);
Map<String, dynamic> _$PoultryToJson(_Poultry instance) => <String, dynamic>{
'id': instance.id,
'user': instance.user,
'address': instance.address,
'key': instance.key,
'trash': instance.trash,
'owner_id_foreign_key': instance.ownerIdForeignKey,
'user_id_foreign_key': instance.userIdForeignKey,
'address_id_foreign_key': instance.addressIdForeignKey,
'has_chain_company': instance.hasChainCompany,
'user_bank_id_foreign_key': instance.userBankIdForeignKey,
'city_operator': instance.cityOperator,
'unit_name': instance.unitName,
'gis_code': instance.gisCode,
'operating_licence_capacity': instance.operatingLicenceCapacity,
'number_of_halls': instance.numberOfHalls,
'tenant': instance.tenant,
'has_tenant': instance.hasTenant,
'person_type': instance.personType,
'economic_code': instance.economicCode,
'system_code': instance.systemCode,
'epidemiological_code': instance.epidemiologicalCode,
'breeding_unique_id': instance.breedingUniqueId,
'total_capacity': instance.totalCapacity,
'licence_number': instance.licenceNumber,
'health_certificate_number': instance.healthCertificateNumber,
'number_of_requests': instance.numberOfRequests,
'hatching_date': instance.hatchingDate,
'last_party_date': instance.lastPartyDate,
'number_of_incubators': instance.numberOfIncubators,
'herd_age_by_day': instance.herdAgeByDay,
'herd_age_by_week': instance.herdAgeByWeek,
'number_of_party': instance.numberOfParty,
'communication_type': instance.communicationType,
'cooperative': instance.cooperative,
'date_of_register': instance.dateOfRegister,
'unit_status': instance.unitStatus,
'active': instance.active,
'identity_documents': instance.identityDocuments,
'samasat_user_code': instance.samasatUserCode,
'base_order': instance.baseOrder,
'incubation_date': instance.incubationDate,
'wallet_amount': instance.walletAmount,
'city': instance.city,
'city_number': instance.cityNumber,
'city_name': instance.cityName,
'province_number': instance.provinceNumber,
'province_name': instance.provinceName,
'wallet_id_foreign_key': instance.walletIdForeignKey,
'poultry_id_key': instance.poultryIdKey,
'lat': instance.lat,
'long': instance.long,
'date': instance.date,
'killing_ave_age': instance.killingAveAge,
'active_left_over': instance.activeLeftOver,
'killing_ave_count': instance.killingAveCount,
'killing_ave_weight': instance.killingAveWeight,
'killing_live_weight': instance.killingLiveWeight,
'killing_carcasses_weight': instance.killingCarcassesWeight,
'killing_loss_weight_percent': instance.killingLossWeightPercent,
'real_killing_ave_weight': instance.realKillingAveWeight,
'real_killing_live_weight': instance.realKillingLiveWeight,
'real_killing_carcasses_weight': instance.realKillingCarcassesWeight,
'real_killing_loss_weight_percent': instance.realKillingLossWeightPercent,
'interest_license_id': instance.interestLicenseId,
'order_limit': instance.orderLimit,
'owner': instance.owner,
'user_bank_info': instance.userBankInfo,
'wallet': instance.wallet,
};
_PoultryUser _$PoultryUserFromJson(Map<String, dynamic> json) => _PoultryUser(
fullname: json['fullname'] as String?,
mobile: json['mobile'] as String?,
);
Map<String, dynamic> _$PoultryUserToJson(_PoultryUser instance) =>
<String, dynamic>{'fullname': instance.fullname, 'mobile': instance.mobile};
_PoultryAddress _$PoultryAddressFromJson(Map<String, dynamic> json) =>
_PoultryAddress(
province: json['province'] == null
? null
: ProvinceRef.fromJson(json['province'] as Map<String, dynamic>),
city: json['city'] == null
? null
: CityRef.fromJson(json['city'] as Map<String, dynamic>),
address: json['address'] as String?,
postalCode: json['postal_code'] as String?,
);
Map<String, dynamic> _$PoultryAddressToJson(_PoultryAddress instance) =>
<String, dynamic>{
'province': instance.province,
'city': instance.city,
'address': instance.address,
'postal_code': instance.postalCode,
};
_ProvinceRef _$ProvinceRefFromJson(Map<String, dynamic> json) =>
_ProvinceRef(key: json['key'] as String?, name: json['name'] as String?);
Map<String, dynamic> _$ProvinceRefToJson(_ProvinceRef instance) =>
<String, dynamic>{'key': instance.key, 'name': instance.name};
_CityRef _$CityRefFromJson(Map<String, dynamic> json) =>
_CityRef(key: json['key'] as String?, name: json['name'] as String?);
Map<String, dynamic> _$CityRefToJson(_CityRef instance) => <String, dynamic>{
'key': instance.key,
'name': instance.name,
};
_ChainCompany _$ChainCompanyFromJson(Map<String, dynamic> json) =>
_ChainCompany(
user: json['user'] == null
? null
: ChainUser.fromJson(json['user'] as Map<String, dynamic>),
userBankInfo: json['user_bank_info'],
key: json['key'] as String?,
trash: json['trash'] as bool?,
name: json['name'] as String?,
city: json['city'] as String?,
province: json['province'] as String?,
postalCode: json['postal_code'] as String?,
address: json['address'] as String?,
wallet: json['wallet'] as num?,
);
Map<String, dynamic> _$ChainCompanyToJson(_ChainCompany instance) =>
<String, dynamic>{
'user': instance.user,
'user_bank_info': instance.userBankInfo,
'key': instance.key,
'trash': instance.trash,
'name': instance.name,
'city': instance.city,
'province': instance.province,
'postal_code': instance.postalCode,
'address': instance.address,
'wallet': instance.wallet,
};
_ChainUser _$ChainUserFromJson(Map<String, dynamic> json) => _ChainUser(
role: (json['role'] as List<dynamic>?)?.map((e) => e as String).toList(),
city: json['city'] as String?,
province: json['province'] as String?,
key: json['key'] as String?,
userGateWayId: json['user_gate_way_id'] as String?,
userDjangoIdForeignKey: (json['user_django_id_foreign_key'] as num?)?.toInt(),
provinceIdForeignKey: (json['province_id_foreign_key'] as num?)?.toInt(),
cityIdForeignKey: (json['city_id_foreign_key'] as num?)?.toInt(),
systemUserProfileIdKey: (json['system_user_profile_id_key'] as num?)?.toInt(),
fullname: json['fullname'] as String?,
firstName: json['first_name'] as String?,
lastName: json['last_name'] as String?,
nationalCode: json['national_code'] as String?,
nationalCodeImage: json['national_code_image'] as String?,
nationalId: json['national_id'] as String?,
mobile: json['mobile'] as String?,
birthday: json['birthday'] as String?,
image: json['image'] as String?,
password: json['password'] as String?,
active: json['active'] as bool?,
state: json['state'] == null
? null
: ChainUserState.fromJson(json['state'] as Map<String, dynamic>),
baseOrder: json['base_order'] as num?,
cityNumber: json['city_number'] as num?,
cityName: json['city_name'] as String?,
provinceNumber: json['province_number'] as num?,
provinceName: json['province_name'] as String?,
unitName: json['unit_name'] as String?,
unitNationalId: json['unit_national_id'] as String?,
unitRegistrationNumber: json['unit_registration_number'] as String?,
unitEconomicalNumber: json['unit_economical_number'] as String?,
unitProvince: json['unit_province'] as String?,
unitCity: json['unit_city'] as String?,
unitPostalCode: json['unit_postal_code'] as String?,
unitAddress: json['unit_address'] as String?,
);
Map<String, dynamic> _$ChainUserToJson(_ChainUser instance) =>
<String, dynamic>{
'role': instance.role,
'city': instance.city,
'province': instance.province,
'key': instance.key,
'user_gate_way_id': instance.userGateWayId,
'user_django_id_foreign_key': instance.userDjangoIdForeignKey,
'province_id_foreign_key': instance.provinceIdForeignKey,
'city_id_foreign_key': instance.cityIdForeignKey,
'system_user_profile_id_key': instance.systemUserProfileIdKey,
'fullname': instance.fullname,
'first_name': instance.firstName,
'last_name': instance.lastName,
'national_code': instance.nationalCode,
'national_code_image': instance.nationalCodeImage,
'national_id': instance.nationalId,
'mobile': instance.mobile,
'birthday': instance.birthday,
'image': instance.image,
'password': instance.password,
'active': instance.active,
'state': instance.state,
'base_order': instance.baseOrder,
'city_number': instance.cityNumber,
'city_name': instance.cityName,
'province_number': instance.provinceNumber,
'province_name': instance.provinceName,
'unit_name': instance.unitName,
'unit_national_id': instance.unitNationalId,
'unit_registration_number': instance.unitRegistrationNumber,
'unit_economical_number': instance.unitEconomicalNumber,
'unit_province': instance.unitProvince,
'unit_city': instance.unitCity,
'unit_postal_code': instance.unitPostalCode,
'unit_address': instance.unitAddress,
};
_ChainUserState _$ChainUserStateFromJson(Map<String, dynamic> json) =>
_ChainUserState(
city: json['city'] as String?,
image: json['image'] as String?,
mobile: json['mobile'] as String?,
birthday: json['birthday'] as String?,
province: json['province'] as String?,
lastName: json['last_name'] as String?,
firstName: json['first_name'] as String?,
nationalId: json['national_id'] as String?,
nationalCode: json['national_code'] as String?,
);
Map<String, dynamic> _$ChainUserStateToJson(_ChainUserState instance) =>
<String, dynamic>{
'city': instance.city,
'image': instance.image,
'mobile': instance.mobile,
'birthday': instance.birthday,
'province': instance.province,
'last_name': instance.lastName,
'first_name': instance.firstName,
'national_id': instance.nationalId,
'national_code': instance.nationalCode,
};
_VetFarm _$VetFarmFromJson(Map<String, dynamic> json) => _VetFarm(
vetFarmFullName: json['vet_farm_full_name'] as String?,
vetFarmMobile: json['vet_farm_mobile'] as String?,
);
Map<String, dynamic> _$VetFarmToJson(_VetFarm instance) => <String, dynamic>{
'vet_farm_full_name': instance.vetFarmFullName,
'vet_farm_mobile': instance.vetFarmMobile,
};
_ActiveKill _$ActiveKillFromJson(Map<String, dynamic> json) => _ActiveKill(
activeKill: json['active_kill'] as bool?,
countOfRequest: json['count_of_request'] as num?,
);
Map<String, dynamic> _$ActiveKillToJson(_ActiveKill instance) =>
<String, dynamic>{
'active_kill': instance.activeKill,
'count_of_request': instance.countOfRequest,
};
_KillingInfo _$KillingInfoFromJson(Map<String, dynamic> json) => _KillingInfo(
violationMessage: json['violation_message'] as String?,
provinceKillRequests: json['province_kill_requests'] as num?,
provinceKillRequestsQuantity: json['province_kill_requests_quantity'] as num?,
provinceKillRequestsWeight: json['province_kill_requests_weight'] as num?,
killHouseRequests: json['kill_house_requests'] as num?,
killHouseRequestsFirstQuantity:
json['kill_house_requests_first_quantity'] as num?,
killHouseRequestsFirstWeight:
json['kill_house_requests_first_weight'] as num?,
barCompleteWithKillHouse: json['bar_complete_with_kill_house'] as num?,
acceptedRealQuantityFinal: json['accepted_real_quantity_final'] as num?,
acceptedRealWightFinal: json['accepted_real_wight_final'] as num?,
wareHouseBars: json['ware_house_bars'] as num?,
wareHouseBarsQuantity: json['ware_house_bars_quantity'] as num?,
wareHouseBarsWeight: json['ware_house_bars_weight'] as num?,
wareHouseBarsWeightLose: json['ware_house_bars_weight_lose'] as num?,
);
Map<String, dynamic> _$KillingInfoToJson(
_KillingInfo instance,
) => <String, dynamic>{
'violation_message': instance.violationMessage,
'province_kill_requests': instance.provinceKillRequests,
'province_kill_requests_quantity': instance.provinceKillRequestsQuantity,
'province_kill_requests_weight': instance.provinceKillRequestsWeight,
'kill_house_requests': instance.killHouseRequests,
'kill_house_requests_first_quantity': instance.killHouseRequestsFirstQuantity,
'kill_house_requests_first_weight': instance.killHouseRequestsFirstWeight,
'bar_complete_with_kill_house': instance.barCompleteWithKillHouse,
'accepted_real_quantity_final': instance.acceptedRealQuantityFinal,
'accepted_real_wight_final': instance.acceptedRealWightFinal,
'ware_house_bars': instance.wareHouseBars,
'ware_house_bars_quantity': instance.wareHouseBarsQuantity,
'ware_house_bars_weight': instance.wareHouseBarsWeight,
'ware_house_bars_weight_lose': instance.wareHouseBarsWeightLose,
};
_FreeGovernmentalInfo _$FreeGovernmentalInfoFromJson(
Map<String, dynamic> json,
) => _FreeGovernmentalInfo(
governmentalAllocatedQuantity:
json['governmental_allocated_quantity'] as num?,
totalCommitmentQuantity: json['total_commitment_quantity'] as num?,
freeAllocatedQuantity: json['free_allocated_quantity'] as num?,
totalFreeCommitmentQuantity: json['total_free_commitment_quantity'] as num?,
leftTotalFreeCommitmentQuantity:
json['left_total_free_commitment_quantity'] as num?,
);
Map<String, dynamic> _$FreeGovernmentalInfoToJson(
_FreeGovernmentalInfo instance,
) => <String, dynamic>{
'governmental_allocated_quantity': instance.governmentalAllocatedQuantity,
'total_commitment_quantity': instance.totalCommitmentQuantity,
'free_allocated_quantity': instance.freeAllocatedQuantity,
'total_free_commitment_quantity': instance.totalFreeCommitmentQuantity,
'left_total_free_commitment_quantity':
instance.leftTotalFreeCommitmentQuantity,
};
_ReportInfo _$ReportInfoFromJson(Map<String, dynamic> json) => _ReportInfo(
poultryScience: json['poultry_science'] as bool?,
image: json['image'] as bool?,
);
Map<String, dynamic> _$ReportInfoToJson(_ReportInfo instance) =>
<String, dynamic>{
'poultry_science': instance.poultryScience,
'image': instance.image,
};
_LatestHatchingChange _$LatestHatchingChangeFromJson(
Map<String, dynamic> json,
) => _LatestHatchingChange(
date: json['date'] as String?,
role: json['role'] as String?,
fullName: json['full_name'] as String?,
);
Map<String, dynamic> _$LatestHatchingChangeToJson(
_LatestHatchingChange instance,
) => <String, dynamic>{
'date': instance.date,
'role': instance.role,
'full_name': instance.fullName,
};
_Registrar _$RegistrarFromJson(Map<String, dynamic> json) => _Registrar(
date: json['date'] as String?,
role: json['role'] as String?,
fullname: json['fullname'] as String?,
);
Map<String, dynamic> _$RegistrarToJson(_Registrar instance) =>
<String, dynamic>{
'date': instance.date,
'role': instance.role,
'fullname': instance.fullname,
};
_LastChange _$LastChangeFromJson(Map<String, dynamic> json) => _LastChange(
date: json['date'] as String?,
role: json['role'] as String?,
type: json['type'] as String?,
fullName: json['full_name'] as String?,
);
Map<String, dynamic> _$LastChangeToJson(_LastChange instance) =>
<String, dynamic>{
'date': instance.date,
'role': instance.role,
'type': instance.type,
'full_name': instance.fullName,
};
_BreedItem _$BreedItemFromJson(Map<String, dynamic> json) => _BreedItem(
breed: json['breed'] as String?,
mainQuantity: json['main_quantity'] as num?,
remainQuantity: json['remain_quantity'] as num?,
);
Map<String, dynamic> _$BreedItemToJson(_BreedItem instance) =>
<String, dynamic>{
'breed': instance.breed,
'main_quantity': instance.mainQuantity,
'remain_quantity': instance.remainQuantity,
};

View File

@@ -0,0 +1,401 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'hatching_report.freezed.dart';
part 'hatching_report.g.dart';
@freezed
abstract class HatchingReport with _$HatchingReport {
const factory HatchingReport({
int? id,
PoultryScience? poultryScience,
Hatching? hatching,
String? key,
User? user,
DateTime? createDate,
DateTime? modifyDate,
bool? trash,
DateTime? date,
List<String>? image,
double? lat,
double? log,
String? reporterFullname,
String? reporterMobile,
String? state,
double? realQuantityAi,
String? messageAi,
double? realQuantity,
String? message,
String? messageRegistererFullname,
String? messageRegistererMobile,
String? messageRegistererRole,
}) = _HatchingReport;
factory HatchingReport.fromJson(Map<String, dynamic> json) => _$HatchingReportFromJson(json);
}
@freezed
abstract class PoultryScience with _$PoultryScience {
const factory PoultryScience({
int? id,
User? user,
String? key,
DateTime? createDate,
DateTime? modifyDate,
bool? trash,
String? createdBy,
String? modifiedBy,
List<int>? poultry,
}) = _PoultryScience;
factory PoultryScience.fromJson(Map<String, dynamic> json) => _$PoultryScienceFromJson(json);
}
@freezed
abstract class User with _$User {
const factory User({
String? fullname,
String? mobile,
}) = _User;
factory User.fromJson(Map<String, dynamic> json) => _$UserFromJson(json);
}
@freezed
abstract class Hatching with _$Hatching {
const factory Hatching({
int? id,
Poultry? poultry,
ChainCompany? chainCompany,
int? age,
String? inspectionLosses,
VetFarm? vetFarm,
ActiveKill? activeKill,
KillingInfo? killingInfo,
FreeGovernmentalInfo? freeGovernmentalInfo,
ReportInfo? reportInfo,
String? key,
DateTime? createDate,
DateTime? modifyDate,
bool? trash,
bool? hasChainCompany,
String? poultryIdForeignKey,
String? poultryHatchingIdKey,
int? quantity,
int? losses,
int? leftOver,
int? killedQuantity,
int? extraKilledQuantity,
double? governmentalKilledQuantity,
double? governmentalQuantity,
double? freeKilledQuantity,
double? freeQuantity,
double? chainKilledQuantity,
double? chainKilledWeight,
double? outProvinceKilledWeight,
double? outProvinceKilledQuantity,
double? exportKilledWeight,
double? exportKilledQuantity,
double? totalCommitment,
String? commitmentType,
double? totalCommitmentQuantity,
double? totalFreeCommitmentQuantity,
double? totalFreeCommitmentWeight,
double? totalKilledWeight,
double? totalAverageKilledWeight,
int? requestLeftOver,
int? hall,
DateTime? date,
String? predicateDate,
String? chickenBreed,
int? period,
String? allowHatching,
String? state,
bool? archive,
bool? violation,
String? message,
Registrar? registrar,
List<Breed>? breed,
int? cityNumber,
String? cityName,
int? provinceNumber,
String? provinceName,
LastChange? lastChange,
int? chickenAge,
int? nowAge,
LatestHatchingChange? latestHatchingChange,
String? violationReport,
String? violationMessage,
List<String>? violationImage,
String? violationReporter,
DateTime? violationReportDate,
String? violationReportEditor,
DateTime? violationReportEditDate,
int? totalLosses,
int? directLosses,
String? directLossesInputer,
String? directLossesDate,
String? directLossesEditor,
String? directLossesLastEditDate,
String? endPeriodLossesInputer,
String? endPeriodLossesDate,
String? endPeriodLossesEditor,
String? endPeriodLossesLastEditDate,
String? breedingUniqueId,
String? licenceNumber,
bool? temporaryTrash,
bool? temporaryDeleted,
String? firstDateInputArchive,
String? secondDateInputArchive,
String? inputArchiver,
String? outputArchiveDate,
String? outputArchiver,
double? barDifferenceRequestWeight,
double? barDifferenceRequestQuantity,
String? healthCertificate,
double? samasatDischargePercentage,
String? personTypeName,
String? interactTypeName,
String? unionTypeName,
String? certId,
int? increaseQuantity,
String? tenantFullname,
String? tenantNationalCode,
String? tenantMobile,
String? tenantCity,
bool? hasTenant,
String? archiveDate,
String? createdBy,
String? modifiedBy,
}) = _Hatching;
factory Hatching.fromJson(Map<String, dynamic> json) => _$HatchingFromJson(json);
}
@freezed
abstract class LastChange with _$LastChange {
const factory LastChange({
DateTime? date,
String? role,
String? type,
String? fullName,
}) = _LastChange;
factory LastChange.fromJson(Map<String, dynamic> json) => _$LastChangeFromJson(json);
}
@freezed
abstract class Registrar with _$Registrar {
const factory Registrar({
DateTime? date,
String? role,
String? fullname,
}) = _Registrar;
factory Registrar.fromJson(Map<String, dynamic> json) => _$RegistrarFromJson(json);
}
@freezed
abstract class Poultry with _$Poultry {
const factory Poultry({
int? id,
User? user,
Address? address,
String? key,
bool? trash,
int? ownerIdForeignKey,
int? userIdForeignKey,
int? addressIdForeignKey,
bool? hasChainCompany,
String? cityOperator,
String? unitName,
String? gisCode,
int? operatingLicenceCapacity,
int? numberOfHalls,
bool? tenant,
bool? hasTenant,
String? personType,
String? economicCode,
String? systemCode,
String? epidemiologicalCode,
String? breedingUniqueId,
int? totalCapacity,
String? licenceNumber,
String? healthCertificateNumber,
int? numberOfRequests,
DateTime? hatchingDate,
DateTime? lastPartyDate,
int? numberOfIncubators,
int? herdAgeByDay,
int? herdAgeByWeek,
int? numberOfParty,
String? communicationType,
String? cooperative,
DateTime? dateOfRegister,
String? unitStatus,
bool? active,
String? identityDocuments,
String? samasatUserCode,
String? baseOrder,
DateTime? incubationDate,
double? walletAmount,
int? city,
int? cityNumber,
String? cityName,
int? provinceNumber,
String? provinceName,
double? lat,
double? long,
String? date,
int? killingAveAge,
double? activeLeftOver,
int? killingAveCount,
double? killingAveWeight,
double? killingLiveWeight,
double? killingCarcassesWeight,
double? killingLossWeightPercent,
double? realKillingAveWeight,
double? realKillingLiveWeight,
double? realKillingCarcassesWeight,
double? realKillingLossWeightPercent,
String? interestLicenceId,
bool? orderLimit,
int? owner,
int? userBankInfo,
int? wallet,
}) = _Poultry;
factory Poultry.fromJson(Map<String, dynamic> json) => _$PoultryFromJson(json);
}
@freezed
abstract class ChainCompany with _$ChainCompany {
const factory ChainCompany({
User? user,
String? userBankInfo,
String? key,
bool? trash,
String? name,
String? city,
String? province,
String? postalCode,
String? address,
int? wallet,
}) = _ChainCompany;
factory ChainCompany.fromJson(Map<String, dynamic> json) => _$ChainCompanyFromJson(json);
}
@freezed
abstract class VetFarm with _$VetFarm {
const factory VetFarm({
String? vetFarmFullName,
String? vetFarmMobile,
}) = _VetFarm;
factory VetFarm.fromJson(Map<String, dynamic> json) => _$VetFarmFromJson(json);
}
@freezed
abstract class ActiveKill with _$ActiveKill {
const factory ActiveKill({
bool? activeKill,
int? countOfRequest,
}) = _ActiveKill;
factory ActiveKill.fromJson(Map<String, dynamic> json) => _$ActiveKillFromJson(json);
}
@freezed
abstract class KillingInfo with _$KillingInfo {
const factory KillingInfo({
String? violationMessage,
int? provinceKillRequests,
int? provinceKillRequestsQuantity,
int? provinceKillRequestsWeight,
int? killHouseRequests,
int? killHouseRequestsFirstQuantity,
int? killHouseRequestsFirstWeight,
int? barCompleteWithKillHouse,
int? acceptedRealQuantityFinal,
int? acceptedRealWightFinal,
}) = _KillingInfo;
factory KillingInfo.fromJson(Map<String, dynamic> json) => _$KillingInfoFromJson(json);
}
@freezed
abstract class FreeGovernmentalInfo with _$FreeGovernmentalInfo {
const factory FreeGovernmentalInfo({
int? governmentalAllocatedQuantity,
double? totalCommitmentQuantity,
int? freeAllocatedQuantity,
double? totalFreeCommitmentQuantity,
int? leftTotalFreeCommitmentQuantity,
}) = _FreeGovernmentalInfo;
factory FreeGovernmentalInfo.fromJson(Map<String, dynamic> json) => _$FreeGovernmentalInfoFromJson(json);
}
@freezed
abstract class ReportInfo with _$ReportInfo {
const factory ReportInfo({
bool? poultryScience,
bool? image,
}) = _ReportInfo;
factory ReportInfo.fromJson(Map<String, dynamic> json) => _$ReportInfoFromJson(json);
}
@freezed
abstract class LatestHatchingChange with _$LatestHatchingChange {
const factory LatestHatchingChange({
DateTime? date,
String? role,
String? fullName,
}) = _LatestHatchingChange;
factory LatestHatchingChange.fromJson(Map<String, dynamic> json) => _$LatestHatchingChangeFromJson(json);
}
@freezed
abstract class Breed with _$Breed {
const factory Breed({
String? breed,
int? mainQuantity,
int? remainQuantity,
}) = _Breed;
factory Breed.fromJson(Map<String, dynamic> json) => _$BreedFromJson(json);
}
@freezed
abstract class Address with _$Address {
const factory Address({
Province? province,
City? city,
String? address,
String? postalCode,
}) = _Address;
factory Address.fromJson(Map<String, dynamic> json) => _$AddressFromJson(json);
}
@freezed
abstract class Province with _$Province {
const factory Province({
String? key,
String? name,
}) = _Province;
factory Province.fromJson(Map<String, dynamic> json) => _$ProvinceFromJson(json);
}
@freezed
abstract class City with _$City {
const factory City({
String? key,
String? name,
}) = _City;
factory City.fromJson(Map<String, dynamic> json) => _$CityFromJson(json);
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,740 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'hatching_report.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_HatchingReport _$HatchingReportFromJson(
Map<String, dynamic> json,
) => _HatchingReport(
id: (json['id'] as num?)?.toInt(),
poultryScience: json['poultry_science'] == null
? null
: PoultryScience.fromJson(
json['poultry_science'] as Map<String, dynamic>,
),
hatching: json['hatching'] == null
? null
: Hatching.fromJson(json['hatching'] as Map<String, dynamic>),
key: json['key'] as String?,
user: json['user'] == null
? null
: User.fromJson(json['user'] as Map<String, dynamic>),
createDate: json['create_date'] == null
? null
: DateTime.parse(json['create_date'] as String),
modifyDate: json['modify_date'] == null
? null
: DateTime.parse(json['modify_date'] as String),
trash: json['trash'] as bool?,
date: json['date'] == null ? null : DateTime.parse(json['date'] as String),
image: (json['image'] as List<dynamic>?)?.map((e) => e as String).toList(),
lat: (json['lat'] as num?)?.toDouble(),
log: (json['log'] as num?)?.toDouble(),
reporterFullname: json['reporter_fullname'] as String?,
reporterMobile: json['reporter_mobile'] as String?,
state: json['state'] as String?,
realQuantityAi: (json['real_quantity_ai'] as num?)?.toDouble(),
messageAi: json['message_ai'] as String?,
realQuantity: (json['real_quantity'] as num?)?.toDouble(),
message: json['message'] as String?,
messageRegistererFullname: json['message_registerer_fullname'] as String?,
messageRegistererMobile: json['message_registerer_mobile'] as String?,
messageRegistererRole: json['message_registerer_role'] as String?,
);
Map<String, dynamic> _$HatchingReportToJson(_HatchingReport instance) =>
<String, dynamic>{
'id': instance.id,
'poultry_science': instance.poultryScience,
'hatching': instance.hatching,
'key': instance.key,
'user': instance.user,
'create_date': instance.createDate?.toIso8601String(),
'modify_date': instance.modifyDate?.toIso8601String(),
'trash': instance.trash,
'date': instance.date?.toIso8601String(),
'image': instance.image,
'lat': instance.lat,
'log': instance.log,
'reporter_fullname': instance.reporterFullname,
'reporter_mobile': instance.reporterMobile,
'state': instance.state,
'real_quantity_ai': instance.realQuantityAi,
'message_ai': instance.messageAi,
'real_quantity': instance.realQuantity,
'message': instance.message,
'message_registerer_fullname': instance.messageRegistererFullname,
'message_registerer_mobile': instance.messageRegistererMobile,
'message_registerer_role': instance.messageRegistererRole,
};
_PoultryScience _$PoultryScienceFromJson(Map<String, dynamic> json) =>
_PoultryScience(
id: (json['id'] as num?)?.toInt(),
user: json['user'] == null
? null
: User.fromJson(json['user'] as Map<String, dynamic>),
key: json['key'] as String?,
createDate: json['create_date'] == null
? null
: DateTime.parse(json['create_date'] as String),
modifyDate: json['modify_date'] == null
? null
: DateTime.parse(json['modify_date'] as String),
trash: json['trash'] as bool?,
createdBy: json['created_by'] as String?,
modifiedBy: json['modified_by'] as String?,
poultry: (json['poultry'] as List<dynamic>?)
?.map((e) => (e as num).toInt())
.toList(),
);
Map<String, dynamic> _$PoultryScienceToJson(_PoultryScience instance) =>
<String, dynamic>{
'id': instance.id,
'user': instance.user,
'key': instance.key,
'create_date': instance.createDate?.toIso8601String(),
'modify_date': instance.modifyDate?.toIso8601String(),
'trash': instance.trash,
'created_by': instance.createdBy,
'modified_by': instance.modifiedBy,
'poultry': instance.poultry,
};
_User _$UserFromJson(Map<String, dynamic> json) => _User(
fullname: json['fullname'] as String?,
mobile: json['mobile'] as String?,
);
Map<String, dynamic> _$UserToJson(_User instance) => <String, dynamic>{
'fullname': instance.fullname,
'mobile': instance.mobile,
};
_Hatching _$HatchingFromJson(Map<String, dynamic> json) => _Hatching(
id: (json['id'] as num?)?.toInt(),
poultry: json['poultry'] == null
? null
: Poultry.fromJson(json['poultry'] as Map<String, dynamic>),
chainCompany: json['chain_company'] == null
? null
: ChainCompany.fromJson(json['chain_company'] as Map<String, dynamic>),
age: (json['age'] as num?)?.toInt(),
inspectionLosses: json['inspection_losses'] as String?,
vetFarm: json['vet_farm'] == null
? null
: VetFarm.fromJson(json['vet_farm'] as Map<String, dynamic>),
activeKill: json['active_kill'] == null
? null
: ActiveKill.fromJson(json['active_kill'] as Map<String, dynamic>),
killingInfo: json['killing_info'] == null
? null
: KillingInfo.fromJson(json['killing_info'] as Map<String, dynamic>),
freeGovernmentalInfo: json['free_governmental_info'] == null
? null
: FreeGovernmentalInfo.fromJson(
json['free_governmental_info'] as Map<String, dynamic>,
),
reportInfo: json['report_info'] == null
? null
: ReportInfo.fromJson(json['report_info'] as Map<String, dynamic>),
key: json['key'] as String?,
createDate: json['create_date'] == null
? null
: DateTime.parse(json['create_date'] as String),
modifyDate: json['modify_date'] == null
? null
: DateTime.parse(json['modify_date'] as String),
trash: json['trash'] as bool?,
hasChainCompany: json['has_chain_company'] as bool?,
poultryIdForeignKey: json['poultry_id_foreign_key'] as String?,
poultryHatchingIdKey: json['poultry_hatching_id_key'] as String?,
quantity: (json['quantity'] as num?)?.toInt(),
losses: (json['losses'] as num?)?.toInt(),
leftOver: (json['left_over'] as num?)?.toInt(),
killedQuantity: (json['killed_quantity'] as num?)?.toInt(),
extraKilledQuantity: (json['extra_killed_quantity'] as num?)?.toInt(),
governmentalKilledQuantity: (json['governmental_killed_quantity'] as num?)
?.toDouble(),
governmentalQuantity: (json['governmental_quantity'] as num?)?.toDouble(),
freeKilledQuantity: (json['free_killed_quantity'] as num?)?.toDouble(),
freeQuantity: (json['free_quantity'] as num?)?.toDouble(),
chainKilledQuantity: (json['chain_killed_quantity'] as num?)?.toDouble(),
chainKilledWeight: (json['chain_killed_weight'] as num?)?.toDouble(),
outProvinceKilledWeight: (json['out_province_killed_weight'] as num?)
?.toDouble(),
outProvinceKilledQuantity: (json['out_province_killed_quantity'] as num?)
?.toDouble(),
exportKilledWeight: (json['export_killed_weight'] as num?)?.toDouble(),
exportKilledQuantity: (json['export_killed_quantity'] as num?)?.toDouble(),
totalCommitment: (json['total_commitment'] as num?)?.toDouble(),
commitmentType: json['commitment_type'] as String?,
totalCommitmentQuantity: (json['total_commitment_quantity'] as num?)
?.toDouble(),
totalFreeCommitmentQuantity: (json['total_free_commitment_quantity'] as num?)
?.toDouble(),
totalFreeCommitmentWeight: (json['total_free_commitment_weight'] as num?)
?.toDouble(),
totalKilledWeight: (json['total_killed_weight'] as num?)?.toDouble(),
totalAverageKilledWeight: (json['total_average_killed_weight'] as num?)
?.toDouble(),
requestLeftOver: (json['request_left_over'] as num?)?.toInt(),
hall: (json['hall'] as num?)?.toInt(),
date: json['date'] == null ? null : DateTime.parse(json['date'] as String),
predicateDate: json['predicate_date'] as String?,
chickenBreed: json['chicken_breed'] as String?,
period: (json['period'] as num?)?.toInt(),
allowHatching: json['allow_hatching'] as String?,
state: json['state'] as String?,
archive: json['archive'] as bool?,
violation: json['violation'] as bool?,
message: json['message'] as String?,
registrar: json['registrar'] == null
? null
: Registrar.fromJson(json['registrar'] as Map<String, dynamic>),
breed: (json['breed'] as List<dynamic>?)
?.map((e) => Breed.fromJson(e as Map<String, dynamic>))
.toList(),
cityNumber: (json['city_number'] as num?)?.toInt(),
cityName: json['city_name'] as String?,
provinceNumber: (json['province_number'] as num?)?.toInt(),
provinceName: json['province_name'] as String?,
lastChange: json['last_change'] == null
? null
: LastChange.fromJson(json['last_change'] as Map<String, dynamic>),
chickenAge: (json['chicken_age'] as num?)?.toInt(),
nowAge: (json['now_age'] as num?)?.toInt(),
latestHatchingChange: json['latest_hatching_change'] == null
? null
: LatestHatchingChange.fromJson(
json['latest_hatching_change'] as Map<String, dynamic>,
),
violationReport: json['violation_report'] as String?,
violationMessage: json['violation_message'] as String?,
violationImage: (json['violation_image'] as List<dynamic>?)
?.map((e) => e as String)
.toList(),
violationReporter: json['violation_reporter'] as String?,
violationReportDate: json['violation_report_date'] == null
? null
: DateTime.parse(json['violation_report_date'] as String),
violationReportEditor: json['violation_report_editor'] as String?,
violationReportEditDate: json['violation_report_edit_date'] == null
? null
: DateTime.parse(json['violation_report_edit_date'] as String),
totalLosses: (json['total_losses'] as num?)?.toInt(),
directLosses: (json['direct_losses'] as num?)?.toInt(),
directLossesInputer: json['direct_losses_inputer'] as String?,
directLossesDate: json['direct_losses_date'] as String?,
directLossesEditor: json['direct_losses_editor'] as String?,
directLossesLastEditDate: json['direct_losses_last_edit_date'] as String?,
endPeriodLossesInputer: json['end_period_losses_inputer'] as String?,
endPeriodLossesDate: json['end_period_losses_date'] as String?,
endPeriodLossesEditor: json['end_period_losses_editor'] as String?,
endPeriodLossesLastEditDate:
json['end_period_losses_last_edit_date'] as String?,
breedingUniqueId: json['breeding_unique_id'] as String?,
licenceNumber: json['licence_number'] as String?,
temporaryTrash: json['temporary_trash'] as bool?,
temporaryDeleted: json['temporary_deleted'] as bool?,
firstDateInputArchive: json['first_date_input_archive'] as String?,
secondDateInputArchive: json['second_date_input_archive'] as String?,
inputArchiver: json['input_archiver'] as String?,
outputArchiveDate: json['output_archive_date'] as String?,
outputArchiver: json['output_archiver'] as String?,
barDifferenceRequestWeight: (json['bar_difference_request_weight'] as num?)
?.toDouble(),
barDifferenceRequestQuantity:
(json['bar_difference_request_quantity'] as num?)?.toDouble(),
healthCertificate: json['health_certificate'] as String?,
samasatDischargePercentage: (json['samasat_discharge_percentage'] as num?)
?.toDouble(),
personTypeName: json['person_type_name'] as String?,
interactTypeName: json['interact_type_name'] as String?,
unionTypeName: json['union_type_name'] as String?,
certId: json['cert_id'] as String?,
increaseQuantity: (json['increase_quantity'] as num?)?.toInt(),
tenantFullname: json['tenant_fullname'] as String?,
tenantNationalCode: json['tenant_national_code'] as String?,
tenantMobile: json['tenant_mobile'] as String?,
tenantCity: json['tenant_city'] as String?,
hasTenant: json['has_tenant'] as bool?,
archiveDate: json['archive_date'] as String?,
createdBy: json['created_by'] as String?,
modifiedBy: json['modified_by'] as String?,
);
Map<String, dynamic> _$HatchingToJson(_Hatching instance) => <String, dynamic>{
'id': instance.id,
'poultry': instance.poultry,
'chain_company': instance.chainCompany,
'age': instance.age,
'inspection_losses': instance.inspectionLosses,
'vet_farm': instance.vetFarm,
'active_kill': instance.activeKill,
'killing_info': instance.killingInfo,
'free_governmental_info': instance.freeGovernmentalInfo,
'report_info': instance.reportInfo,
'key': instance.key,
'create_date': instance.createDate?.toIso8601String(),
'modify_date': instance.modifyDate?.toIso8601String(),
'trash': instance.trash,
'has_chain_company': instance.hasChainCompany,
'poultry_id_foreign_key': instance.poultryIdForeignKey,
'poultry_hatching_id_key': instance.poultryHatchingIdKey,
'quantity': instance.quantity,
'losses': instance.losses,
'left_over': instance.leftOver,
'killed_quantity': instance.killedQuantity,
'extra_killed_quantity': instance.extraKilledQuantity,
'governmental_killed_quantity': instance.governmentalKilledQuantity,
'governmental_quantity': instance.governmentalQuantity,
'free_killed_quantity': instance.freeKilledQuantity,
'free_quantity': instance.freeQuantity,
'chain_killed_quantity': instance.chainKilledQuantity,
'chain_killed_weight': instance.chainKilledWeight,
'out_province_killed_weight': instance.outProvinceKilledWeight,
'out_province_killed_quantity': instance.outProvinceKilledQuantity,
'export_killed_weight': instance.exportKilledWeight,
'export_killed_quantity': instance.exportKilledQuantity,
'total_commitment': instance.totalCommitment,
'commitment_type': instance.commitmentType,
'total_commitment_quantity': instance.totalCommitmentQuantity,
'total_free_commitment_quantity': instance.totalFreeCommitmentQuantity,
'total_free_commitment_weight': instance.totalFreeCommitmentWeight,
'total_killed_weight': instance.totalKilledWeight,
'total_average_killed_weight': instance.totalAverageKilledWeight,
'request_left_over': instance.requestLeftOver,
'hall': instance.hall,
'date': instance.date?.toIso8601String(),
'predicate_date': instance.predicateDate,
'chicken_breed': instance.chickenBreed,
'period': instance.period,
'allow_hatching': instance.allowHatching,
'state': instance.state,
'archive': instance.archive,
'violation': instance.violation,
'message': instance.message,
'registrar': instance.registrar,
'breed': instance.breed,
'city_number': instance.cityNumber,
'city_name': instance.cityName,
'province_number': instance.provinceNumber,
'province_name': instance.provinceName,
'last_change': instance.lastChange,
'chicken_age': instance.chickenAge,
'now_age': instance.nowAge,
'latest_hatching_change': instance.latestHatchingChange,
'violation_report': instance.violationReport,
'violation_message': instance.violationMessage,
'violation_image': instance.violationImage,
'violation_reporter': instance.violationReporter,
'violation_report_date': instance.violationReportDate?.toIso8601String(),
'violation_report_editor': instance.violationReportEditor,
'violation_report_edit_date': instance.violationReportEditDate
?.toIso8601String(),
'total_losses': instance.totalLosses,
'direct_losses': instance.directLosses,
'direct_losses_inputer': instance.directLossesInputer,
'direct_losses_date': instance.directLossesDate,
'direct_losses_editor': instance.directLossesEditor,
'direct_losses_last_edit_date': instance.directLossesLastEditDate,
'end_period_losses_inputer': instance.endPeriodLossesInputer,
'end_period_losses_date': instance.endPeriodLossesDate,
'end_period_losses_editor': instance.endPeriodLossesEditor,
'end_period_losses_last_edit_date': instance.endPeriodLossesLastEditDate,
'breeding_unique_id': instance.breedingUniqueId,
'licence_number': instance.licenceNumber,
'temporary_trash': instance.temporaryTrash,
'temporary_deleted': instance.temporaryDeleted,
'first_date_input_archive': instance.firstDateInputArchive,
'second_date_input_archive': instance.secondDateInputArchive,
'input_archiver': instance.inputArchiver,
'output_archive_date': instance.outputArchiveDate,
'output_archiver': instance.outputArchiver,
'bar_difference_request_weight': instance.barDifferenceRequestWeight,
'bar_difference_request_quantity': instance.barDifferenceRequestQuantity,
'health_certificate': instance.healthCertificate,
'samasat_discharge_percentage': instance.samasatDischargePercentage,
'person_type_name': instance.personTypeName,
'interact_type_name': instance.interactTypeName,
'union_type_name': instance.unionTypeName,
'cert_id': instance.certId,
'increase_quantity': instance.increaseQuantity,
'tenant_fullname': instance.tenantFullname,
'tenant_national_code': instance.tenantNationalCode,
'tenant_mobile': instance.tenantMobile,
'tenant_city': instance.tenantCity,
'has_tenant': instance.hasTenant,
'archive_date': instance.archiveDate,
'created_by': instance.createdBy,
'modified_by': instance.modifiedBy,
};
_LastChange _$LastChangeFromJson(Map<String, dynamic> json) => _LastChange(
date: json['date'] == null ? null : DateTime.parse(json['date'] as String),
role: json['role'] as String?,
type: json['type'] as String?,
fullName: json['full_name'] as String?,
);
Map<String, dynamic> _$LastChangeToJson(_LastChange instance) =>
<String, dynamic>{
'date': instance.date?.toIso8601String(),
'role': instance.role,
'type': instance.type,
'full_name': instance.fullName,
};
_Registrar _$RegistrarFromJson(Map<String, dynamic> json) => _Registrar(
date: json['date'] == null ? null : DateTime.parse(json['date'] as String),
role: json['role'] as String?,
fullname: json['fullname'] as String?,
);
Map<String, dynamic> _$RegistrarToJson(_Registrar instance) =>
<String, dynamic>{
'date': instance.date?.toIso8601String(),
'role': instance.role,
'fullname': instance.fullname,
};
_Poultry _$PoultryFromJson(Map<String, dynamic> json) => _Poultry(
id: (json['id'] as num?)?.toInt(),
user: json['user'] == null
? null
: User.fromJson(json['user'] as Map<String, dynamic>),
address: json['address'] == null
? null
: Address.fromJson(json['address'] as Map<String, dynamic>),
key: json['key'] as String?,
trash: json['trash'] as bool?,
ownerIdForeignKey: (json['owner_id_foreign_key'] as num?)?.toInt(),
userIdForeignKey: (json['user_id_foreign_key'] as num?)?.toInt(),
addressIdForeignKey: (json['address_id_foreign_key'] as num?)?.toInt(),
hasChainCompany: json['has_chain_company'] as bool?,
cityOperator: json['city_operator'] as String?,
unitName: json['unit_name'] as String?,
gisCode: json['gis_code'] as String?,
operatingLicenceCapacity: (json['operating_licence_capacity'] as num?)
?.toInt(),
numberOfHalls: (json['number_of_halls'] as num?)?.toInt(),
tenant: json['tenant'] as bool?,
hasTenant: json['has_tenant'] as bool?,
personType: json['person_type'] as String?,
economicCode: json['economic_code'] as String?,
systemCode: json['system_code'] as String?,
epidemiologicalCode: json['epidemiological_code'] as String?,
breedingUniqueId: json['breeding_unique_id'] as String?,
totalCapacity: (json['total_capacity'] as num?)?.toInt(),
licenceNumber: json['licence_number'] as String?,
healthCertificateNumber: json['health_certificate_number'] as String?,
numberOfRequests: (json['number_of_requests'] as num?)?.toInt(),
hatchingDate: json['hatching_date'] == null
? null
: DateTime.parse(json['hatching_date'] as String),
lastPartyDate: json['last_party_date'] == null
? null
: DateTime.parse(json['last_party_date'] as String),
numberOfIncubators: (json['number_of_incubators'] as num?)?.toInt(),
herdAgeByDay: (json['herd_age_by_day'] as num?)?.toInt(),
herdAgeByWeek: (json['herd_age_by_week'] as num?)?.toInt(),
numberOfParty: (json['number_of_party'] as num?)?.toInt(),
communicationType: json['communication_type'] as String?,
cooperative: json['cooperative'] as String?,
dateOfRegister: json['date_of_register'] == null
? null
: DateTime.parse(json['date_of_register'] as String),
unitStatus: json['unit_status'] as String?,
active: json['active'] as bool?,
identityDocuments: json['identity_documents'] as String?,
samasatUserCode: json['samasat_user_code'] as String?,
baseOrder: json['base_order'] as String?,
incubationDate: json['incubation_date'] == null
? null
: DateTime.parse(json['incubation_date'] as String),
walletAmount: (json['wallet_amount'] as num?)?.toDouble(),
city: (json['city'] as num?)?.toInt(),
cityNumber: (json['city_number'] as num?)?.toInt(),
cityName: json['city_name'] as String?,
provinceNumber: (json['province_number'] as num?)?.toInt(),
provinceName: json['province_name'] as String?,
lat: (json['lat'] as num?)?.toDouble(),
long: (json['long'] as num?)?.toDouble(),
date: json['date'] as String?,
killingAveAge: (json['killing_ave_age'] as num?)?.toInt(),
activeLeftOver: (json['active_left_over'] as num?)?.toDouble(),
killingAveCount: (json['killing_ave_count'] as num?)?.toInt(),
killingAveWeight: (json['killing_ave_weight'] as num?)?.toDouble(),
killingLiveWeight: (json['killing_live_weight'] as num?)?.toDouble(),
killingCarcassesWeight: (json['killing_carcasses_weight'] as num?)
?.toDouble(),
killingLossWeightPercent: (json['killing_loss_weight_percent'] as num?)
?.toDouble(),
realKillingAveWeight: (json['real_killing_ave_weight'] as num?)?.toDouble(),
realKillingLiveWeight: (json['real_killing_live_weight'] as num?)?.toDouble(),
realKillingCarcassesWeight: (json['real_killing_carcasses_weight'] as num?)
?.toDouble(),
realKillingLossWeightPercent:
(json['real_killing_loss_weight_percent'] as num?)?.toDouble(),
interestLicenceId: json['interest_licence_id'] as String?,
orderLimit: json['order_limit'] as bool?,
owner: (json['owner'] as num?)?.toInt(),
userBankInfo: (json['user_bank_info'] as num?)?.toInt(),
wallet: (json['wallet'] as num?)?.toInt(),
);
Map<String, dynamic> _$PoultryToJson(_Poultry instance) => <String, dynamic>{
'id': instance.id,
'user': instance.user,
'address': instance.address,
'key': instance.key,
'trash': instance.trash,
'owner_id_foreign_key': instance.ownerIdForeignKey,
'user_id_foreign_key': instance.userIdForeignKey,
'address_id_foreign_key': instance.addressIdForeignKey,
'has_chain_company': instance.hasChainCompany,
'city_operator': instance.cityOperator,
'unit_name': instance.unitName,
'gis_code': instance.gisCode,
'operating_licence_capacity': instance.operatingLicenceCapacity,
'number_of_halls': instance.numberOfHalls,
'tenant': instance.tenant,
'has_tenant': instance.hasTenant,
'person_type': instance.personType,
'economic_code': instance.economicCode,
'system_code': instance.systemCode,
'epidemiological_code': instance.epidemiologicalCode,
'breeding_unique_id': instance.breedingUniqueId,
'total_capacity': instance.totalCapacity,
'licence_number': instance.licenceNumber,
'health_certificate_number': instance.healthCertificateNumber,
'number_of_requests': instance.numberOfRequests,
'hatching_date': instance.hatchingDate?.toIso8601String(),
'last_party_date': instance.lastPartyDate?.toIso8601String(),
'number_of_incubators': instance.numberOfIncubators,
'herd_age_by_day': instance.herdAgeByDay,
'herd_age_by_week': instance.herdAgeByWeek,
'number_of_party': instance.numberOfParty,
'communication_type': instance.communicationType,
'cooperative': instance.cooperative,
'date_of_register': instance.dateOfRegister?.toIso8601String(),
'unit_status': instance.unitStatus,
'active': instance.active,
'identity_documents': instance.identityDocuments,
'samasat_user_code': instance.samasatUserCode,
'base_order': instance.baseOrder,
'incubation_date': instance.incubationDate?.toIso8601String(),
'wallet_amount': instance.walletAmount,
'city': instance.city,
'city_number': instance.cityNumber,
'city_name': instance.cityName,
'province_number': instance.provinceNumber,
'province_name': instance.provinceName,
'lat': instance.lat,
'long': instance.long,
'date': instance.date,
'killing_ave_age': instance.killingAveAge,
'active_left_over': instance.activeLeftOver,
'killing_ave_count': instance.killingAveCount,
'killing_ave_weight': instance.killingAveWeight,
'killing_live_weight': instance.killingLiveWeight,
'killing_carcasses_weight': instance.killingCarcassesWeight,
'killing_loss_weight_percent': instance.killingLossWeightPercent,
'real_killing_ave_weight': instance.realKillingAveWeight,
'real_killing_live_weight': instance.realKillingLiveWeight,
'real_killing_carcasses_weight': instance.realKillingCarcassesWeight,
'real_killing_loss_weight_percent': instance.realKillingLossWeightPercent,
'interest_licence_id': instance.interestLicenceId,
'order_limit': instance.orderLimit,
'owner': instance.owner,
'user_bank_info': instance.userBankInfo,
'wallet': instance.wallet,
};
_ChainCompany _$ChainCompanyFromJson(Map<String, dynamic> json) =>
_ChainCompany(
user: json['user'] == null
? null
: User.fromJson(json['user'] as Map<String, dynamic>),
userBankInfo: json['user_bank_info'] as String?,
key: json['key'] as String?,
trash: json['trash'] as bool?,
name: json['name'] as String?,
city: json['city'] as String?,
province: json['province'] as String?,
postalCode: json['postal_code'] as String?,
address: json['address'] as String?,
wallet: (json['wallet'] as num?)?.toInt(),
);
Map<String, dynamic> _$ChainCompanyToJson(_ChainCompany instance) =>
<String, dynamic>{
'user': instance.user,
'user_bank_info': instance.userBankInfo,
'key': instance.key,
'trash': instance.trash,
'name': instance.name,
'city': instance.city,
'province': instance.province,
'postal_code': instance.postalCode,
'address': instance.address,
'wallet': instance.wallet,
};
_VetFarm _$VetFarmFromJson(Map<String, dynamic> json) => _VetFarm(
vetFarmFullName: json['vet_farm_full_name'] as String?,
vetFarmMobile: json['vet_farm_mobile'] as String?,
);
Map<String, dynamic> _$VetFarmToJson(_VetFarm instance) => <String, dynamic>{
'vet_farm_full_name': instance.vetFarmFullName,
'vet_farm_mobile': instance.vetFarmMobile,
};
_ActiveKill _$ActiveKillFromJson(Map<String, dynamic> json) => _ActiveKill(
activeKill: json['active_kill'] as bool?,
countOfRequest: (json['count_of_request'] as num?)?.toInt(),
);
Map<String, dynamic> _$ActiveKillToJson(_ActiveKill instance) =>
<String, dynamic>{
'active_kill': instance.activeKill,
'count_of_request': instance.countOfRequest,
};
_KillingInfo _$KillingInfoFromJson(Map<String, dynamic> json) => _KillingInfo(
violationMessage: json['violation_message'] as String?,
provinceKillRequests: (json['province_kill_requests'] as num?)?.toInt(),
provinceKillRequestsQuantity:
(json['province_kill_requests_quantity'] as num?)?.toInt(),
provinceKillRequestsWeight: (json['province_kill_requests_weight'] as num?)
?.toInt(),
killHouseRequests: (json['kill_house_requests'] as num?)?.toInt(),
killHouseRequestsFirstQuantity:
(json['kill_house_requests_first_quantity'] as num?)?.toInt(),
killHouseRequestsFirstWeight:
(json['kill_house_requests_first_weight'] as num?)?.toInt(),
barCompleteWithKillHouse: (json['bar_complete_with_kill_house'] as num?)
?.toInt(),
acceptedRealQuantityFinal: (json['accepted_real_quantity_final'] as num?)
?.toInt(),
acceptedRealWightFinal: (json['accepted_real_wight_final'] as num?)?.toInt(),
);
Map<String, dynamic> _$KillingInfoToJson(
_KillingInfo instance,
) => <String, dynamic>{
'violation_message': instance.violationMessage,
'province_kill_requests': instance.provinceKillRequests,
'province_kill_requests_quantity': instance.provinceKillRequestsQuantity,
'province_kill_requests_weight': instance.provinceKillRequestsWeight,
'kill_house_requests': instance.killHouseRequests,
'kill_house_requests_first_quantity': instance.killHouseRequestsFirstQuantity,
'kill_house_requests_first_weight': instance.killHouseRequestsFirstWeight,
'bar_complete_with_kill_house': instance.barCompleteWithKillHouse,
'accepted_real_quantity_final': instance.acceptedRealQuantityFinal,
'accepted_real_wight_final': instance.acceptedRealWightFinal,
};
_FreeGovernmentalInfo _$FreeGovernmentalInfoFromJson(
Map<String, dynamic> json,
) => _FreeGovernmentalInfo(
governmentalAllocatedQuantity:
(json['governmental_allocated_quantity'] as num?)?.toInt(),
totalCommitmentQuantity: (json['total_commitment_quantity'] as num?)
?.toDouble(),
freeAllocatedQuantity: (json['free_allocated_quantity'] as num?)?.toInt(),
totalFreeCommitmentQuantity: (json['total_free_commitment_quantity'] as num?)
?.toDouble(),
leftTotalFreeCommitmentQuantity:
(json['left_total_free_commitment_quantity'] as num?)?.toInt(),
);
Map<String, dynamic> _$FreeGovernmentalInfoToJson(
_FreeGovernmentalInfo instance,
) => <String, dynamic>{
'governmental_allocated_quantity': instance.governmentalAllocatedQuantity,
'total_commitment_quantity': instance.totalCommitmentQuantity,
'free_allocated_quantity': instance.freeAllocatedQuantity,
'total_free_commitment_quantity': instance.totalFreeCommitmentQuantity,
'left_total_free_commitment_quantity':
instance.leftTotalFreeCommitmentQuantity,
};
_ReportInfo _$ReportInfoFromJson(Map<String, dynamic> json) => _ReportInfo(
poultryScience: json['poultry_science'] as bool?,
image: json['image'] as bool?,
);
Map<String, dynamic> _$ReportInfoToJson(_ReportInfo instance) =>
<String, dynamic>{
'poultry_science': instance.poultryScience,
'image': instance.image,
};
_LatestHatchingChange _$LatestHatchingChangeFromJson(
Map<String, dynamic> json,
) => _LatestHatchingChange(
date: json['date'] == null ? null : DateTime.parse(json['date'] as String),
role: json['role'] as String?,
fullName: json['full_name'] as String?,
);
Map<String, dynamic> _$LatestHatchingChangeToJson(
_LatestHatchingChange instance,
) => <String, dynamic>{
'date': instance.date?.toIso8601String(),
'role': instance.role,
'full_name': instance.fullName,
};
_Breed _$BreedFromJson(Map<String, dynamic> json) => _Breed(
breed: json['breed'] as String?,
mainQuantity: (json['main_quantity'] as num?)?.toInt(),
remainQuantity: (json['remain_quantity'] as num?)?.toInt(),
);
Map<String, dynamic> _$BreedToJson(_Breed instance) => <String, dynamic>{
'breed': instance.breed,
'main_quantity': instance.mainQuantity,
'remain_quantity': instance.remainQuantity,
};
_Address _$AddressFromJson(Map<String, dynamic> json) => _Address(
province: json['province'] == null
? null
: Province.fromJson(json['province'] as Map<String, dynamic>),
city: json['city'] == null
? null
: City.fromJson(json['city'] as Map<String, dynamic>),
address: json['address'] as String?,
postalCode: json['postal_code'] as String?,
);
Map<String, dynamic> _$AddressToJson(_Address instance) => <String, dynamic>{
'province': instance.province,
'city': instance.city,
'address': instance.address,
'postal_code': instance.postalCode,
};
_Province _$ProvinceFromJson(Map<String, dynamic> json) =>
_Province(key: json['key'] as String?, name: json['name'] as String?);
Map<String, dynamic> _$ProvinceToJson(_Province instance) => <String, dynamic>{
'key': instance.key,
'name': instance.name,
};
_City _$CityFromJson(Map<String, dynamic> json) =>
_City(key: json['key'] as String?, name: json['name'] as String?);
Map<String, dynamic> _$CityToJson(_City instance) => <String, dynamic>{
'key': instance.key,
'name': instance.name,
};

View File

@@ -0,0 +1,21 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'home_poultry_science_model.freezed.dart';
part 'home_poultry_science_model.g.dart';
@freezed
abstract class HomePoultryScienceModel with _$HomePoultryScienceModel {
const factory HomePoultryScienceModel({
int? farmCount,
int? hatchingCount,
int? hatchingQuantity,
int? hatchingLeftOver,
int? hatchingLosses,
int? hatchingKilledQuantity,
int? hatchingMaxAge,
int? hatchingMinAge,
}) = _HomePoultryScienceModel;
factory HomePoultryScienceModel.fromJson(Map<String, dynamic> json) =>
_$HomePoultryScienceModelFromJson(json);
}

View File

@@ -0,0 +1,298 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'home_poultry_science_model.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$HomePoultryScienceModel {
int? get farmCount; int? get hatchingCount; int? get hatchingQuantity; int? get hatchingLeftOver; int? get hatchingLosses; int? get hatchingKilledQuantity; int? get hatchingMaxAge; int? get hatchingMinAge;
/// Create a copy of HomePoultryScienceModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$HomePoultryScienceModelCopyWith<HomePoultryScienceModel> get copyWith => _$HomePoultryScienceModelCopyWithImpl<HomePoultryScienceModel>(this as HomePoultryScienceModel, _$identity);
/// Serializes this HomePoultryScienceModel to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is HomePoultryScienceModel&&(identical(other.farmCount, farmCount) || other.farmCount == farmCount)&&(identical(other.hatchingCount, hatchingCount) || other.hatchingCount == hatchingCount)&&(identical(other.hatchingQuantity, hatchingQuantity) || other.hatchingQuantity == hatchingQuantity)&&(identical(other.hatchingLeftOver, hatchingLeftOver) || other.hatchingLeftOver == hatchingLeftOver)&&(identical(other.hatchingLosses, hatchingLosses) || other.hatchingLosses == hatchingLosses)&&(identical(other.hatchingKilledQuantity, hatchingKilledQuantity) || other.hatchingKilledQuantity == hatchingKilledQuantity)&&(identical(other.hatchingMaxAge, hatchingMaxAge) || other.hatchingMaxAge == hatchingMaxAge)&&(identical(other.hatchingMinAge, hatchingMinAge) || other.hatchingMinAge == hatchingMinAge));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,farmCount,hatchingCount,hatchingQuantity,hatchingLeftOver,hatchingLosses,hatchingKilledQuantity,hatchingMaxAge,hatchingMinAge);
@override
String toString() {
return 'HomePoultryScienceModel(farmCount: $farmCount, hatchingCount: $hatchingCount, hatchingQuantity: $hatchingQuantity, hatchingLeftOver: $hatchingLeftOver, hatchingLosses: $hatchingLosses, hatchingKilledQuantity: $hatchingKilledQuantity, hatchingMaxAge: $hatchingMaxAge, hatchingMinAge: $hatchingMinAge)';
}
}
/// @nodoc
abstract mixin class $HomePoultryScienceModelCopyWith<$Res> {
factory $HomePoultryScienceModelCopyWith(HomePoultryScienceModel value, $Res Function(HomePoultryScienceModel) _then) = _$HomePoultryScienceModelCopyWithImpl;
@useResult
$Res call({
int? farmCount, int? hatchingCount, int? hatchingQuantity, int? hatchingLeftOver, int? hatchingLosses, int? hatchingKilledQuantity, int? hatchingMaxAge, int? hatchingMinAge
});
}
/// @nodoc
class _$HomePoultryScienceModelCopyWithImpl<$Res>
implements $HomePoultryScienceModelCopyWith<$Res> {
_$HomePoultryScienceModelCopyWithImpl(this._self, this._then);
final HomePoultryScienceModel _self;
final $Res Function(HomePoultryScienceModel) _then;
/// Create a copy of HomePoultryScienceModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? farmCount = freezed,Object? hatchingCount = freezed,Object? hatchingQuantity = freezed,Object? hatchingLeftOver = freezed,Object? hatchingLosses = freezed,Object? hatchingKilledQuantity = freezed,Object? hatchingMaxAge = freezed,Object? hatchingMinAge = freezed,}) {
return _then(_self.copyWith(
farmCount: freezed == farmCount ? _self.farmCount : farmCount // ignore: cast_nullable_to_non_nullable
as int?,hatchingCount: freezed == hatchingCount ? _self.hatchingCount : hatchingCount // ignore: cast_nullable_to_non_nullable
as int?,hatchingQuantity: freezed == hatchingQuantity ? _self.hatchingQuantity : hatchingQuantity // ignore: cast_nullable_to_non_nullable
as int?,hatchingLeftOver: freezed == hatchingLeftOver ? _self.hatchingLeftOver : hatchingLeftOver // ignore: cast_nullable_to_non_nullable
as int?,hatchingLosses: freezed == hatchingLosses ? _self.hatchingLosses : hatchingLosses // ignore: cast_nullable_to_non_nullable
as int?,hatchingKilledQuantity: freezed == hatchingKilledQuantity ? _self.hatchingKilledQuantity : hatchingKilledQuantity // ignore: cast_nullable_to_non_nullable
as int?,hatchingMaxAge: freezed == hatchingMaxAge ? _self.hatchingMaxAge : hatchingMaxAge // ignore: cast_nullable_to_non_nullable
as int?,hatchingMinAge: freezed == hatchingMinAge ? _self.hatchingMinAge : hatchingMinAge // ignore: cast_nullable_to_non_nullable
as int?,
));
}
}
/// Adds pattern-matching-related methods to [HomePoultryScienceModel].
extension HomePoultryScienceModelPatterns on HomePoultryScienceModel {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _HomePoultryScienceModel value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _HomePoultryScienceModel() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _HomePoultryScienceModel value) $default,){
final _that = this;
switch (_that) {
case _HomePoultryScienceModel():
return $default(_that);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _HomePoultryScienceModel value)? $default,){
final _that = this;
switch (_that) {
case _HomePoultryScienceModel() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( int? farmCount, int? hatchingCount, int? hatchingQuantity, int? hatchingLeftOver, int? hatchingLosses, int? hatchingKilledQuantity, int? hatchingMaxAge, int? hatchingMinAge)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _HomePoultryScienceModel() when $default != null:
return $default(_that.farmCount,_that.hatchingCount,_that.hatchingQuantity,_that.hatchingLeftOver,_that.hatchingLosses,_that.hatchingKilledQuantity,_that.hatchingMaxAge,_that.hatchingMinAge);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( int? farmCount, int? hatchingCount, int? hatchingQuantity, int? hatchingLeftOver, int? hatchingLosses, int? hatchingKilledQuantity, int? hatchingMaxAge, int? hatchingMinAge) $default,) {final _that = this;
switch (_that) {
case _HomePoultryScienceModel():
return $default(_that.farmCount,_that.hatchingCount,_that.hatchingQuantity,_that.hatchingLeftOver,_that.hatchingLosses,_that.hatchingKilledQuantity,_that.hatchingMaxAge,_that.hatchingMinAge);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( int? farmCount, int? hatchingCount, int? hatchingQuantity, int? hatchingLeftOver, int? hatchingLosses, int? hatchingKilledQuantity, int? hatchingMaxAge, int? hatchingMinAge)? $default,) {final _that = this;
switch (_that) {
case _HomePoultryScienceModel() when $default != null:
return $default(_that.farmCount,_that.hatchingCount,_that.hatchingQuantity,_that.hatchingLeftOver,_that.hatchingLosses,_that.hatchingKilledQuantity,_that.hatchingMaxAge,_that.hatchingMinAge);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _HomePoultryScienceModel implements HomePoultryScienceModel {
const _HomePoultryScienceModel({this.farmCount, this.hatchingCount, this.hatchingQuantity, this.hatchingLeftOver, this.hatchingLosses, this.hatchingKilledQuantity, this.hatchingMaxAge, this.hatchingMinAge});
factory _HomePoultryScienceModel.fromJson(Map<String, dynamic> json) => _$HomePoultryScienceModelFromJson(json);
@override final int? farmCount;
@override final int? hatchingCount;
@override final int? hatchingQuantity;
@override final int? hatchingLeftOver;
@override final int? hatchingLosses;
@override final int? hatchingKilledQuantity;
@override final int? hatchingMaxAge;
@override final int? hatchingMinAge;
/// Create a copy of HomePoultryScienceModel
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$HomePoultryScienceModelCopyWith<_HomePoultryScienceModel> get copyWith => __$HomePoultryScienceModelCopyWithImpl<_HomePoultryScienceModel>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$HomePoultryScienceModelToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _HomePoultryScienceModel&&(identical(other.farmCount, farmCount) || other.farmCount == farmCount)&&(identical(other.hatchingCount, hatchingCount) || other.hatchingCount == hatchingCount)&&(identical(other.hatchingQuantity, hatchingQuantity) || other.hatchingQuantity == hatchingQuantity)&&(identical(other.hatchingLeftOver, hatchingLeftOver) || other.hatchingLeftOver == hatchingLeftOver)&&(identical(other.hatchingLosses, hatchingLosses) || other.hatchingLosses == hatchingLosses)&&(identical(other.hatchingKilledQuantity, hatchingKilledQuantity) || other.hatchingKilledQuantity == hatchingKilledQuantity)&&(identical(other.hatchingMaxAge, hatchingMaxAge) || other.hatchingMaxAge == hatchingMaxAge)&&(identical(other.hatchingMinAge, hatchingMinAge) || other.hatchingMinAge == hatchingMinAge));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,farmCount,hatchingCount,hatchingQuantity,hatchingLeftOver,hatchingLosses,hatchingKilledQuantity,hatchingMaxAge,hatchingMinAge);
@override
String toString() {
return 'HomePoultryScienceModel(farmCount: $farmCount, hatchingCount: $hatchingCount, hatchingQuantity: $hatchingQuantity, hatchingLeftOver: $hatchingLeftOver, hatchingLosses: $hatchingLosses, hatchingKilledQuantity: $hatchingKilledQuantity, hatchingMaxAge: $hatchingMaxAge, hatchingMinAge: $hatchingMinAge)';
}
}
/// @nodoc
abstract mixin class _$HomePoultryScienceModelCopyWith<$Res> implements $HomePoultryScienceModelCopyWith<$Res> {
factory _$HomePoultryScienceModelCopyWith(_HomePoultryScienceModel value, $Res Function(_HomePoultryScienceModel) _then) = __$HomePoultryScienceModelCopyWithImpl;
@override @useResult
$Res call({
int? farmCount, int? hatchingCount, int? hatchingQuantity, int? hatchingLeftOver, int? hatchingLosses, int? hatchingKilledQuantity, int? hatchingMaxAge, int? hatchingMinAge
});
}
/// @nodoc
class __$HomePoultryScienceModelCopyWithImpl<$Res>
implements _$HomePoultryScienceModelCopyWith<$Res> {
__$HomePoultryScienceModelCopyWithImpl(this._self, this._then);
final _HomePoultryScienceModel _self;
final $Res Function(_HomePoultryScienceModel) _then;
/// Create a copy of HomePoultryScienceModel
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? farmCount = freezed,Object? hatchingCount = freezed,Object? hatchingQuantity = freezed,Object? hatchingLeftOver = freezed,Object? hatchingLosses = freezed,Object? hatchingKilledQuantity = freezed,Object? hatchingMaxAge = freezed,Object? hatchingMinAge = freezed,}) {
return _then(_HomePoultryScienceModel(
farmCount: freezed == farmCount ? _self.farmCount : farmCount // ignore: cast_nullable_to_non_nullable
as int?,hatchingCount: freezed == hatchingCount ? _self.hatchingCount : hatchingCount // ignore: cast_nullable_to_non_nullable
as int?,hatchingQuantity: freezed == hatchingQuantity ? _self.hatchingQuantity : hatchingQuantity // ignore: cast_nullable_to_non_nullable
as int?,hatchingLeftOver: freezed == hatchingLeftOver ? _self.hatchingLeftOver : hatchingLeftOver // ignore: cast_nullable_to_non_nullable
as int?,hatchingLosses: freezed == hatchingLosses ? _self.hatchingLosses : hatchingLosses // ignore: cast_nullable_to_non_nullable
as int?,hatchingKilledQuantity: freezed == hatchingKilledQuantity ? _self.hatchingKilledQuantity : hatchingKilledQuantity // ignore: cast_nullable_to_non_nullable
as int?,hatchingMaxAge: freezed == hatchingMaxAge ? _self.hatchingMaxAge : hatchingMaxAge // ignore: cast_nullable_to_non_nullable
as int?,hatchingMinAge: freezed == hatchingMinAge ? _self.hatchingMinAge : hatchingMinAge // ignore: cast_nullable_to_non_nullable
as int?,
));
}
}
// dart format on

View File

@@ -0,0 +1,33 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'home_poultry_science_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_HomePoultryScienceModel _$HomePoultryScienceModelFromJson(
Map<String, dynamic> json,
) => _HomePoultryScienceModel(
farmCount: (json['farm_count'] as num?)?.toInt(),
hatchingCount: (json['hatching_count'] as num?)?.toInt(),
hatchingQuantity: (json['hatching_quantity'] as num?)?.toInt(),
hatchingLeftOver: (json['hatching_left_over'] as num?)?.toInt(),
hatchingLosses: (json['hatching_losses'] as num?)?.toInt(),
hatchingKilledQuantity: (json['hatching_killed_quantity'] as num?)?.toInt(),
hatchingMaxAge: (json['hatching_max_age'] as num?)?.toInt(),
hatchingMinAge: (json['hatching_min_age'] as num?)?.toInt(),
);
Map<String, dynamic> _$HomePoultryScienceModelToJson(
_HomePoultryScienceModel instance,
) => <String, dynamic>{
'farm_count': instance.farmCount,
'hatching_count': instance.hatchingCount,
'hatching_quantity': instance.hatchingQuantity,
'hatching_left_over': instance.hatchingLeftOver,
'hatching_losses': instance.hatchingLosses,
'hatching_killed_quantity': instance.hatchingKilledQuantity,
'hatching_max_age': instance.hatchingMaxAge,
'hatching_min_age': instance.hatchingMinAge,
};

View File

@@ -0,0 +1,20 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'kill_house_poultry.freezed.dart';
part 'kill_house_poultry.g.dart';
@freezed
abstract class KillHousePoultry with _$KillHousePoultry {
const factory KillHousePoultry({
String? name,
bool? killer,
String? fullname,
int? quantitySum,
int? firstQuantity,
int? poultryQuantitySum,
String? killReqKey,
}) = _KillHousePoultry;
factory KillHousePoultry.fromJson(Map<String, dynamic> json) =>
_$KillHousePoultryFromJson(json);
}

View File

@@ -0,0 +1,295 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'kill_house_poultry.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$KillHousePoultry {
String? get name; bool? get killer; String? get fullname; int? get quantitySum; int? get firstQuantity; int? get poultryQuantitySum; String? get killReqKey;
/// Create a copy of KillHousePoultry
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$KillHousePoultryCopyWith<KillHousePoultry> get copyWith => _$KillHousePoultryCopyWithImpl<KillHousePoultry>(this as KillHousePoultry, _$identity);
/// Serializes this KillHousePoultry to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is KillHousePoultry&&(identical(other.name, name) || other.name == name)&&(identical(other.killer, killer) || other.killer == killer)&&(identical(other.fullname, fullname) || other.fullname == fullname)&&(identical(other.quantitySum, quantitySum) || other.quantitySum == quantitySum)&&(identical(other.firstQuantity, firstQuantity) || other.firstQuantity == firstQuantity)&&(identical(other.poultryQuantitySum, poultryQuantitySum) || other.poultryQuantitySum == poultryQuantitySum)&&(identical(other.killReqKey, killReqKey) || other.killReqKey == killReqKey));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,name,killer,fullname,quantitySum,firstQuantity,poultryQuantitySum,killReqKey);
@override
String toString() {
return 'KillHousePoultry(name: $name, killer: $killer, fullname: $fullname, quantitySum: $quantitySum, firstQuantity: $firstQuantity, poultryQuantitySum: $poultryQuantitySum, killReqKey: $killReqKey)';
}
}
/// @nodoc
abstract mixin class $KillHousePoultryCopyWith<$Res> {
factory $KillHousePoultryCopyWith(KillHousePoultry value, $Res Function(KillHousePoultry) _then) = _$KillHousePoultryCopyWithImpl;
@useResult
$Res call({
String? name, bool? killer, String? fullname, int? quantitySum, int? firstQuantity, int? poultryQuantitySum, String? killReqKey
});
}
/// @nodoc
class _$KillHousePoultryCopyWithImpl<$Res>
implements $KillHousePoultryCopyWith<$Res> {
_$KillHousePoultryCopyWithImpl(this._self, this._then);
final KillHousePoultry _self;
final $Res Function(KillHousePoultry) _then;
/// Create a copy of KillHousePoultry
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? name = freezed,Object? killer = freezed,Object? fullname = freezed,Object? quantitySum = freezed,Object? firstQuantity = freezed,Object? poultryQuantitySum = freezed,Object? killReqKey = freezed,}) {
return _then(_self.copyWith(
name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
as String?,killer: freezed == killer ? _self.killer : killer // ignore: cast_nullable_to_non_nullable
as bool?,fullname: freezed == fullname ? _self.fullname : fullname // ignore: cast_nullable_to_non_nullable
as String?,quantitySum: freezed == quantitySum ? _self.quantitySum : quantitySum // ignore: cast_nullable_to_non_nullable
as int?,firstQuantity: freezed == firstQuantity ? _self.firstQuantity : firstQuantity // ignore: cast_nullable_to_non_nullable
as int?,poultryQuantitySum: freezed == poultryQuantitySum ? _self.poultryQuantitySum : poultryQuantitySum // ignore: cast_nullable_to_non_nullable
as int?,killReqKey: freezed == killReqKey ? _self.killReqKey : killReqKey // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// Adds pattern-matching-related methods to [KillHousePoultry].
extension KillHousePoultryPatterns on KillHousePoultry {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _KillHousePoultry value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _KillHousePoultry() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _KillHousePoultry value) $default,){
final _that = this;
switch (_that) {
case _KillHousePoultry():
return $default(_that);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _KillHousePoultry value)? $default,){
final _that = this;
switch (_that) {
case _KillHousePoultry() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String? name, bool? killer, String? fullname, int? quantitySum, int? firstQuantity, int? poultryQuantitySum, String? killReqKey)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _KillHousePoultry() when $default != null:
return $default(_that.name,_that.killer,_that.fullname,_that.quantitySum,_that.firstQuantity,_that.poultryQuantitySum,_that.killReqKey);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String? name, bool? killer, String? fullname, int? quantitySum, int? firstQuantity, int? poultryQuantitySum, String? killReqKey) $default,) {final _that = this;
switch (_that) {
case _KillHousePoultry():
return $default(_that.name,_that.killer,_that.fullname,_that.quantitySum,_that.firstQuantity,_that.poultryQuantitySum,_that.killReqKey);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String? name, bool? killer, String? fullname, int? quantitySum, int? firstQuantity, int? poultryQuantitySum, String? killReqKey)? $default,) {final _that = this;
switch (_that) {
case _KillHousePoultry() when $default != null:
return $default(_that.name,_that.killer,_that.fullname,_that.quantitySum,_that.firstQuantity,_that.poultryQuantitySum,_that.killReqKey);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _KillHousePoultry implements KillHousePoultry {
const _KillHousePoultry({this.name, this.killer, this.fullname, this.quantitySum, this.firstQuantity, this.poultryQuantitySum, this.killReqKey});
factory _KillHousePoultry.fromJson(Map<String, dynamic> json) => _$KillHousePoultryFromJson(json);
@override final String? name;
@override final bool? killer;
@override final String? fullname;
@override final int? quantitySum;
@override final int? firstQuantity;
@override final int? poultryQuantitySum;
@override final String? killReqKey;
/// Create a copy of KillHousePoultry
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$KillHousePoultryCopyWith<_KillHousePoultry> get copyWith => __$KillHousePoultryCopyWithImpl<_KillHousePoultry>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$KillHousePoultryToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _KillHousePoultry&&(identical(other.name, name) || other.name == name)&&(identical(other.killer, killer) || other.killer == killer)&&(identical(other.fullname, fullname) || other.fullname == fullname)&&(identical(other.quantitySum, quantitySum) || other.quantitySum == quantitySum)&&(identical(other.firstQuantity, firstQuantity) || other.firstQuantity == firstQuantity)&&(identical(other.poultryQuantitySum, poultryQuantitySum) || other.poultryQuantitySum == poultryQuantitySum)&&(identical(other.killReqKey, killReqKey) || other.killReqKey == killReqKey));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,name,killer,fullname,quantitySum,firstQuantity,poultryQuantitySum,killReqKey);
@override
String toString() {
return 'KillHousePoultry(name: $name, killer: $killer, fullname: $fullname, quantitySum: $quantitySum, firstQuantity: $firstQuantity, poultryQuantitySum: $poultryQuantitySum, killReqKey: $killReqKey)';
}
}
/// @nodoc
abstract mixin class _$KillHousePoultryCopyWith<$Res> implements $KillHousePoultryCopyWith<$Res> {
factory _$KillHousePoultryCopyWith(_KillHousePoultry value, $Res Function(_KillHousePoultry) _then) = __$KillHousePoultryCopyWithImpl;
@override @useResult
$Res call({
String? name, bool? killer, String? fullname, int? quantitySum, int? firstQuantity, int? poultryQuantitySum, String? killReqKey
});
}
/// @nodoc
class __$KillHousePoultryCopyWithImpl<$Res>
implements _$KillHousePoultryCopyWith<$Res> {
__$KillHousePoultryCopyWithImpl(this._self, this._then);
final _KillHousePoultry _self;
final $Res Function(_KillHousePoultry) _then;
/// Create a copy of KillHousePoultry
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? name = freezed,Object? killer = freezed,Object? fullname = freezed,Object? quantitySum = freezed,Object? firstQuantity = freezed,Object? poultryQuantitySum = freezed,Object? killReqKey = freezed,}) {
return _then(_KillHousePoultry(
name: freezed == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
as String?,killer: freezed == killer ? _self.killer : killer // ignore: cast_nullable_to_non_nullable
as bool?,fullname: freezed == fullname ? _self.fullname : fullname // ignore: cast_nullable_to_non_nullable
as String?,quantitySum: freezed == quantitySum ? _self.quantitySum : quantitySum // ignore: cast_nullable_to_non_nullable
as int?,firstQuantity: freezed == firstQuantity ? _self.firstQuantity : firstQuantity // ignore: cast_nullable_to_non_nullable
as int?,poultryQuantitySum: freezed == poultryQuantitySum ? _self.poultryQuantitySum : poultryQuantitySum // ignore: cast_nullable_to_non_nullable
as int?,killReqKey: freezed == killReqKey ? _self.killReqKey : killReqKey // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
// dart format on

View File

@@ -0,0 +1,29 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'kill_house_poultry.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_KillHousePoultry _$KillHousePoultryFromJson(Map<String, dynamic> json) =>
_KillHousePoultry(
name: json['name'] as String?,
killer: json['killer'] as bool?,
fullname: json['fullname'] as String?,
quantitySum: (json['quantity_sum'] as num?)?.toInt(),
firstQuantity: (json['first_quantity'] as num?)?.toInt(),
poultryQuantitySum: (json['poultry_quantity_sum'] as num?)?.toInt(),
killReqKey: json['kill_req_key'] as String?,
);
Map<String, dynamic> _$KillHousePoultryToJson(_KillHousePoultry instance) =>
<String, dynamic>{
'name': instance.name,
'killer': instance.killer,
'fullname': instance.fullname,
'quantity_sum': instance.quantitySum,
'first_quantity': instance.firstQuantity,
'poultry_quantity_sum': instance.poultryQuantitySum,
'kill_req_key': instance.killReqKey,
};

View File

@@ -0,0 +1,257 @@
import 'package:freezed_annotation/freezed_annotation.dart';
part 'kill_request_poultry.freezed.dart';
part 'kill_request_poultry.g.dart';
@freezed
abstract class KillRequestPoultry with _$KillRequestPoultry{
const factory KillRequestPoultry({
UserProfile? userprofile,
Address? address,
PoultryOwner? poultryOwner,
PoultryTenant? poultryTenant,
List<Hatching>? hatching,
List<int>? registerVetHalls,
Allow? allow,
ProvinceAllowChooseKillHouse? provinceAllowChooseKillHouse,
bool? provinceAllowSellFree,
VetFarm? vetFarm,
LastHatchingDifferentRequestQuantity? lastHatchingDiffrentRequestQuantity,
UserBankInfo? userBankInfo,
int? leftOverOwnHatching,
String? key,
bool? trash,
int? ownerIdForeignKey,
int? userIdForeignKey,
int? addressIdForeignKey,
bool? hasChainCompany,
int? userBankIdForeignKey,
String? cityOperator,
String? unitName,
String? gisCode,
int? operatingLicenceCapacity,
int? numberOfHalls,
bool? tenant,
bool? hasTenant,
String? personType,
String? economicCode,
String? systemCode,
String? epidemiologicalCode,
String? breedingUniqueId,
int? totalCapacity,
String? licenceNumber,
String? healthCertificateNumber,
int? numberOfRequests,
String? hatchingDate,
String? lastPartyDate,
int? numberOfIncubators,
int? herdAgeByDay,
int? herdAgeByWeek,
int? numberOfParty,
String? communicationType,
String? cooperative,
String? dateOfRegister,
String? unitStatus,
bool? active,
String? identityDocuments,
String? samasatUserCode,
int? baseOrder,
String? incubationDate,
int? walletAmount,
int? city,
int? cityNumber,
String? cityName,
int? provinceNumber,
String? provinceName,
int? walletIdForeignKey,
int? poultryIdKey,
double? lat,
double? long,
String? date,
int? killingAveAge,
int? activeLeftOver,
int? killingAveCount,
double? killingAveWeight,
double? killingLiveWeight,
double? killingCarcassesWeight,
double? killingLossWeightPercent,
double? realKillingAveWeight,
double? realKillingLiveWeight,
double? realKillingCarcassesWeight,
double? realKillingLossWeightPercent,
int? interestLicenseId,
bool? orderLimit,
int? owner,
int? wallet,
}) = _KillRequestPoultry;
factory KillRequestPoultry.fromJson(Map<String, dynamic> json) =>
_$KillRequestPoultryFromJson(json);
}
@freezed
abstract class UserProfile with _$UserProfile {
const factory UserProfile({
String? userKey,
int? baseOrder,
String? fullName,
String? mobile,
String? city,
String? province,
String? breedingUniqueId,
}) = _UserProfile;
factory UserProfile.fromJson(Map<String, dynamic> json) =>
_$UserProfileFromJson(json);
}
@freezed
abstract class Address with _$Address {
const factory Address({
Province? province,
City? city,
String? address,
String? postalCode,
}) = _Address;
factory Address.fromJson(Map<String, dynamic> json) =>
_$AddressFromJson(json);
}
@freezed
abstract class Province with _$Province {
const factory Province({
String? key,
String? name,
}) = _Province;
factory Province.fromJson(Map<String, dynamic> json) =>
_$ProvinceFromJson(json);
}
@freezed
abstract class City with _$City {
const factory City({
String? key,
String? name,
}) = _City;
factory City.fromJson(Map<String, dynamic> json) => _$CityFromJson(json);
}
@freezed
abstract class PoultryOwner with _$PoultryOwner {
const factory PoultryOwner({
String? fullName,
String? mobile,
String? unitName,
int? numberOfHalls,
String? breedingUniqueId,
}) = _PoultryOwner;
factory PoultryOwner.fromJson(Map<String, dynamic> json) =>
_$PoultryOwnerFromJson(json);
}
@freezed
abstract class PoultryTenant with _$PoultryTenant {
const factory PoultryTenant({
String? key,
String? firstName,
String? lastName,
String? fullName,
String? mobile,
String? nationalId,
String? breedingUniqueId,
}) = _PoultryTenant;
factory PoultryTenant.fromJson(Map<String, dynamic> json) =>
_$PoultryTenantFromJson(json);
}
@freezed
abstract class Hatching with _$Hatching {
const factory Hatching({
String? poultryKey,
String? poultryHatchingKey,
String? poultry,
int? quantity,
int? losses,
int? leftOver,
double? outProvinceKilledQuantity,
double? exportKilledQuantity,
int? hall,
String? date,
int? period,
String? state,
int? age,
}) = _Hatching;
factory Hatching.fromJson(Map<String, dynamic> json) =>
_$HatchingFromJson(json);
}
@freezed
abstract class Allow with _$Allow {
const factory Allow({
bool? city,
bool? province,
}) = _Allow;
factory Allow.fromJson(Map<String, dynamic> json) => _$AllowFromJson(json);
}
@freezed
abstract class ProvinceAllowChooseKillHouse with _$ProvinceAllowChooseKillHouse {
const factory ProvinceAllowChooseKillHouse({
bool? allowState,
bool? mandatory,
}) = _ProvinceAllowChooseKillHouse;
factory ProvinceAllowChooseKillHouse.fromJson(Map<String, dynamic> json) =>
_$ProvinceAllowChooseKillHouseFromJson(json);
}
@freezed
abstract class VetFarm with _$VetFarm {
const factory VetFarm({
String? fullName,
String? mobile,
String? city,
String? province,
}) = _VetFarm;
factory VetFarm.fromJson(Map<String, dynamic> json) =>
_$VetFarmFromJson(json);
}
@freezed
abstract class LastHatchingDifferentRequestQuantity
with _$LastHatchingDifferentRequestQuantity {
const factory LastHatchingDifferentRequestQuantity({
double? leftExportQuantity,
double? leftPoultryOutProvince,
int? lastHatchingRemainQuantity,
}) = _LastHatchingDifferentRequestQuantity;
factory LastHatchingDifferentRequestQuantity.fromJson(
Map<String, dynamic> json) =>
_$LastHatchingDifferentRequestQuantityFromJson(json);
}
@freezed
abstract class UserBankInfo with _$UserBankInfo {
const factory UserBankInfo({
String? key,
String? nameOfBankUser,
String? bankName,
String? card,
String? shaba,
String? account,
int? userBankIdKey,
String? provinceName,
}) = _UserBankInfo;
factory UserBankInfo.fromJson(Map<String, dynamic> json) =>
_$UserBankInfoFromJson(json);
}

Some files were not shown because too many files have changed in this diff Show More