create order
This commit is contained in:
@@ -2163,3 +2163,635 @@ abstract class _PaymentOrderDto extends PaymentOrderDto {
|
||||
_$$PaymentOrderDtoImplCopyWith<_$PaymentOrderDtoImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
OrderRequestDto _$OrderRequestDtoFromJson(Map<String, dynamic> json) {
|
||||
return _OrderRequestDto.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$OrderRequestDto {
|
||||
@JsonKey(name: "outlet_id")
|
||||
String? get outletId => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "customer_id")
|
||||
String? get customerId => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "table_number")
|
||||
String? get tableNumber => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "table_id")
|
||||
String? get tableId => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "order_type")
|
||||
String? get orderType => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "notes")
|
||||
String? get notes => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "order_items")
|
||||
List<OrderItemRequestDto>? get orderItems =>
|
||||
throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "customer_name")
|
||||
String? get customerName => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this OrderRequestDto to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of OrderRequestDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$OrderRequestDtoCopyWith<OrderRequestDto> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $OrderRequestDtoCopyWith<$Res> {
|
||||
factory $OrderRequestDtoCopyWith(
|
||||
OrderRequestDto value,
|
||||
$Res Function(OrderRequestDto) then,
|
||||
) = _$OrderRequestDtoCopyWithImpl<$Res, OrderRequestDto>;
|
||||
@useResult
|
||||
$Res call({
|
||||
@JsonKey(name: "outlet_id") String? outletId,
|
||||
@JsonKey(name: "customer_id") String? customerId,
|
||||
@JsonKey(name: "table_number") String? tableNumber,
|
||||
@JsonKey(name: "table_id") String? tableId,
|
||||
@JsonKey(name: "order_type") String? orderType,
|
||||
@JsonKey(name: "notes") String? notes,
|
||||
@JsonKey(name: "order_items") List<OrderItemRequestDto>? orderItems,
|
||||
@JsonKey(name: "customer_name") String? customerName,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$OrderRequestDtoCopyWithImpl<$Res, $Val extends OrderRequestDto>
|
||||
implements $OrderRequestDtoCopyWith<$Res> {
|
||||
_$OrderRequestDtoCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of OrderRequestDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? outletId = freezed,
|
||||
Object? customerId = freezed,
|
||||
Object? tableNumber = freezed,
|
||||
Object? tableId = freezed,
|
||||
Object? orderType = freezed,
|
||||
Object? notes = freezed,
|
||||
Object? orderItems = freezed,
|
||||
Object? customerName = freezed,
|
||||
}) {
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
outletId: freezed == outletId
|
||||
? _value.outletId
|
||||
: outletId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
customerId: freezed == customerId
|
||||
? _value.customerId
|
||||
: customerId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
tableNumber: freezed == tableNumber
|
||||
? _value.tableNumber
|
||||
: tableNumber // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
tableId: freezed == tableId
|
||||
? _value.tableId
|
||||
: tableId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
orderType: freezed == orderType
|
||||
? _value.orderType
|
||||
: orderType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
notes: freezed == notes
|
||||
? _value.notes
|
||||
: notes // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
orderItems: freezed == orderItems
|
||||
? _value.orderItems
|
||||
: orderItems // ignore: cast_nullable_to_non_nullable
|
||||
as List<OrderItemRequestDto>?,
|
||||
customerName: freezed == customerName
|
||||
? _value.customerName
|
||||
: customerName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$OrderRequestDtoImplCopyWith<$Res>
|
||||
implements $OrderRequestDtoCopyWith<$Res> {
|
||||
factory _$$OrderRequestDtoImplCopyWith(
|
||||
_$OrderRequestDtoImpl value,
|
||||
$Res Function(_$OrderRequestDtoImpl) then,
|
||||
) = __$$OrderRequestDtoImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({
|
||||
@JsonKey(name: "outlet_id") String? outletId,
|
||||
@JsonKey(name: "customer_id") String? customerId,
|
||||
@JsonKey(name: "table_number") String? tableNumber,
|
||||
@JsonKey(name: "table_id") String? tableId,
|
||||
@JsonKey(name: "order_type") String? orderType,
|
||||
@JsonKey(name: "notes") String? notes,
|
||||
@JsonKey(name: "order_items") List<OrderItemRequestDto>? orderItems,
|
||||
@JsonKey(name: "customer_name") String? customerName,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$OrderRequestDtoImplCopyWithImpl<$Res>
|
||||
extends _$OrderRequestDtoCopyWithImpl<$Res, _$OrderRequestDtoImpl>
|
||||
implements _$$OrderRequestDtoImplCopyWith<$Res> {
|
||||
__$$OrderRequestDtoImplCopyWithImpl(
|
||||
_$OrderRequestDtoImpl _value,
|
||||
$Res Function(_$OrderRequestDtoImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of OrderRequestDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? outletId = freezed,
|
||||
Object? customerId = freezed,
|
||||
Object? tableNumber = freezed,
|
||||
Object? tableId = freezed,
|
||||
Object? orderType = freezed,
|
||||
Object? notes = freezed,
|
||||
Object? orderItems = freezed,
|
||||
Object? customerName = freezed,
|
||||
}) {
|
||||
return _then(
|
||||
_$OrderRequestDtoImpl(
|
||||
outletId: freezed == outletId
|
||||
? _value.outletId
|
||||
: outletId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
customerId: freezed == customerId
|
||||
? _value.customerId
|
||||
: customerId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
tableNumber: freezed == tableNumber
|
||||
? _value.tableNumber
|
||||
: tableNumber // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
tableId: freezed == tableId
|
||||
? _value.tableId
|
||||
: tableId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
orderType: freezed == orderType
|
||||
? _value.orderType
|
||||
: orderType // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
notes: freezed == notes
|
||||
? _value.notes
|
||||
: notes // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
orderItems: freezed == orderItems
|
||||
? _value._orderItems
|
||||
: orderItems // ignore: cast_nullable_to_non_nullable
|
||||
as List<OrderItemRequestDto>?,
|
||||
customerName: freezed == customerName
|
||||
? _value.customerName
|
||||
: customerName // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$OrderRequestDtoImpl extends _OrderRequestDto {
|
||||
const _$OrderRequestDtoImpl({
|
||||
@JsonKey(name: "outlet_id") this.outletId,
|
||||
@JsonKey(name: "customer_id") this.customerId,
|
||||
@JsonKey(name: "table_number") this.tableNumber,
|
||||
@JsonKey(name: "table_id") this.tableId,
|
||||
@JsonKey(name: "order_type") this.orderType,
|
||||
@JsonKey(name: "notes") this.notes,
|
||||
@JsonKey(name: "order_items") final List<OrderItemRequestDto>? orderItems,
|
||||
@JsonKey(name: "customer_name") this.customerName,
|
||||
}) : _orderItems = orderItems,
|
||||
super._();
|
||||
|
||||
factory _$OrderRequestDtoImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$OrderRequestDtoImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: "outlet_id")
|
||||
final String? outletId;
|
||||
@override
|
||||
@JsonKey(name: "customer_id")
|
||||
final String? customerId;
|
||||
@override
|
||||
@JsonKey(name: "table_number")
|
||||
final String? tableNumber;
|
||||
@override
|
||||
@JsonKey(name: "table_id")
|
||||
final String? tableId;
|
||||
@override
|
||||
@JsonKey(name: "order_type")
|
||||
final String? orderType;
|
||||
@override
|
||||
@JsonKey(name: "notes")
|
||||
final String? notes;
|
||||
final List<OrderItemRequestDto>? _orderItems;
|
||||
@override
|
||||
@JsonKey(name: "order_items")
|
||||
List<OrderItemRequestDto>? get orderItems {
|
||||
final value = _orderItems;
|
||||
if (value == null) return null;
|
||||
if (_orderItems is EqualUnmodifiableListView) return _orderItems;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(value);
|
||||
}
|
||||
|
||||
@override
|
||||
@JsonKey(name: "customer_name")
|
||||
final String? customerName;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'OrderRequestDto(outletId: $outletId, customerId: $customerId, tableNumber: $tableNumber, tableId: $tableId, orderType: $orderType, notes: $notes, orderItems: $orderItems, customerName: $customerName)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$OrderRequestDtoImpl &&
|
||||
(identical(other.outletId, outletId) ||
|
||||
other.outletId == outletId) &&
|
||||
(identical(other.customerId, customerId) ||
|
||||
other.customerId == customerId) &&
|
||||
(identical(other.tableNumber, tableNumber) ||
|
||||
other.tableNumber == tableNumber) &&
|
||||
(identical(other.tableId, tableId) || other.tableId == tableId) &&
|
||||
(identical(other.orderType, orderType) ||
|
||||
other.orderType == orderType) &&
|
||||
(identical(other.notes, notes) || other.notes == notes) &&
|
||||
const DeepCollectionEquality().equals(
|
||||
other._orderItems,
|
||||
_orderItems,
|
||||
) &&
|
||||
(identical(other.customerName, customerName) ||
|
||||
other.customerName == customerName));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
outletId,
|
||||
customerId,
|
||||
tableNumber,
|
||||
tableId,
|
||||
orderType,
|
||||
notes,
|
||||
const DeepCollectionEquality().hash(_orderItems),
|
||||
customerName,
|
||||
);
|
||||
|
||||
/// Create a copy of OrderRequestDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$OrderRequestDtoImplCopyWith<_$OrderRequestDtoImpl> get copyWith =>
|
||||
__$$OrderRequestDtoImplCopyWithImpl<_$OrderRequestDtoImpl>(
|
||||
this,
|
||||
_$identity,
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$OrderRequestDtoImplToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _OrderRequestDto extends OrderRequestDto {
|
||||
const factory _OrderRequestDto({
|
||||
@JsonKey(name: "outlet_id") final String? outletId,
|
||||
@JsonKey(name: "customer_id") final String? customerId,
|
||||
@JsonKey(name: "table_number") final String? tableNumber,
|
||||
@JsonKey(name: "table_id") final String? tableId,
|
||||
@JsonKey(name: "order_type") final String? orderType,
|
||||
@JsonKey(name: "notes") final String? notes,
|
||||
@JsonKey(name: "order_items") final List<OrderItemRequestDto>? orderItems,
|
||||
@JsonKey(name: "customer_name") final String? customerName,
|
||||
}) = _$OrderRequestDtoImpl;
|
||||
const _OrderRequestDto._() : super._();
|
||||
|
||||
factory _OrderRequestDto.fromJson(Map<String, dynamic> json) =
|
||||
_$OrderRequestDtoImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "outlet_id")
|
||||
String? get outletId;
|
||||
@override
|
||||
@JsonKey(name: "customer_id")
|
||||
String? get customerId;
|
||||
@override
|
||||
@JsonKey(name: "table_number")
|
||||
String? get tableNumber;
|
||||
@override
|
||||
@JsonKey(name: "table_id")
|
||||
String? get tableId;
|
||||
@override
|
||||
@JsonKey(name: "order_type")
|
||||
String? get orderType;
|
||||
@override
|
||||
@JsonKey(name: "notes")
|
||||
String? get notes;
|
||||
@override
|
||||
@JsonKey(name: "order_items")
|
||||
List<OrderItemRequestDto>? get orderItems;
|
||||
@override
|
||||
@JsonKey(name: "customer_name")
|
||||
String? get customerName;
|
||||
|
||||
/// Create a copy of OrderRequestDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$OrderRequestDtoImplCopyWith<_$OrderRequestDtoImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
OrderItemRequestDto _$OrderItemRequestDtoFromJson(Map<String, dynamic> json) {
|
||||
return _OrderItemRequestDto.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$OrderItemRequestDto {
|
||||
@JsonKey(name: "product_id")
|
||||
String? get productId => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "product_variant_id")
|
||||
String? get productVariantId => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "quantity")
|
||||
int? get quantity => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "unit_price")
|
||||
int? get unitPrice => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "notes")
|
||||
String? get notes => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this OrderItemRequestDto to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of OrderItemRequestDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$OrderItemRequestDtoCopyWith<OrderItemRequestDto> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $OrderItemRequestDtoCopyWith<$Res> {
|
||||
factory $OrderItemRequestDtoCopyWith(
|
||||
OrderItemRequestDto value,
|
||||
$Res Function(OrderItemRequestDto) then,
|
||||
) = _$OrderItemRequestDtoCopyWithImpl<$Res, OrderItemRequestDto>;
|
||||
@useResult
|
||||
$Res call({
|
||||
@JsonKey(name: "product_id") String? productId,
|
||||
@JsonKey(name: "product_variant_id") String? productVariantId,
|
||||
@JsonKey(name: "quantity") int? quantity,
|
||||
@JsonKey(name: "unit_price") int? unitPrice,
|
||||
@JsonKey(name: "notes") String? notes,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$OrderItemRequestDtoCopyWithImpl<$Res, $Val extends OrderItemRequestDto>
|
||||
implements $OrderItemRequestDtoCopyWith<$Res> {
|
||||
_$OrderItemRequestDtoCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of OrderItemRequestDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? productId = freezed,
|
||||
Object? productVariantId = freezed,
|
||||
Object? quantity = freezed,
|
||||
Object? unitPrice = freezed,
|
||||
Object? notes = freezed,
|
||||
}) {
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
productId: freezed == productId
|
||||
? _value.productId
|
||||
: productId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
productVariantId: freezed == productVariantId
|
||||
? _value.productVariantId
|
||||
: productVariantId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
quantity: freezed == quantity
|
||||
? _value.quantity
|
||||
: quantity // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
unitPrice: freezed == unitPrice
|
||||
? _value.unitPrice
|
||||
: unitPrice // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
notes: freezed == notes
|
||||
? _value.notes
|
||||
: notes // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$OrderItemRequestDtoImplCopyWith<$Res>
|
||||
implements $OrderItemRequestDtoCopyWith<$Res> {
|
||||
factory _$$OrderItemRequestDtoImplCopyWith(
|
||||
_$OrderItemRequestDtoImpl value,
|
||||
$Res Function(_$OrderItemRequestDtoImpl) then,
|
||||
) = __$$OrderItemRequestDtoImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({
|
||||
@JsonKey(name: "product_id") String? productId,
|
||||
@JsonKey(name: "product_variant_id") String? productVariantId,
|
||||
@JsonKey(name: "quantity") int? quantity,
|
||||
@JsonKey(name: "unit_price") int? unitPrice,
|
||||
@JsonKey(name: "notes") String? notes,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$OrderItemRequestDtoImplCopyWithImpl<$Res>
|
||||
extends _$OrderItemRequestDtoCopyWithImpl<$Res, _$OrderItemRequestDtoImpl>
|
||||
implements _$$OrderItemRequestDtoImplCopyWith<$Res> {
|
||||
__$$OrderItemRequestDtoImplCopyWithImpl(
|
||||
_$OrderItemRequestDtoImpl _value,
|
||||
$Res Function(_$OrderItemRequestDtoImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of OrderItemRequestDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? productId = freezed,
|
||||
Object? productVariantId = freezed,
|
||||
Object? quantity = freezed,
|
||||
Object? unitPrice = freezed,
|
||||
Object? notes = freezed,
|
||||
}) {
|
||||
return _then(
|
||||
_$OrderItemRequestDtoImpl(
|
||||
productId: freezed == productId
|
||||
? _value.productId
|
||||
: productId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
productVariantId: freezed == productVariantId
|
||||
? _value.productVariantId
|
||||
: productVariantId // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
quantity: freezed == quantity
|
||||
? _value.quantity
|
||||
: quantity // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
unitPrice: freezed == unitPrice
|
||||
? _value.unitPrice
|
||||
: unitPrice // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
notes: freezed == notes
|
||||
? _value.notes
|
||||
: notes // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$OrderItemRequestDtoImpl extends _OrderItemRequestDto {
|
||||
const _$OrderItemRequestDtoImpl({
|
||||
@JsonKey(name: "product_id") this.productId,
|
||||
@JsonKey(name: "product_variant_id") this.productVariantId,
|
||||
@JsonKey(name: "quantity") this.quantity,
|
||||
@JsonKey(name: "unit_price") this.unitPrice,
|
||||
@JsonKey(name: "notes") this.notes,
|
||||
}) : super._();
|
||||
|
||||
factory _$OrderItemRequestDtoImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$OrderItemRequestDtoImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: "product_id")
|
||||
final String? productId;
|
||||
@override
|
||||
@JsonKey(name: "product_variant_id")
|
||||
final String? productVariantId;
|
||||
@override
|
||||
@JsonKey(name: "quantity")
|
||||
final int? quantity;
|
||||
@override
|
||||
@JsonKey(name: "unit_price")
|
||||
final int? unitPrice;
|
||||
@override
|
||||
@JsonKey(name: "notes")
|
||||
final String? notes;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'OrderItemRequestDto(productId: $productId, productVariantId: $productVariantId, quantity: $quantity, unitPrice: $unitPrice, notes: $notes)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$OrderItemRequestDtoImpl &&
|
||||
(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));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
productId,
|
||||
productVariantId,
|
||||
quantity,
|
||||
unitPrice,
|
||||
notes,
|
||||
);
|
||||
|
||||
/// Create a copy of OrderItemRequestDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$OrderItemRequestDtoImplCopyWith<_$OrderItemRequestDtoImpl> get copyWith =>
|
||||
__$$OrderItemRequestDtoImplCopyWithImpl<_$OrderItemRequestDtoImpl>(
|
||||
this,
|
||||
_$identity,
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$OrderItemRequestDtoImplToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _OrderItemRequestDto extends OrderItemRequestDto {
|
||||
const factory _OrderItemRequestDto({
|
||||
@JsonKey(name: "product_id") final String? productId,
|
||||
@JsonKey(name: "product_variant_id") final String? productVariantId,
|
||||
@JsonKey(name: "quantity") final int? quantity,
|
||||
@JsonKey(name: "unit_price") final int? unitPrice,
|
||||
@JsonKey(name: "notes") final String? notes,
|
||||
}) = _$OrderItemRequestDtoImpl;
|
||||
const _OrderItemRequestDto._() : super._();
|
||||
|
||||
factory _OrderItemRequestDto.fromJson(Map<String, dynamic> json) =
|
||||
_$OrderItemRequestDtoImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "product_id")
|
||||
String? get productId;
|
||||
@override
|
||||
@JsonKey(name: "product_variant_id")
|
||||
String? get productVariantId;
|
||||
@override
|
||||
@JsonKey(name: "quantity")
|
||||
int? get quantity;
|
||||
@override
|
||||
@JsonKey(name: "unit_price")
|
||||
int? get unitPrice;
|
||||
@override
|
||||
@JsonKey(name: "notes")
|
||||
String? get notes;
|
||||
|
||||
/// Create a copy of OrderItemRequestDto
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$OrderItemRequestDtoImplCopyWith<_$OrderItemRequestDtoImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user