add items order

This commit is contained in:
efrilm
2025-10-28 20:55:10 +07:00
parent 0693411cf7
commit adc90a90a0
27 changed files with 2377 additions and 70 deletions
+238
View File
@@ -2886,6 +2886,244 @@ abstract class _Payment implements Payment {
throw _privateConstructorUsedError;
}
/// @nodoc
mixin _$AddItemOrderRequest {
String get productId => throw _privateConstructorUsedError;
String get productVariantId => throw _privateConstructorUsedError;
int get quantity => throw _privateConstructorUsedError;
int get unitPrice => throw _privateConstructorUsedError;
String get notes => throw _privateConstructorUsedError;
/// Create a copy of AddItemOrderRequest
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$AddItemOrderRequestCopyWith<AddItemOrderRequest> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $AddItemOrderRequestCopyWith<$Res> {
factory $AddItemOrderRequestCopyWith(
AddItemOrderRequest value,
$Res Function(AddItemOrderRequest) then,
) = _$AddItemOrderRequestCopyWithImpl<$Res, AddItemOrderRequest>;
@useResult
$Res call({
String productId,
String productVariantId,
int quantity,
int unitPrice,
String notes,
});
}
/// @nodoc
class _$AddItemOrderRequestCopyWithImpl<$Res, $Val extends AddItemOrderRequest>
implements $AddItemOrderRequestCopyWith<$Res> {
_$AddItemOrderRequestCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of AddItemOrderRequest
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? productId = null,
Object? productVariantId = null,
Object? quantity = null,
Object? unitPrice = null,
Object? notes = null,
}) {
return _then(
_value.copyWith(
productId: null == productId
? _value.productId
: productId // ignore: cast_nullable_to_non_nullable
as String,
productVariantId: null == productVariantId
? _value.productVariantId
: productVariantId // ignore: cast_nullable_to_non_nullable
as String,
quantity: null == quantity
? _value.quantity
: quantity // ignore: cast_nullable_to_non_nullable
as int,
unitPrice: null == unitPrice
? _value.unitPrice
: unitPrice // ignore: cast_nullable_to_non_nullable
as int,
notes: null == notes
? _value.notes
: notes // ignore: cast_nullable_to_non_nullable
as String,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$AddItemOrderRequestImplCopyWith<$Res>
implements $AddItemOrderRequestCopyWith<$Res> {
factory _$$AddItemOrderRequestImplCopyWith(
_$AddItemOrderRequestImpl value,
$Res Function(_$AddItemOrderRequestImpl) then,
) = __$$AddItemOrderRequestImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
String productId,
String productVariantId,
int quantity,
int unitPrice,
String notes,
});
}
/// @nodoc
class __$$AddItemOrderRequestImplCopyWithImpl<$Res>
extends _$AddItemOrderRequestCopyWithImpl<$Res, _$AddItemOrderRequestImpl>
implements _$$AddItemOrderRequestImplCopyWith<$Res> {
__$$AddItemOrderRequestImplCopyWithImpl(
_$AddItemOrderRequestImpl _value,
$Res Function(_$AddItemOrderRequestImpl) _then,
) : super(_value, _then);
/// Create a copy of AddItemOrderRequest
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? productId = null,
Object? productVariantId = null,
Object? quantity = null,
Object? unitPrice = null,
Object? notes = null,
}) {
return _then(
_$AddItemOrderRequestImpl(
productId: null == productId
? _value.productId
: productId // ignore: cast_nullable_to_non_nullable
as String,
productVariantId: null == productVariantId
? _value.productVariantId
: productVariantId // ignore: cast_nullable_to_non_nullable
as String,
quantity: null == quantity
? _value.quantity
: quantity // ignore: cast_nullable_to_non_nullable
as int,
unitPrice: null == unitPrice
? _value.unitPrice
: unitPrice // ignore: cast_nullable_to_non_nullable
as int,
notes: null == notes
? _value.notes
: notes // ignore: cast_nullable_to_non_nullable
as String,
),
);
}
}
/// @nodoc
class _$AddItemOrderRequestImpl implements _AddItemOrderRequest {
const _$AddItemOrderRequestImpl({
required this.productId,
required this.productVariantId,
required this.quantity,
required this.unitPrice,
required this.notes,
});
@override
final String productId;
@override
final String productVariantId;
@override
final int quantity;
@override
final int unitPrice;
@override
final String notes;
@override
String toString() {
return 'AddItemOrderRequest(productId: $productId, productVariantId: $productVariantId, quantity: $quantity, unitPrice: $unitPrice, notes: $notes)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$AddItemOrderRequestImpl &&
(identical(other.productId, productId) ||
other.productId == productId) &&
(identical(other.productVariantId, productVariantId) ||
other.productVariantId == productVariantId) &&
(identical(other.quantity, quantity) ||
other.quantity == quantity) &&
(identical(other.unitPrice, unitPrice) ||
other.unitPrice == unitPrice) &&
(identical(other.notes, notes) || other.notes == notes));
}
@override
int get hashCode => Object.hash(
runtimeType,
productId,
productVariantId,
quantity,
unitPrice,
notes,
);
/// Create a copy of AddItemOrderRequest
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$AddItemOrderRequestImplCopyWith<_$AddItemOrderRequestImpl> get copyWith =>
__$$AddItemOrderRequestImplCopyWithImpl<_$AddItemOrderRequestImpl>(
this,
_$identity,
);
}
abstract class _AddItemOrderRequest implements AddItemOrderRequest {
const factory _AddItemOrderRequest({
required final String productId,
required final String productVariantId,
required final int quantity,
required final int unitPrice,
required final String notes,
}) = _$AddItemOrderRequestImpl;
@override
String get productId;
@override
String get productVariantId;
@override
int get quantity;
@override
int get unitPrice;
@override
String get notes;
/// Create a copy of AddItemOrderRequest
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$AddItemOrderRequestImplCopyWith<_$AddItemOrderRequestImpl> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
mixin _$OrderFailure {
@optionalTypeArgs