feat : sale out of Province

This commit is contained in:
2025-06-21 17:02:24 +03:30
parent 656b5f0d87
commit 4b7ff135d4
6 changed files with 563 additions and 0 deletions

View File

@@ -0,0 +1,169 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'create_steward_free_bar.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$CreateStewardFreeBar {
String? get productKey; String? get killHouseName; String? get killHouseMobile; String? get province; String? get city; int? get weightOfCarcasses; String? get date; String? get barImage;
/// Create a copy of CreateStewardFreeBar
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$CreateStewardFreeBarCopyWith<CreateStewardFreeBar> get copyWith => _$CreateStewardFreeBarCopyWithImpl<CreateStewardFreeBar>(this as CreateStewardFreeBar, _$identity);
/// Serializes this CreateStewardFreeBar to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is CreateStewardFreeBar&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.killHouseName, killHouseName) || other.killHouseName == killHouseName)&&(identical(other.killHouseMobile, killHouseMobile) || other.killHouseMobile == killHouseMobile)&&(identical(other.province, province) || other.province == province)&&(identical(other.city, city) || other.city == city)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.date, date) || other.date == date)&&(identical(other.barImage, barImage) || other.barImage == barImage));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,productKey,killHouseName,killHouseMobile,province,city,weightOfCarcasses,date,barImage);
@override
String toString() {
return 'CreateStewardFreeBar(productKey: $productKey, killHouseName: $killHouseName, killHouseMobile: $killHouseMobile, province: $province, city: $city, weightOfCarcasses: $weightOfCarcasses, date: $date, barImage: $barImage)';
}
}
/// @nodoc
abstract mixin class $CreateStewardFreeBarCopyWith<$Res> {
factory $CreateStewardFreeBarCopyWith(CreateStewardFreeBar value, $Res Function(CreateStewardFreeBar) _then) = _$CreateStewardFreeBarCopyWithImpl;
@useResult
$Res call({
String? productKey, String? killHouseName, String? killHouseMobile, String? province, String? city, int? weightOfCarcasses, String? date, String? barImage
});
}
/// @nodoc
class _$CreateStewardFreeBarCopyWithImpl<$Res>
implements $CreateStewardFreeBarCopyWith<$Res> {
_$CreateStewardFreeBarCopyWithImpl(this._self, this._then);
final CreateStewardFreeBar _self;
final $Res Function(CreateStewardFreeBar) _then;
/// Create a copy of CreateStewardFreeBar
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? productKey = freezed,Object? killHouseName = freezed,Object? killHouseMobile = freezed,Object? province = freezed,Object? city = freezed,Object? weightOfCarcasses = freezed,Object? date = freezed,Object? barImage = freezed,}) {
return _then(_self.copyWith(
productKey: freezed == productKey ? _self.productKey : productKey // ignore: cast_nullable_to_non_nullable
as String?,killHouseName: freezed == killHouseName ? _self.killHouseName : killHouseName // ignore: cast_nullable_to_non_nullable
as String?,killHouseMobile: freezed == killHouseMobile ? _self.killHouseMobile : killHouseMobile // 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?,weightOfCarcasses: freezed == weightOfCarcasses ? _self.weightOfCarcasses : weightOfCarcasses // ignore: cast_nullable_to_non_nullable
as int?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
as String?,barImage: freezed == barImage ? _self.barImage : barImage // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// @nodoc
@JsonSerializable()
class _CreateStewardFreeBar implements CreateStewardFreeBar {
const _CreateStewardFreeBar({this.productKey, this.killHouseName, this.killHouseMobile, this.province, this.city, this.weightOfCarcasses, this.date, this.barImage});
factory _CreateStewardFreeBar.fromJson(Map<String, dynamic> json) => _$CreateStewardFreeBarFromJson(json);
@override final String? productKey;
@override final String? killHouseName;
@override final String? killHouseMobile;
@override final String? province;
@override final String? city;
@override final int? weightOfCarcasses;
@override final String? date;
@override final String? barImage;
/// Create a copy of CreateStewardFreeBar
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$CreateStewardFreeBarCopyWith<_CreateStewardFreeBar> get copyWith => __$CreateStewardFreeBarCopyWithImpl<_CreateStewardFreeBar>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$CreateStewardFreeBarToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _CreateStewardFreeBar&&(identical(other.productKey, productKey) || other.productKey == productKey)&&(identical(other.killHouseName, killHouseName) || other.killHouseName == killHouseName)&&(identical(other.killHouseMobile, killHouseMobile) || other.killHouseMobile == killHouseMobile)&&(identical(other.province, province) || other.province == province)&&(identical(other.city, city) || other.city == city)&&(identical(other.weightOfCarcasses, weightOfCarcasses) || other.weightOfCarcasses == weightOfCarcasses)&&(identical(other.date, date) || other.date == date)&&(identical(other.barImage, barImage) || other.barImage == barImage));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,productKey,killHouseName,killHouseMobile,province,city,weightOfCarcasses,date,barImage);
@override
String toString() {
return 'CreateStewardFreeBar(productKey: $productKey, killHouseName: $killHouseName, killHouseMobile: $killHouseMobile, province: $province, city: $city, weightOfCarcasses: $weightOfCarcasses, date: $date, barImage: $barImage)';
}
}
/// @nodoc
abstract mixin class _$CreateStewardFreeBarCopyWith<$Res> implements $CreateStewardFreeBarCopyWith<$Res> {
factory _$CreateStewardFreeBarCopyWith(_CreateStewardFreeBar value, $Res Function(_CreateStewardFreeBar) _then) = __$CreateStewardFreeBarCopyWithImpl;
@override @useResult
$Res call({
String? productKey, String? killHouseName, String? killHouseMobile, String? province, String? city, int? weightOfCarcasses, String? date, String? barImage
});
}
/// @nodoc
class __$CreateStewardFreeBarCopyWithImpl<$Res>
implements _$CreateStewardFreeBarCopyWith<$Res> {
__$CreateStewardFreeBarCopyWithImpl(this._self, this._then);
final _CreateStewardFreeBar _self;
final $Res Function(_CreateStewardFreeBar) _then;
/// Create a copy of CreateStewardFreeBar
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? productKey = freezed,Object? killHouseName = freezed,Object? killHouseMobile = freezed,Object? province = freezed,Object? city = freezed,Object? weightOfCarcasses = freezed,Object? date = freezed,Object? barImage = freezed,}) {
return _then(_CreateStewardFreeBar(
productKey: freezed == productKey ? _self.productKey : productKey // ignore: cast_nullable_to_non_nullable
as String?,killHouseName: freezed == killHouseName ? _self.killHouseName : killHouseName // ignore: cast_nullable_to_non_nullable
as String?,killHouseMobile: freezed == killHouseMobile ? _self.killHouseMobile : killHouseMobile // 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?,weightOfCarcasses: freezed == weightOfCarcasses ? _self.weightOfCarcasses : weightOfCarcasses // ignore: cast_nullable_to_non_nullable
as int?,date: freezed == date ? _self.date : date // ignore: cast_nullable_to_non_nullable
as String?,barImage: freezed == barImage ? _self.barImage : barImage // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
// dart format on

View File

@@ -0,0 +1,33 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'create_steward_free_bar.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_CreateStewardFreeBar _$CreateStewardFreeBarFromJson(
Map<String, dynamic> json,
) => _CreateStewardFreeBar(
productKey: json['product_key'] as String?,
killHouseName: json['kill_house_name'] as String?,
killHouseMobile: json['kill_house_mobile'] as String?,
province: json['province'] as String?,
city: json['city'] as String?,
weightOfCarcasses: (json['weight_of_carcasses'] as num?)?.toInt(),
date: json['date'] as String?,
barImage: json['bar_image'] as String?,
);
Map<String, dynamic> _$CreateStewardFreeBarToJson(
_CreateStewardFreeBar instance,
) => <String, dynamic>{
'product_key': instance.productKey,
'kill_house_name': instance.killHouseName,
'kill_house_mobile': instance.killHouseMobile,
'province': instance.province,
'city': instance.city,
'weight_of_carcasses': instance.weightOfCarcasses,
'date': instance.date,
'bar_image': instance.barImage,
};

View File

@@ -0,0 +1,151 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of '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?,
));
}
}
/// @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,165 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'pagination_model.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$PaginationModel<T> {
int? get count; String? get next; String? get previous; List<T>? get results;
/// Create a copy of PaginationModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$PaginationModelCopyWith<T, PaginationModel<T>> get copyWith => _$PaginationModelCopyWithImpl<T, PaginationModel<T>>(this as PaginationModel<T>, _$identity);
/// Serializes this PaginationModel to a JSON map.
Map<String, dynamic> toJson(Object? Function(T) toJsonT);
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is PaginationModel<T>&&(identical(other.count, count) || other.count == count)&&(identical(other.next, next) || other.next == next)&&(identical(other.previous, previous) || other.previous == previous)&&const DeepCollectionEquality().equals(other.results, results));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,count,next,previous,const DeepCollectionEquality().hash(results));
@override
String toString() {
return 'PaginationModel<$T>(count: $count, next: $next, previous: $previous, results: $results)';
}
}
/// @nodoc
abstract mixin class $PaginationModelCopyWith<T,$Res> {
factory $PaginationModelCopyWith(PaginationModel<T> value, $Res Function(PaginationModel<T>) _then) = _$PaginationModelCopyWithImpl;
@useResult
$Res call({
int? count, String? next, String? previous, List<T>? results
});
}
/// @nodoc
class _$PaginationModelCopyWithImpl<T,$Res>
implements $PaginationModelCopyWith<T, $Res> {
_$PaginationModelCopyWithImpl(this._self, this._then);
final PaginationModel<T> _self;
final $Res Function(PaginationModel<T>) _then;
/// Create a copy of PaginationModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? count = freezed,Object? next = freezed,Object? previous = freezed,Object? results = freezed,}) {
return _then(_self.copyWith(
count: freezed == count ? _self.count : count // ignore: cast_nullable_to_non_nullable
as int?,next: freezed == next ? _self.next : next // ignore: cast_nullable_to_non_nullable
as String?,previous: freezed == previous ? _self.previous : previous // ignore: cast_nullable_to_non_nullable
as String?,results: freezed == results ? _self.results : results // ignore: cast_nullable_to_non_nullable
as List<T>?,
));
}
}
/// @nodoc
@JsonSerializable(genericArgumentFactories: true)
class _PaginationModel<T> implements PaginationModel<T> {
const _PaginationModel({this.count, this.next, this.previous, final List<T>? results}): _results = results;
factory _PaginationModel.fromJson(Map<String, dynamic> json,T Function(Object?) fromJsonT) => _$PaginationModelFromJson(json,fromJsonT);
@override final int? count;
@override final String? next;
@override final String? previous;
final List<T>? _results;
@override List<T>? get results {
final value = _results;
if (value == null) return null;
if (_results is EqualUnmodifiableListView) return _results;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
/// Create a copy of PaginationModel
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$PaginationModelCopyWith<T, _PaginationModel<T>> get copyWith => __$PaginationModelCopyWithImpl<T, _PaginationModel<T>>(this, _$identity);
@override
Map<String, dynamic> toJson(Object? Function(T) toJsonT) {
return _$PaginationModelToJson<T>(this, toJsonT);
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _PaginationModel<T>&&(identical(other.count, count) || other.count == count)&&(identical(other.next, next) || other.next == next)&&(identical(other.previous, previous) || other.previous == previous)&&const DeepCollectionEquality().equals(other._results, _results));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,count,next,previous,const DeepCollectionEquality().hash(_results));
@override
String toString() {
return 'PaginationModel<$T>(count: $count, next: $next, previous: $previous, results: $results)';
}
}
/// @nodoc
abstract mixin class _$PaginationModelCopyWith<T,$Res> implements $PaginationModelCopyWith<T, $Res> {
factory _$PaginationModelCopyWith(_PaginationModel<T> value, $Res Function(_PaginationModel<T>) _then) = __$PaginationModelCopyWithImpl;
@override @useResult
$Res call({
int? count, String? next, String? previous, List<T>? results
});
}
/// @nodoc
class __$PaginationModelCopyWithImpl<T,$Res>
implements _$PaginationModelCopyWith<T, $Res> {
__$PaginationModelCopyWithImpl(this._self, this._then);
final _PaginationModel<T> _self;
final $Res Function(_PaginationModel<T>) _then;
/// Create a copy of PaginationModel
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? count = freezed,Object? next = freezed,Object? previous = freezed,Object? results = freezed,}) {
return _then(_PaginationModel<T>(
count: freezed == count ? _self.count : count // ignore: cast_nullable_to_non_nullable
as int?,next: freezed == next ? _self.next : next // ignore: cast_nullable_to_non_nullable
as String?,previous: freezed == previous ? _self.previous : previous // ignore: cast_nullable_to_non_nullable
as String?,results: freezed == results ? _self._results : results // ignore: cast_nullable_to_non_nullable
as List<T>?,
));
}
}
// dart format on

View File

@@ -0,0 +1,27 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'pagination_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_PaginationModel<T> _$PaginationModelFromJson<T>(
Map<String, dynamic> json,
T Function(Object? json) fromJsonT,
) => _PaginationModel<T>(
count: (json['count'] as num?)?.toInt(),
next: json['next'] as String?,
previous: json['previous'] as String?,
results: (json['results'] as List<dynamic>?)?.map(fromJsonT).toList(),
);
Map<String, dynamic> _$PaginationModelToJson<T>(
_PaginationModel<T> instance,
Object? Function(T value) toJsonT,
) => <String, dynamic>{
'count': instance.count,
'next': instance.next,
'previous': instance.previous,
'results': instance.results?.map(toJsonT).toList(),
};