refactor : rename files and update routes for poultry actions

feat : poultry kill registration and poultry OrderList

** Made With Nima **
This commit is contained in:
2025-09-16 15:47:35 +03:30
parent 87a0955697
commit e933d22f8f
81 changed files with 22780 additions and 192 deletions

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,
};