apskel-pos-flutter-v2/lib/infrastructure/order/order_dtos.freezed.dart
2025-10-28 00:08:12 +07:00

2798 lines
98 KiB
Dart

// 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 'order_dtos.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
);
ListOrderDto _$ListOrderDtoFromJson(Map<String, dynamic> json) {
return _ListOrderDto.fromJson(json);
}
/// @nodoc
mixin _$ListOrderDto {
@JsonKey(name: "orders")
List<OrderDto>? get orders => throw _privateConstructorUsedError;
@JsonKey(name: 'total_count')
int? get totalCount => throw _privateConstructorUsedError;
@JsonKey(name: 'page')
int? get page => throw _privateConstructorUsedError;
@JsonKey(name: 'limit')
int? get limit => throw _privateConstructorUsedError;
@JsonKey(name: 'total_pages')
int? get totalPages => throw _privateConstructorUsedError;
/// Serializes this ListOrderDto to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of ListOrderDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$ListOrderDtoCopyWith<ListOrderDto> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $ListOrderDtoCopyWith<$Res> {
factory $ListOrderDtoCopyWith(
ListOrderDto value,
$Res Function(ListOrderDto) then,
) = _$ListOrderDtoCopyWithImpl<$Res, ListOrderDto>;
@useResult
$Res call({
@JsonKey(name: "orders") List<OrderDto>? orders,
@JsonKey(name: 'total_count') int? totalCount,
@JsonKey(name: 'page') int? page,
@JsonKey(name: 'limit') int? limit,
@JsonKey(name: 'total_pages') int? totalPages,
});
}
/// @nodoc
class _$ListOrderDtoCopyWithImpl<$Res, $Val extends ListOrderDto>
implements $ListOrderDtoCopyWith<$Res> {
_$ListOrderDtoCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of ListOrderDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? orders = freezed,
Object? totalCount = freezed,
Object? page = freezed,
Object? limit = freezed,
Object? totalPages = freezed,
}) {
return _then(
_value.copyWith(
orders: freezed == orders
? _value.orders
: orders // ignore: cast_nullable_to_non_nullable
as List<OrderDto>?,
totalCount: freezed == totalCount
? _value.totalCount
: totalCount // ignore: cast_nullable_to_non_nullable
as int?,
page: freezed == page
? _value.page
: page // ignore: cast_nullable_to_non_nullable
as int?,
limit: freezed == limit
? _value.limit
: limit // ignore: cast_nullable_to_non_nullable
as int?,
totalPages: freezed == totalPages
? _value.totalPages
: totalPages // ignore: cast_nullable_to_non_nullable
as int?,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$ListOrderDtoImplCopyWith<$Res>
implements $ListOrderDtoCopyWith<$Res> {
factory _$$ListOrderDtoImplCopyWith(
_$ListOrderDtoImpl value,
$Res Function(_$ListOrderDtoImpl) then,
) = __$$ListOrderDtoImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
@JsonKey(name: "orders") List<OrderDto>? orders,
@JsonKey(name: 'total_count') int? totalCount,
@JsonKey(name: 'page') int? page,
@JsonKey(name: 'limit') int? limit,
@JsonKey(name: 'total_pages') int? totalPages,
});
}
/// @nodoc
class __$$ListOrderDtoImplCopyWithImpl<$Res>
extends _$ListOrderDtoCopyWithImpl<$Res, _$ListOrderDtoImpl>
implements _$$ListOrderDtoImplCopyWith<$Res> {
__$$ListOrderDtoImplCopyWithImpl(
_$ListOrderDtoImpl _value,
$Res Function(_$ListOrderDtoImpl) _then,
) : super(_value, _then);
/// Create a copy of ListOrderDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? orders = freezed,
Object? totalCount = freezed,
Object? page = freezed,
Object? limit = freezed,
Object? totalPages = freezed,
}) {
return _then(
_$ListOrderDtoImpl(
orders: freezed == orders
? _value._orders
: orders // ignore: cast_nullable_to_non_nullable
as List<OrderDto>?,
totalCount: freezed == totalCount
? _value.totalCount
: totalCount // ignore: cast_nullable_to_non_nullable
as int?,
page: freezed == page
? _value.page
: page // ignore: cast_nullable_to_non_nullable
as int?,
limit: freezed == limit
? _value.limit
: limit // ignore: cast_nullable_to_non_nullable
as int?,
totalPages: freezed == totalPages
? _value.totalPages
: totalPages // ignore: cast_nullable_to_non_nullable
as int?,
),
);
}
}
/// @nodoc
@JsonSerializable()
class _$ListOrderDtoImpl extends _ListOrderDto {
const _$ListOrderDtoImpl({
@JsonKey(name: "orders") final List<OrderDto>? orders,
@JsonKey(name: 'total_count') this.totalCount,
@JsonKey(name: 'page') this.page,
@JsonKey(name: 'limit') this.limit,
@JsonKey(name: 'total_pages') this.totalPages,
}) : _orders = orders,
super._();
factory _$ListOrderDtoImpl.fromJson(Map<String, dynamic> json) =>
_$$ListOrderDtoImplFromJson(json);
final List<OrderDto>? _orders;
@override
@JsonKey(name: "orders")
List<OrderDto>? get orders {
final value = _orders;
if (value == null) return null;
if (_orders is EqualUnmodifiableListView) return _orders;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
@override
@JsonKey(name: 'total_count')
final int? totalCount;
@override
@JsonKey(name: 'page')
final int? page;
@override
@JsonKey(name: 'limit')
final int? limit;
@override
@JsonKey(name: 'total_pages')
final int? totalPages;
@override
String toString() {
return 'ListOrderDto(orders: $orders, totalCount: $totalCount, page: $page, limit: $limit, totalPages: $totalPages)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ListOrderDtoImpl &&
const DeepCollectionEquality().equals(other._orders, _orders) &&
(identical(other.totalCount, totalCount) ||
other.totalCount == totalCount) &&
(identical(other.page, page) || other.page == page) &&
(identical(other.limit, limit) || other.limit == limit) &&
(identical(other.totalPages, totalPages) ||
other.totalPages == totalPages));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
const DeepCollectionEquality().hash(_orders),
totalCount,
page,
limit,
totalPages,
);
/// Create a copy of ListOrderDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ListOrderDtoImplCopyWith<_$ListOrderDtoImpl> get copyWith =>
__$$ListOrderDtoImplCopyWithImpl<_$ListOrderDtoImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$ListOrderDtoImplToJson(this);
}
}
abstract class _ListOrderDto extends ListOrderDto {
const factory _ListOrderDto({
@JsonKey(name: "orders") final List<OrderDto>? orders,
@JsonKey(name: 'total_count') final int? totalCount,
@JsonKey(name: 'page') final int? page,
@JsonKey(name: 'limit') final int? limit,
@JsonKey(name: 'total_pages') final int? totalPages,
}) = _$ListOrderDtoImpl;
const _ListOrderDto._() : super._();
factory _ListOrderDto.fromJson(Map<String, dynamic> json) =
_$ListOrderDtoImpl.fromJson;
@override
@JsonKey(name: "orders")
List<OrderDto>? get orders;
@override
@JsonKey(name: 'total_count')
int? get totalCount;
@override
@JsonKey(name: 'page')
int? get page;
@override
@JsonKey(name: 'limit')
int? get limit;
@override
@JsonKey(name: 'total_pages')
int? get totalPages;
/// Create a copy of ListOrderDto
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ListOrderDtoImplCopyWith<_$ListOrderDtoImpl> get copyWith =>
throw _privateConstructorUsedError;
}
OrderDto _$OrderDtoFromJson(Map<String, dynamic> json) {
return _OrderDto.fromJson(json);
}
/// @nodoc
mixin _$OrderDto {
@JsonKey(name: "id")
String? get id => throw _privateConstructorUsedError;
@JsonKey(name: "order_number")
String? get orderNumber => throw _privateConstructorUsedError;
@JsonKey(name: "outlet_id")
String? get outletId => throw _privateConstructorUsedError;
@JsonKey(name: "user_id")
String? get userId => throw _privateConstructorUsedError;
@JsonKey(name: "table_number")
String? get tableNumber => throw _privateConstructorUsedError;
@JsonKey(name: "order_type")
String? get orderType => throw _privateConstructorUsedError;
@JsonKey(name: "status")
String? get status => throw _privateConstructorUsedError;
@JsonKey(name: "subtotal")
int? get subtotal => throw _privateConstructorUsedError;
@JsonKey(name: "tax_amount")
int? get taxAmount => throw _privateConstructorUsedError;
@JsonKey(name: "discount_amount")
int? get discountAmount => throw _privateConstructorUsedError;
@JsonKey(name: "total_amount")
int? get totalAmount => throw _privateConstructorUsedError;
@JsonKey(name: "total_cost")
num? get totalCost => throw _privateConstructorUsedError;
@JsonKey(name: "remaining_amount")
int? get remainingAmount => throw _privateConstructorUsedError;
@JsonKey(name: "payment_status")
String? get paymentStatus => throw _privateConstructorUsedError;
@JsonKey(name: "refund_amount")
int? get refundAmount => throw _privateConstructorUsedError;
@JsonKey(name: "is_void")
bool? get isVoid => throw _privateConstructorUsedError;
@JsonKey(name: "is_refund")
bool? get isRefund => throw _privateConstructorUsedError;
@JsonKey(name: "notes")
String? get notes => throw _privateConstructorUsedError;
@JsonKey(name: "metadata")
Map<String, dynamic>? get metadata => throw _privateConstructorUsedError;
@JsonKey(name: "created_at")
String? get createdAt => throw _privateConstructorUsedError;
@JsonKey(name: "updated_at")
String? get updatedAt => throw _privateConstructorUsedError;
@JsonKey(name: "order_items")
List<OrderItemDto>? get orderItems => throw _privateConstructorUsedError;
@JsonKey(name: "payments")
List<PaymentOrderDto>? get payments => throw _privateConstructorUsedError;
@JsonKey(name: "total_paid")
int? get totalPaid => throw _privateConstructorUsedError;
@JsonKey(name: "payment_count")
int? get paymentCount => throw _privateConstructorUsedError;
@JsonKey(name: "split_type")
String? get splitType => throw _privateConstructorUsedError;
/// Serializes this OrderDto to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of OrderDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$OrderDtoCopyWith<OrderDto> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $OrderDtoCopyWith<$Res> {
factory $OrderDtoCopyWith(OrderDto value, $Res Function(OrderDto) then) =
_$OrderDtoCopyWithImpl<$Res, OrderDto>;
@useResult
$Res call({
@JsonKey(name: "id") String? id,
@JsonKey(name: "order_number") String? orderNumber,
@JsonKey(name: "outlet_id") String? outletId,
@JsonKey(name: "user_id") String? userId,
@JsonKey(name: "table_number") String? tableNumber,
@JsonKey(name: "order_type") String? orderType,
@JsonKey(name: "status") String? status,
@JsonKey(name: "subtotal") int? subtotal,
@JsonKey(name: "tax_amount") int? taxAmount,
@JsonKey(name: "discount_amount") int? discountAmount,
@JsonKey(name: "total_amount") int? totalAmount,
@JsonKey(name: "total_cost") num? totalCost,
@JsonKey(name: "remaining_amount") int? remainingAmount,
@JsonKey(name: "payment_status") String? paymentStatus,
@JsonKey(name: "refund_amount") int? refundAmount,
@JsonKey(name: "is_void") bool? isVoid,
@JsonKey(name: "is_refund") bool? isRefund,
@JsonKey(name: "notes") String? notes,
@JsonKey(name: "metadata") Map<String, dynamic>? metadata,
@JsonKey(name: "created_at") String? createdAt,
@JsonKey(name: "updated_at") String? updatedAt,
@JsonKey(name: "order_items") List<OrderItemDto>? orderItems,
@JsonKey(name: "payments") List<PaymentOrderDto>? payments,
@JsonKey(name: "total_paid") int? totalPaid,
@JsonKey(name: "payment_count") int? paymentCount,
@JsonKey(name: "split_type") String? splitType,
});
}
/// @nodoc
class _$OrderDtoCopyWithImpl<$Res, $Val extends OrderDto>
implements $OrderDtoCopyWith<$Res> {
_$OrderDtoCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of OrderDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = freezed,
Object? orderNumber = freezed,
Object? outletId = freezed,
Object? userId = freezed,
Object? tableNumber = freezed,
Object? orderType = freezed,
Object? status = freezed,
Object? subtotal = freezed,
Object? taxAmount = freezed,
Object? discountAmount = freezed,
Object? totalAmount = freezed,
Object? totalCost = freezed,
Object? remainingAmount = freezed,
Object? paymentStatus = freezed,
Object? refundAmount = freezed,
Object? isVoid = freezed,
Object? isRefund = freezed,
Object? notes = freezed,
Object? metadata = freezed,
Object? createdAt = freezed,
Object? updatedAt = freezed,
Object? orderItems = freezed,
Object? payments = freezed,
Object? totalPaid = freezed,
Object? paymentCount = freezed,
Object? splitType = freezed,
}) {
return _then(
_value.copyWith(
id: freezed == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String?,
orderNumber: freezed == orderNumber
? _value.orderNumber
: orderNumber // ignore: cast_nullable_to_non_nullable
as String?,
outletId: freezed == outletId
? _value.outletId
: outletId // ignore: cast_nullable_to_non_nullable
as String?,
userId: freezed == userId
? _value.userId
: userId // ignore: cast_nullable_to_non_nullable
as String?,
tableNumber: freezed == tableNumber
? _value.tableNumber
: tableNumber // ignore: cast_nullable_to_non_nullable
as String?,
orderType: freezed == orderType
? _value.orderType
: orderType // ignore: cast_nullable_to_non_nullable
as String?,
status: freezed == status
? _value.status
: status // ignore: cast_nullable_to_non_nullable
as String?,
subtotal: freezed == subtotal
? _value.subtotal
: subtotal // ignore: cast_nullable_to_non_nullable
as int?,
taxAmount: freezed == taxAmount
? _value.taxAmount
: taxAmount // ignore: cast_nullable_to_non_nullable
as int?,
discountAmount: freezed == discountAmount
? _value.discountAmount
: discountAmount // ignore: cast_nullable_to_non_nullable
as int?,
totalAmount: freezed == totalAmount
? _value.totalAmount
: totalAmount // ignore: cast_nullable_to_non_nullable
as int?,
totalCost: freezed == totalCost
? _value.totalCost
: totalCost // ignore: cast_nullable_to_non_nullable
as num?,
remainingAmount: freezed == remainingAmount
? _value.remainingAmount
: remainingAmount // ignore: cast_nullable_to_non_nullable
as int?,
paymentStatus: freezed == paymentStatus
? _value.paymentStatus
: paymentStatus // ignore: cast_nullable_to_non_nullable
as String?,
refundAmount: freezed == refundAmount
? _value.refundAmount
: refundAmount // ignore: cast_nullable_to_non_nullable
as int?,
isVoid: freezed == isVoid
? _value.isVoid
: isVoid // ignore: cast_nullable_to_non_nullable
as bool?,
isRefund: freezed == isRefund
? _value.isRefund
: isRefund // ignore: cast_nullable_to_non_nullable
as bool?,
notes: freezed == notes
? _value.notes
: notes // ignore: cast_nullable_to_non_nullable
as String?,
metadata: freezed == metadata
? _value.metadata
: metadata // ignore: cast_nullable_to_non_nullable
as Map<String, dynamic>?,
createdAt: freezed == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as String?,
updatedAt: freezed == updatedAt
? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as String?,
orderItems: freezed == orderItems
? _value.orderItems
: orderItems // ignore: cast_nullable_to_non_nullable
as List<OrderItemDto>?,
payments: freezed == payments
? _value.payments
: payments // ignore: cast_nullable_to_non_nullable
as List<PaymentOrderDto>?,
totalPaid: freezed == totalPaid
? _value.totalPaid
: totalPaid // ignore: cast_nullable_to_non_nullable
as int?,
paymentCount: freezed == paymentCount
? _value.paymentCount
: paymentCount // ignore: cast_nullable_to_non_nullable
as int?,
splitType: freezed == splitType
? _value.splitType
: splitType // ignore: cast_nullable_to_non_nullable
as String?,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$OrderDtoImplCopyWith<$Res>
implements $OrderDtoCopyWith<$Res> {
factory _$$OrderDtoImplCopyWith(
_$OrderDtoImpl value,
$Res Function(_$OrderDtoImpl) then,
) = __$$OrderDtoImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
@JsonKey(name: "id") String? id,
@JsonKey(name: "order_number") String? orderNumber,
@JsonKey(name: "outlet_id") String? outletId,
@JsonKey(name: "user_id") String? userId,
@JsonKey(name: "table_number") String? tableNumber,
@JsonKey(name: "order_type") String? orderType,
@JsonKey(name: "status") String? status,
@JsonKey(name: "subtotal") int? subtotal,
@JsonKey(name: "tax_amount") int? taxAmount,
@JsonKey(name: "discount_amount") int? discountAmount,
@JsonKey(name: "total_amount") int? totalAmount,
@JsonKey(name: "total_cost") num? totalCost,
@JsonKey(name: "remaining_amount") int? remainingAmount,
@JsonKey(name: "payment_status") String? paymentStatus,
@JsonKey(name: "refund_amount") int? refundAmount,
@JsonKey(name: "is_void") bool? isVoid,
@JsonKey(name: "is_refund") bool? isRefund,
@JsonKey(name: "notes") String? notes,
@JsonKey(name: "metadata") Map<String, dynamic>? metadata,
@JsonKey(name: "created_at") String? createdAt,
@JsonKey(name: "updated_at") String? updatedAt,
@JsonKey(name: "order_items") List<OrderItemDto>? orderItems,
@JsonKey(name: "payments") List<PaymentOrderDto>? payments,
@JsonKey(name: "total_paid") int? totalPaid,
@JsonKey(name: "payment_count") int? paymentCount,
@JsonKey(name: "split_type") String? splitType,
});
}
/// @nodoc
class __$$OrderDtoImplCopyWithImpl<$Res>
extends _$OrderDtoCopyWithImpl<$Res, _$OrderDtoImpl>
implements _$$OrderDtoImplCopyWith<$Res> {
__$$OrderDtoImplCopyWithImpl(
_$OrderDtoImpl _value,
$Res Function(_$OrderDtoImpl) _then,
) : super(_value, _then);
/// Create a copy of OrderDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = freezed,
Object? orderNumber = freezed,
Object? outletId = freezed,
Object? userId = freezed,
Object? tableNumber = freezed,
Object? orderType = freezed,
Object? status = freezed,
Object? subtotal = freezed,
Object? taxAmount = freezed,
Object? discountAmount = freezed,
Object? totalAmount = freezed,
Object? totalCost = freezed,
Object? remainingAmount = freezed,
Object? paymentStatus = freezed,
Object? refundAmount = freezed,
Object? isVoid = freezed,
Object? isRefund = freezed,
Object? notes = freezed,
Object? metadata = freezed,
Object? createdAt = freezed,
Object? updatedAt = freezed,
Object? orderItems = freezed,
Object? payments = freezed,
Object? totalPaid = freezed,
Object? paymentCount = freezed,
Object? splitType = freezed,
}) {
return _then(
_$OrderDtoImpl(
id: freezed == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String?,
orderNumber: freezed == orderNumber
? _value.orderNumber
: orderNumber // ignore: cast_nullable_to_non_nullable
as String?,
outletId: freezed == outletId
? _value.outletId
: outletId // ignore: cast_nullable_to_non_nullable
as String?,
userId: freezed == userId
? _value.userId
: userId // ignore: cast_nullable_to_non_nullable
as String?,
tableNumber: freezed == tableNumber
? _value.tableNumber
: tableNumber // ignore: cast_nullable_to_non_nullable
as String?,
orderType: freezed == orderType
? _value.orderType
: orderType // ignore: cast_nullable_to_non_nullable
as String?,
status: freezed == status
? _value.status
: status // ignore: cast_nullable_to_non_nullable
as String?,
subtotal: freezed == subtotal
? _value.subtotal
: subtotal // ignore: cast_nullable_to_non_nullable
as int?,
taxAmount: freezed == taxAmount
? _value.taxAmount
: taxAmount // ignore: cast_nullable_to_non_nullable
as int?,
discountAmount: freezed == discountAmount
? _value.discountAmount
: discountAmount // ignore: cast_nullable_to_non_nullable
as int?,
totalAmount: freezed == totalAmount
? _value.totalAmount
: totalAmount // ignore: cast_nullable_to_non_nullable
as int?,
totalCost: freezed == totalCost
? _value.totalCost
: totalCost // ignore: cast_nullable_to_non_nullable
as num?,
remainingAmount: freezed == remainingAmount
? _value.remainingAmount
: remainingAmount // ignore: cast_nullable_to_non_nullable
as int?,
paymentStatus: freezed == paymentStatus
? _value.paymentStatus
: paymentStatus // ignore: cast_nullable_to_non_nullable
as String?,
refundAmount: freezed == refundAmount
? _value.refundAmount
: refundAmount // ignore: cast_nullable_to_non_nullable
as int?,
isVoid: freezed == isVoid
? _value.isVoid
: isVoid // ignore: cast_nullable_to_non_nullable
as bool?,
isRefund: freezed == isRefund
? _value.isRefund
: isRefund // ignore: cast_nullable_to_non_nullable
as bool?,
notes: freezed == notes
? _value.notes
: notes // ignore: cast_nullable_to_non_nullable
as String?,
metadata: freezed == metadata
? _value._metadata
: metadata // ignore: cast_nullable_to_non_nullable
as Map<String, dynamic>?,
createdAt: freezed == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as String?,
updatedAt: freezed == updatedAt
? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as String?,
orderItems: freezed == orderItems
? _value._orderItems
: orderItems // ignore: cast_nullable_to_non_nullable
as List<OrderItemDto>?,
payments: freezed == payments
? _value._payments
: payments // ignore: cast_nullable_to_non_nullable
as List<PaymentOrderDto>?,
totalPaid: freezed == totalPaid
? _value.totalPaid
: totalPaid // ignore: cast_nullable_to_non_nullable
as int?,
paymentCount: freezed == paymentCount
? _value.paymentCount
: paymentCount // ignore: cast_nullable_to_non_nullable
as int?,
splitType: freezed == splitType
? _value.splitType
: splitType // ignore: cast_nullable_to_non_nullable
as String?,
),
);
}
}
/// @nodoc
@JsonSerializable()
class _$OrderDtoImpl extends _OrderDto {
const _$OrderDtoImpl({
@JsonKey(name: "id") this.id,
@JsonKey(name: "order_number") this.orderNumber,
@JsonKey(name: "outlet_id") this.outletId,
@JsonKey(name: "user_id") this.userId,
@JsonKey(name: "table_number") this.tableNumber,
@JsonKey(name: "order_type") this.orderType,
@JsonKey(name: "status") this.status,
@JsonKey(name: "subtotal") this.subtotal,
@JsonKey(name: "tax_amount") this.taxAmount,
@JsonKey(name: "discount_amount") this.discountAmount,
@JsonKey(name: "total_amount") this.totalAmount,
@JsonKey(name: "total_cost") this.totalCost,
@JsonKey(name: "remaining_amount") this.remainingAmount,
@JsonKey(name: "payment_status") this.paymentStatus,
@JsonKey(name: "refund_amount") this.refundAmount,
@JsonKey(name: "is_void") this.isVoid,
@JsonKey(name: "is_refund") this.isRefund,
@JsonKey(name: "notes") this.notes,
@JsonKey(name: "metadata") final Map<String, dynamic>? metadata,
@JsonKey(name: "created_at") this.createdAt,
@JsonKey(name: "updated_at") this.updatedAt,
@JsonKey(name: "order_items") final List<OrderItemDto>? orderItems,
@JsonKey(name: "payments") final List<PaymentOrderDto>? payments,
@JsonKey(name: "total_paid") this.totalPaid,
@JsonKey(name: "payment_count") this.paymentCount,
@JsonKey(name: "split_type") this.splitType,
}) : _metadata = metadata,
_orderItems = orderItems,
_payments = payments,
super._();
factory _$OrderDtoImpl.fromJson(Map<String, dynamic> json) =>
_$$OrderDtoImplFromJson(json);
@override
@JsonKey(name: "id")
final String? id;
@override
@JsonKey(name: "order_number")
final String? orderNumber;
@override
@JsonKey(name: "outlet_id")
final String? outletId;
@override
@JsonKey(name: "user_id")
final String? userId;
@override
@JsonKey(name: "table_number")
final String? tableNumber;
@override
@JsonKey(name: "order_type")
final String? orderType;
@override
@JsonKey(name: "status")
final String? status;
@override
@JsonKey(name: "subtotal")
final int? subtotal;
@override
@JsonKey(name: "tax_amount")
final int? taxAmount;
@override
@JsonKey(name: "discount_amount")
final int? discountAmount;
@override
@JsonKey(name: "total_amount")
final int? totalAmount;
@override
@JsonKey(name: "total_cost")
final num? totalCost;
@override
@JsonKey(name: "remaining_amount")
final int? remainingAmount;
@override
@JsonKey(name: "payment_status")
final String? paymentStatus;
@override
@JsonKey(name: "refund_amount")
final int? refundAmount;
@override
@JsonKey(name: "is_void")
final bool? isVoid;
@override
@JsonKey(name: "is_refund")
final bool? isRefund;
@override
@JsonKey(name: "notes")
final String? notes;
final Map<String, dynamic>? _metadata;
@override
@JsonKey(name: "metadata")
Map<String, dynamic>? get metadata {
final value = _metadata;
if (value == null) return null;
if (_metadata is EqualUnmodifiableMapView) return _metadata;
// ignore: implicit_dynamic_type
return EqualUnmodifiableMapView(value);
}
@override
@JsonKey(name: "created_at")
final String? createdAt;
@override
@JsonKey(name: "updated_at")
final String? updatedAt;
final List<OrderItemDto>? _orderItems;
@override
@JsonKey(name: "order_items")
List<OrderItemDto>? get orderItems {
final value = _orderItems;
if (value == null) return null;
if (_orderItems is EqualUnmodifiableListView) return _orderItems;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
final List<PaymentOrderDto>? _payments;
@override
@JsonKey(name: "payments")
List<PaymentOrderDto>? get payments {
final value = _payments;
if (value == null) return null;
if (_payments is EqualUnmodifiableListView) return _payments;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
@override
@JsonKey(name: "total_paid")
final int? totalPaid;
@override
@JsonKey(name: "payment_count")
final int? paymentCount;
@override
@JsonKey(name: "split_type")
final String? splitType;
@override
String toString() {
return 'OrderDto(id: $id, orderNumber: $orderNumber, outletId: $outletId, userId: $userId, tableNumber: $tableNumber, orderType: $orderType, status: $status, subtotal: $subtotal, taxAmount: $taxAmount, discountAmount: $discountAmount, totalAmount: $totalAmount, totalCost: $totalCost, remainingAmount: $remainingAmount, paymentStatus: $paymentStatus, refundAmount: $refundAmount, isVoid: $isVoid, isRefund: $isRefund, notes: $notes, metadata: $metadata, createdAt: $createdAt, updatedAt: $updatedAt, orderItems: $orderItems, payments: $payments, totalPaid: $totalPaid, paymentCount: $paymentCount, splitType: $splitType)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$OrderDtoImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.orderNumber, orderNumber) ||
other.orderNumber == orderNumber) &&
(identical(other.outletId, outletId) ||
other.outletId == outletId) &&
(identical(other.userId, userId) || other.userId == userId) &&
(identical(other.tableNumber, tableNumber) ||
other.tableNumber == tableNumber) &&
(identical(other.orderType, orderType) ||
other.orderType == orderType) &&
(identical(other.status, status) || other.status == status) &&
(identical(other.subtotal, subtotal) ||
other.subtotal == subtotal) &&
(identical(other.taxAmount, taxAmount) ||
other.taxAmount == taxAmount) &&
(identical(other.discountAmount, discountAmount) ||
other.discountAmount == discountAmount) &&
(identical(other.totalAmount, totalAmount) ||
other.totalAmount == totalAmount) &&
(identical(other.totalCost, totalCost) ||
other.totalCost == totalCost) &&
(identical(other.remainingAmount, remainingAmount) ||
other.remainingAmount == remainingAmount) &&
(identical(other.paymentStatus, paymentStatus) ||
other.paymentStatus == paymentStatus) &&
(identical(other.refundAmount, refundAmount) ||
other.refundAmount == refundAmount) &&
(identical(other.isVoid, isVoid) || other.isVoid == isVoid) &&
(identical(other.isRefund, isRefund) ||
other.isRefund == isRefund) &&
(identical(other.notes, notes) || other.notes == notes) &&
const DeepCollectionEquality().equals(other._metadata, _metadata) &&
(identical(other.createdAt, createdAt) ||
other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) ||
other.updatedAt == updatedAt) &&
const DeepCollectionEquality().equals(
other._orderItems,
_orderItems,
) &&
const DeepCollectionEquality().equals(other._payments, _payments) &&
(identical(other.totalPaid, totalPaid) ||
other.totalPaid == totalPaid) &&
(identical(other.paymentCount, paymentCount) ||
other.paymentCount == paymentCount) &&
(identical(other.splitType, splitType) ||
other.splitType == splitType));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hashAll([
runtimeType,
id,
orderNumber,
outletId,
userId,
tableNumber,
orderType,
status,
subtotal,
taxAmount,
discountAmount,
totalAmount,
totalCost,
remainingAmount,
paymentStatus,
refundAmount,
isVoid,
isRefund,
notes,
const DeepCollectionEquality().hash(_metadata),
createdAt,
updatedAt,
const DeepCollectionEquality().hash(_orderItems),
const DeepCollectionEquality().hash(_payments),
totalPaid,
paymentCount,
splitType,
]);
/// Create a copy of OrderDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$OrderDtoImplCopyWith<_$OrderDtoImpl> get copyWith =>
__$$OrderDtoImplCopyWithImpl<_$OrderDtoImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$OrderDtoImplToJson(this);
}
}
abstract class _OrderDto extends OrderDto {
const factory _OrderDto({
@JsonKey(name: "id") final String? id,
@JsonKey(name: "order_number") final String? orderNumber,
@JsonKey(name: "outlet_id") final String? outletId,
@JsonKey(name: "user_id") final String? userId,
@JsonKey(name: "table_number") final String? tableNumber,
@JsonKey(name: "order_type") final String? orderType,
@JsonKey(name: "status") final String? status,
@JsonKey(name: "subtotal") final int? subtotal,
@JsonKey(name: "tax_amount") final int? taxAmount,
@JsonKey(name: "discount_amount") final int? discountAmount,
@JsonKey(name: "total_amount") final int? totalAmount,
@JsonKey(name: "total_cost") final num? totalCost,
@JsonKey(name: "remaining_amount") final int? remainingAmount,
@JsonKey(name: "payment_status") final String? paymentStatus,
@JsonKey(name: "refund_amount") final int? refundAmount,
@JsonKey(name: "is_void") final bool? isVoid,
@JsonKey(name: "is_refund") final bool? isRefund,
@JsonKey(name: "notes") final String? notes,
@JsonKey(name: "metadata") final Map<String, dynamic>? metadata,
@JsonKey(name: "created_at") final String? createdAt,
@JsonKey(name: "updated_at") final String? updatedAt,
@JsonKey(name: "order_items") final List<OrderItemDto>? orderItems,
@JsonKey(name: "payments") final List<PaymentOrderDto>? payments,
@JsonKey(name: "total_paid") final int? totalPaid,
@JsonKey(name: "payment_count") final int? paymentCount,
@JsonKey(name: "split_type") final String? splitType,
}) = _$OrderDtoImpl;
const _OrderDto._() : super._();
factory _OrderDto.fromJson(Map<String, dynamic> json) =
_$OrderDtoImpl.fromJson;
@override
@JsonKey(name: "id")
String? get id;
@override
@JsonKey(name: "order_number")
String? get orderNumber;
@override
@JsonKey(name: "outlet_id")
String? get outletId;
@override
@JsonKey(name: "user_id")
String? get userId;
@override
@JsonKey(name: "table_number")
String? get tableNumber;
@override
@JsonKey(name: "order_type")
String? get orderType;
@override
@JsonKey(name: "status")
String? get status;
@override
@JsonKey(name: "subtotal")
int? get subtotal;
@override
@JsonKey(name: "tax_amount")
int? get taxAmount;
@override
@JsonKey(name: "discount_amount")
int? get discountAmount;
@override
@JsonKey(name: "total_amount")
int? get totalAmount;
@override
@JsonKey(name: "total_cost")
num? get totalCost;
@override
@JsonKey(name: "remaining_amount")
int? get remainingAmount;
@override
@JsonKey(name: "payment_status")
String? get paymentStatus;
@override
@JsonKey(name: "refund_amount")
int? get refundAmount;
@override
@JsonKey(name: "is_void")
bool? get isVoid;
@override
@JsonKey(name: "is_refund")
bool? get isRefund;
@override
@JsonKey(name: "notes")
String? get notes;
@override
@JsonKey(name: "metadata")
Map<String, dynamic>? get metadata;
@override
@JsonKey(name: "created_at")
String? get createdAt;
@override
@JsonKey(name: "updated_at")
String? get updatedAt;
@override
@JsonKey(name: "order_items")
List<OrderItemDto>? get orderItems;
@override
@JsonKey(name: "payments")
List<PaymentOrderDto>? get payments;
@override
@JsonKey(name: "total_paid")
int? get totalPaid;
@override
@JsonKey(name: "payment_count")
int? get paymentCount;
@override
@JsonKey(name: "split_type")
String? get splitType;
/// Create a copy of OrderDto
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$OrderDtoImplCopyWith<_$OrderDtoImpl> get copyWith =>
throw _privateConstructorUsedError;
}
OrderItemDto _$OrderItemDtoFromJson(Map<String, dynamic> json) {
return _OrderItemDto.fromJson(json);
}
/// @nodoc
mixin _$OrderItemDto {
@JsonKey(name: "id")
String? get id => throw _privateConstructorUsedError;
@JsonKey(name: "order_id")
String? get orderId => throw _privateConstructorUsedError;
@JsonKey(name: "product_id")
String? get productId => throw _privateConstructorUsedError;
@JsonKey(name: "product_name")
String? get productName => throw _privateConstructorUsedError;
@JsonKey(name: "product_variant_id")
String? get productVariantId => throw _privateConstructorUsedError;
@JsonKey(name: "product_variant_name")
String? get productVariantName => throw _privateConstructorUsedError;
@JsonKey(name: "quantity")
int? get quantity => throw _privateConstructorUsedError;
@JsonKey(name: "unit_price")
int? get unitPrice => throw _privateConstructorUsedError;
@JsonKey(name: "total_price")
int? get totalPrice => throw _privateConstructorUsedError;
@JsonKey(name: "modifiers")
List<dynamic>? get modifiers => throw _privateConstructorUsedError;
@JsonKey(name: "notes")
String? get notes => throw _privateConstructorUsedError;
@JsonKey(name: "status")
String? get status => throw _privateConstructorUsedError;
@JsonKey(name: "created_at")
String? get createdAt => throw _privateConstructorUsedError;
@JsonKey(name: "updated_at")
String? get updatedAt => throw _privateConstructorUsedError;
@JsonKey(name: "printer_type")
String? get printerType => throw _privateConstructorUsedError;
@JsonKey(name: "paid_quantity")
int? get paidQuantity => throw _privateConstructorUsedError;
/// Serializes this OrderItemDto to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of OrderItemDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$OrderItemDtoCopyWith<OrderItemDto> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $OrderItemDtoCopyWith<$Res> {
factory $OrderItemDtoCopyWith(
OrderItemDto value,
$Res Function(OrderItemDto) then,
) = _$OrderItemDtoCopyWithImpl<$Res, OrderItemDto>;
@useResult
$Res call({
@JsonKey(name: "id") String? id,
@JsonKey(name: "order_id") String? orderId,
@JsonKey(name: "product_id") String? productId,
@JsonKey(name: "product_name") String? productName,
@JsonKey(name: "product_variant_id") String? productVariantId,
@JsonKey(name: "product_variant_name") String? productVariantName,
@JsonKey(name: "quantity") int? quantity,
@JsonKey(name: "unit_price") int? unitPrice,
@JsonKey(name: "total_price") int? totalPrice,
@JsonKey(name: "modifiers") List<dynamic>? modifiers,
@JsonKey(name: "notes") String? notes,
@JsonKey(name: "status") String? status,
@JsonKey(name: "created_at") String? createdAt,
@JsonKey(name: "updated_at") String? updatedAt,
@JsonKey(name: "printer_type") String? printerType,
@JsonKey(name: "paid_quantity") int? paidQuantity,
});
}
/// @nodoc
class _$OrderItemDtoCopyWithImpl<$Res, $Val extends OrderItemDto>
implements $OrderItemDtoCopyWith<$Res> {
_$OrderItemDtoCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of OrderItemDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = freezed,
Object? orderId = freezed,
Object? productId = freezed,
Object? productName = freezed,
Object? productVariantId = freezed,
Object? productVariantName = freezed,
Object? quantity = freezed,
Object? unitPrice = freezed,
Object? totalPrice = freezed,
Object? modifiers = freezed,
Object? notes = freezed,
Object? status = freezed,
Object? createdAt = freezed,
Object? updatedAt = freezed,
Object? printerType = freezed,
Object? paidQuantity = freezed,
}) {
return _then(
_value.copyWith(
id: freezed == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String?,
orderId: freezed == orderId
? _value.orderId
: orderId // ignore: cast_nullable_to_non_nullable
as String?,
productId: freezed == productId
? _value.productId
: productId // ignore: cast_nullable_to_non_nullable
as String?,
productName: freezed == productName
? _value.productName
: productName // ignore: cast_nullable_to_non_nullable
as String?,
productVariantId: freezed == productVariantId
? _value.productVariantId
: productVariantId // ignore: cast_nullable_to_non_nullable
as String?,
productVariantName: freezed == productVariantName
? _value.productVariantName
: productVariantName // 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?,
totalPrice: freezed == totalPrice
? _value.totalPrice
: totalPrice // ignore: cast_nullable_to_non_nullable
as int?,
modifiers: freezed == modifiers
? _value.modifiers
: modifiers // ignore: cast_nullable_to_non_nullable
as List<dynamic>?,
notes: freezed == notes
? _value.notes
: notes // ignore: cast_nullable_to_non_nullable
as String?,
status: freezed == status
? _value.status
: status // ignore: cast_nullable_to_non_nullable
as String?,
createdAt: freezed == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as String?,
updatedAt: freezed == updatedAt
? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as String?,
printerType: freezed == printerType
? _value.printerType
: printerType // ignore: cast_nullable_to_non_nullable
as String?,
paidQuantity: freezed == paidQuantity
? _value.paidQuantity
: paidQuantity // ignore: cast_nullable_to_non_nullable
as int?,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$OrderItemDtoImplCopyWith<$Res>
implements $OrderItemDtoCopyWith<$Res> {
factory _$$OrderItemDtoImplCopyWith(
_$OrderItemDtoImpl value,
$Res Function(_$OrderItemDtoImpl) then,
) = __$$OrderItemDtoImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
@JsonKey(name: "id") String? id,
@JsonKey(name: "order_id") String? orderId,
@JsonKey(name: "product_id") String? productId,
@JsonKey(name: "product_name") String? productName,
@JsonKey(name: "product_variant_id") String? productVariantId,
@JsonKey(name: "product_variant_name") String? productVariantName,
@JsonKey(name: "quantity") int? quantity,
@JsonKey(name: "unit_price") int? unitPrice,
@JsonKey(name: "total_price") int? totalPrice,
@JsonKey(name: "modifiers") List<dynamic>? modifiers,
@JsonKey(name: "notes") String? notes,
@JsonKey(name: "status") String? status,
@JsonKey(name: "created_at") String? createdAt,
@JsonKey(name: "updated_at") String? updatedAt,
@JsonKey(name: "printer_type") String? printerType,
@JsonKey(name: "paid_quantity") int? paidQuantity,
});
}
/// @nodoc
class __$$OrderItemDtoImplCopyWithImpl<$Res>
extends _$OrderItemDtoCopyWithImpl<$Res, _$OrderItemDtoImpl>
implements _$$OrderItemDtoImplCopyWith<$Res> {
__$$OrderItemDtoImplCopyWithImpl(
_$OrderItemDtoImpl _value,
$Res Function(_$OrderItemDtoImpl) _then,
) : super(_value, _then);
/// Create a copy of OrderItemDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = freezed,
Object? orderId = freezed,
Object? productId = freezed,
Object? productName = freezed,
Object? productVariantId = freezed,
Object? productVariantName = freezed,
Object? quantity = freezed,
Object? unitPrice = freezed,
Object? totalPrice = freezed,
Object? modifiers = freezed,
Object? notes = freezed,
Object? status = freezed,
Object? createdAt = freezed,
Object? updatedAt = freezed,
Object? printerType = freezed,
Object? paidQuantity = freezed,
}) {
return _then(
_$OrderItemDtoImpl(
id: freezed == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String?,
orderId: freezed == orderId
? _value.orderId
: orderId // ignore: cast_nullable_to_non_nullable
as String?,
productId: freezed == productId
? _value.productId
: productId // ignore: cast_nullable_to_non_nullable
as String?,
productName: freezed == productName
? _value.productName
: productName // ignore: cast_nullable_to_non_nullable
as String?,
productVariantId: freezed == productVariantId
? _value.productVariantId
: productVariantId // ignore: cast_nullable_to_non_nullable
as String?,
productVariantName: freezed == productVariantName
? _value.productVariantName
: productVariantName // 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?,
totalPrice: freezed == totalPrice
? _value.totalPrice
: totalPrice // ignore: cast_nullable_to_non_nullable
as int?,
modifiers: freezed == modifiers
? _value._modifiers
: modifiers // ignore: cast_nullable_to_non_nullable
as List<dynamic>?,
notes: freezed == notes
? _value.notes
: notes // ignore: cast_nullable_to_non_nullable
as String?,
status: freezed == status
? _value.status
: status // ignore: cast_nullable_to_non_nullable
as String?,
createdAt: freezed == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as String?,
updatedAt: freezed == updatedAt
? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as String?,
printerType: freezed == printerType
? _value.printerType
: printerType // ignore: cast_nullable_to_non_nullable
as String?,
paidQuantity: freezed == paidQuantity
? _value.paidQuantity
: paidQuantity // ignore: cast_nullable_to_non_nullable
as int?,
),
);
}
}
/// @nodoc
@JsonSerializable()
class _$OrderItemDtoImpl extends _OrderItemDto {
const _$OrderItemDtoImpl({
@JsonKey(name: "id") this.id,
@JsonKey(name: "order_id") this.orderId,
@JsonKey(name: "product_id") this.productId,
@JsonKey(name: "product_name") this.productName,
@JsonKey(name: "product_variant_id") this.productVariantId,
@JsonKey(name: "product_variant_name") this.productVariantName,
@JsonKey(name: "quantity") this.quantity,
@JsonKey(name: "unit_price") this.unitPrice,
@JsonKey(name: "total_price") this.totalPrice,
@JsonKey(name: "modifiers") final List<dynamic>? modifiers,
@JsonKey(name: "notes") this.notes,
@JsonKey(name: "status") this.status,
@JsonKey(name: "created_at") this.createdAt,
@JsonKey(name: "updated_at") this.updatedAt,
@JsonKey(name: "printer_type") this.printerType,
@JsonKey(name: "paid_quantity") this.paidQuantity,
}) : _modifiers = modifiers,
super._();
factory _$OrderItemDtoImpl.fromJson(Map<String, dynamic> json) =>
_$$OrderItemDtoImplFromJson(json);
@override
@JsonKey(name: "id")
final String? id;
@override
@JsonKey(name: "order_id")
final String? orderId;
@override
@JsonKey(name: "product_id")
final String? productId;
@override
@JsonKey(name: "product_name")
final String? productName;
@override
@JsonKey(name: "product_variant_id")
final String? productVariantId;
@override
@JsonKey(name: "product_variant_name")
final String? productVariantName;
@override
@JsonKey(name: "quantity")
final int? quantity;
@override
@JsonKey(name: "unit_price")
final int? unitPrice;
@override
@JsonKey(name: "total_price")
final int? totalPrice;
final List<dynamic>? _modifiers;
@override
@JsonKey(name: "modifiers")
List<dynamic>? get modifiers {
final value = _modifiers;
if (value == null) return null;
if (_modifiers is EqualUnmodifiableListView) return _modifiers;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
@override
@JsonKey(name: "notes")
final String? notes;
@override
@JsonKey(name: "status")
final String? status;
@override
@JsonKey(name: "created_at")
final String? createdAt;
@override
@JsonKey(name: "updated_at")
final String? updatedAt;
@override
@JsonKey(name: "printer_type")
final String? printerType;
@override
@JsonKey(name: "paid_quantity")
final int? paidQuantity;
@override
String toString() {
return 'OrderItemDto(id: $id, orderId: $orderId, productId: $productId, productName: $productName, productVariantId: $productVariantId, productVariantName: $productVariantName, quantity: $quantity, unitPrice: $unitPrice, totalPrice: $totalPrice, modifiers: $modifiers, notes: $notes, status: $status, createdAt: $createdAt, updatedAt: $updatedAt, printerType: $printerType, paidQuantity: $paidQuantity)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$OrderItemDtoImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.orderId, orderId) || other.orderId == orderId) &&
(identical(other.productId, productId) ||
other.productId == productId) &&
(identical(other.productName, productName) ||
other.productName == productName) &&
(identical(other.productVariantId, productVariantId) ||
other.productVariantId == productVariantId) &&
(identical(other.productVariantName, productVariantName) ||
other.productVariantName == productVariantName) &&
(identical(other.quantity, quantity) ||
other.quantity == quantity) &&
(identical(other.unitPrice, unitPrice) ||
other.unitPrice == unitPrice) &&
(identical(other.totalPrice, totalPrice) ||
other.totalPrice == totalPrice) &&
const DeepCollectionEquality().equals(
other._modifiers,
_modifiers,
) &&
(identical(other.notes, notes) || other.notes == notes) &&
(identical(other.status, status) || other.status == status) &&
(identical(other.createdAt, createdAt) ||
other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) ||
other.updatedAt == updatedAt) &&
(identical(other.printerType, printerType) ||
other.printerType == printerType) &&
(identical(other.paidQuantity, paidQuantity) ||
other.paidQuantity == paidQuantity));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
id,
orderId,
productId,
productName,
productVariantId,
productVariantName,
quantity,
unitPrice,
totalPrice,
const DeepCollectionEquality().hash(_modifiers),
notes,
status,
createdAt,
updatedAt,
printerType,
paidQuantity,
);
/// Create a copy of OrderItemDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$OrderItemDtoImplCopyWith<_$OrderItemDtoImpl> get copyWith =>
__$$OrderItemDtoImplCopyWithImpl<_$OrderItemDtoImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$OrderItemDtoImplToJson(this);
}
}
abstract class _OrderItemDto extends OrderItemDto {
const factory _OrderItemDto({
@JsonKey(name: "id") final String? id,
@JsonKey(name: "order_id") final String? orderId,
@JsonKey(name: "product_id") final String? productId,
@JsonKey(name: "product_name") final String? productName,
@JsonKey(name: "product_variant_id") final String? productVariantId,
@JsonKey(name: "product_variant_name") final String? productVariantName,
@JsonKey(name: "quantity") final int? quantity,
@JsonKey(name: "unit_price") final int? unitPrice,
@JsonKey(name: "total_price") final int? totalPrice,
@JsonKey(name: "modifiers") final List<dynamic>? modifiers,
@JsonKey(name: "notes") final String? notes,
@JsonKey(name: "status") final String? status,
@JsonKey(name: "created_at") final String? createdAt,
@JsonKey(name: "updated_at") final String? updatedAt,
@JsonKey(name: "printer_type") final String? printerType,
@JsonKey(name: "paid_quantity") final int? paidQuantity,
}) = _$OrderItemDtoImpl;
const _OrderItemDto._() : super._();
factory _OrderItemDto.fromJson(Map<String, dynamic> json) =
_$OrderItemDtoImpl.fromJson;
@override
@JsonKey(name: "id")
String? get id;
@override
@JsonKey(name: "order_id")
String? get orderId;
@override
@JsonKey(name: "product_id")
String? get productId;
@override
@JsonKey(name: "product_name")
String? get productName;
@override
@JsonKey(name: "product_variant_id")
String? get productVariantId;
@override
@JsonKey(name: "product_variant_name")
String? get productVariantName;
@override
@JsonKey(name: "quantity")
int? get quantity;
@override
@JsonKey(name: "unit_price")
int? get unitPrice;
@override
@JsonKey(name: "total_price")
int? get totalPrice;
@override
@JsonKey(name: "modifiers")
List<dynamic>? get modifiers;
@override
@JsonKey(name: "notes")
String? get notes;
@override
@JsonKey(name: "status")
String? get status;
@override
@JsonKey(name: "created_at")
String? get createdAt;
@override
@JsonKey(name: "updated_at")
String? get updatedAt;
@override
@JsonKey(name: "printer_type")
String? get printerType;
@override
@JsonKey(name: "paid_quantity")
int? get paidQuantity;
/// Create a copy of OrderItemDto
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$OrderItemDtoImplCopyWith<_$OrderItemDtoImpl> get copyWith =>
throw _privateConstructorUsedError;
}
PaymentOrderDto _$PaymentOrderDtoFromJson(Map<String, dynamic> json) {
return _PaymentOrderDto.fromJson(json);
}
/// @nodoc
mixin _$PaymentOrderDto {
@JsonKey(name: "id")
String? get id => throw _privateConstructorUsedError;
@JsonKey(name: "order_id")
String? get orderId => throw _privateConstructorUsedError;
@JsonKey(name: "payment_method_id")
String? get paymentMethodId => throw _privateConstructorUsedError;
@JsonKey(name: "payment_method_name")
String? get paymentMethodName => throw _privateConstructorUsedError;
@JsonKey(name: "payment_method_type")
String? get paymentMethodType => throw _privateConstructorUsedError;
@JsonKey(name: "amount")
int? get amount => throw _privateConstructorUsedError;
@JsonKey(name: "status")
String? get status => throw _privateConstructorUsedError;
@JsonKey(name: "split_number")
int? get splitNumber => throw _privateConstructorUsedError;
@JsonKey(name: "split_total")
int? get splitTotal => throw _privateConstructorUsedError;
@JsonKey(name: "split_description")
String? get splitDescription => throw _privateConstructorUsedError;
@JsonKey(name: "refund_amount")
int? get refundAmount => throw _privateConstructorUsedError;
@JsonKey(name: "metadata")
Map<String, dynamic>? get metadata => throw _privateConstructorUsedError;
@JsonKey(name: "created_at")
String? get createdAt => throw _privateConstructorUsedError;
@JsonKey(name: "updated_at")
String? get updatedAt => throw _privateConstructorUsedError;
/// Serializes this PaymentOrderDto to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of PaymentOrderDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$PaymentOrderDtoCopyWith<PaymentOrderDto> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $PaymentOrderDtoCopyWith<$Res> {
factory $PaymentOrderDtoCopyWith(
PaymentOrderDto value,
$Res Function(PaymentOrderDto) then,
) = _$PaymentOrderDtoCopyWithImpl<$Res, PaymentOrderDto>;
@useResult
$Res call({
@JsonKey(name: "id") String? id,
@JsonKey(name: "order_id") String? orderId,
@JsonKey(name: "payment_method_id") String? paymentMethodId,
@JsonKey(name: "payment_method_name") String? paymentMethodName,
@JsonKey(name: "payment_method_type") String? paymentMethodType,
@JsonKey(name: "amount") int? amount,
@JsonKey(name: "status") String? status,
@JsonKey(name: "split_number") int? splitNumber,
@JsonKey(name: "split_total") int? splitTotal,
@JsonKey(name: "split_description") String? splitDescription,
@JsonKey(name: "refund_amount") int? refundAmount,
@JsonKey(name: "metadata") Map<String, dynamic>? metadata,
@JsonKey(name: "created_at") String? createdAt,
@JsonKey(name: "updated_at") String? updatedAt,
});
}
/// @nodoc
class _$PaymentOrderDtoCopyWithImpl<$Res, $Val extends PaymentOrderDto>
implements $PaymentOrderDtoCopyWith<$Res> {
_$PaymentOrderDtoCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of PaymentOrderDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = freezed,
Object? orderId = freezed,
Object? paymentMethodId = freezed,
Object? paymentMethodName = freezed,
Object? paymentMethodType = freezed,
Object? amount = freezed,
Object? status = freezed,
Object? splitNumber = freezed,
Object? splitTotal = freezed,
Object? splitDescription = freezed,
Object? refundAmount = freezed,
Object? metadata = freezed,
Object? createdAt = freezed,
Object? updatedAt = freezed,
}) {
return _then(
_value.copyWith(
id: freezed == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String?,
orderId: freezed == orderId
? _value.orderId
: orderId // ignore: cast_nullable_to_non_nullable
as String?,
paymentMethodId: freezed == paymentMethodId
? _value.paymentMethodId
: paymentMethodId // ignore: cast_nullable_to_non_nullable
as String?,
paymentMethodName: freezed == paymentMethodName
? _value.paymentMethodName
: paymentMethodName // ignore: cast_nullable_to_non_nullable
as String?,
paymentMethodType: freezed == paymentMethodType
? _value.paymentMethodType
: paymentMethodType // ignore: cast_nullable_to_non_nullable
as String?,
amount: freezed == amount
? _value.amount
: amount // ignore: cast_nullable_to_non_nullable
as int?,
status: freezed == status
? _value.status
: status // ignore: cast_nullable_to_non_nullable
as String?,
splitNumber: freezed == splitNumber
? _value.splitNumber
: splitNumber // ignore: cast_nullable_to_non_nullable
as int?,
splitTotal: freezed == splitTotal
? _value.splitTotal
: splitTotal // ignore: cast_nullable_to_non_nullable
as int?,
splitDescription: freezed == splitDescription
? _value.splitDescription
: splitDescription // ignore: cast_nullable_to_non_nullable
as String?,
refundAmount: freezed == refundAmount
? _value.refundAmount
: refundAmount // ignore: cast_nullable_to_non_nullable
as int?,
metadata: freezed == metadata
? _value.metadata
: metadata // ignore: cast_nullable_to_non_nullable
as Map<String, dynamic>?,
createdAt: freezed == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as String?,
updatedAt: freezed == updatedAt
? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as String?,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$PaymentOrderDtoImplCopyWith<$Res>
implements $PaymentOrderDtoCopyWith<$Res> {
factory _$$PaymentOrderDtoImplCopyWith(
_$PaymentOrderDtoImpl value,
$Res Function(_$PaymentOrderDtoImpl) then,
) = __$$PaymentOrderDtoImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
@JsonKey(name: "id") String? id,
@JsonKey(name: "order_id") String? orderId,
@JsonKey(name: "payment_method_id") String? paymentMethodId,
@JsonKey(name: "payment_method_name") String? paymentMethodName,
@JsonKey(name: "payment_method_type") String? paymentMethodType,
@JsonKey(name: "amount") int? amount,
@JsonKey(name: "status") String? status,
@JsonKey(name: "split_number") int? splitNumber,
@JsonKey(name: "split_total") int? splitTotal,
@JsonKey(name: "split_description") String? splitDescription,
@JsonKey(name: "refund_amount") int? refundAmount,
@JsonKey(name: "metadata") Map<String, dynamic>? metadata,
@JsonKey(name: "created_at") String? createdAt,
@JsonKey(name: "updated_at") String? updatedAt,
});
}
/// @nodoc
class __$$PaymentOrderDtoImplCopyWithImpl<$Res>
extends _$PaymentOrderDtoCopyWithImpl<$Res, _$PaymentOrderDtoImpl>
implements _$$PaymentOrderDtoImplCopyWith<$Res> {
__$$PaymentOrderDtoImplCopyWithImpl(
_$PaymentOrderDtoImpl _value,
$Res Function(_$PaymentOrderDtoImpl) _then,
) : super(_value, _then);
/// Create a copy of PaymentOrderDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = freezed,
Object? orderId = freezed,
Object? paymentMethodId = freezed,
Object? paymentMethodName = freezed,
Object? paymentMethodType = freezed,
Object? amount = freezed,
Object? status = freezed,
Object? splitNumber = freezed,
Object? splitTotal = freezed,
Object? splitDescription = freezed,
Object? refundAmount = freezed,
Object? metadata = freezed,
Object? createdAt = freezed,
Object? updatedAt = freezed,
}) {
return _then(
_$PaymentOrderDtoImpl(
id: freezed == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String?,
orderId: freezed == orderId
? _value.orderId
: orderId // ignore: cast_nullable_to_non_nullable
as String?,
paymentMethodId: freezed == paymentMethodId
? _value.paymentMethodId
: paymentMethodId // ignore: cast_nullable_to_non_nullable
as String?,
paymentMethodName: freezed == paymentMethodName
? _value.paymentMethodName
: paymentMethodName // ignore: cast_nullable_to_non_nullable
as String?,
paymentMethodType: freezed == paymentMethodType
? _value.paymentMethodType
: paymentMethodType // ignore: cast_nullable_to_non_nullable
as String?,
amount: freezed == amount
? _value.amount
: amount // ignore: cast_nullable_to_non_nullable
as int?,
status: freezed == status
? _value.status
: status // ignore: cast_nullable_to_non_nullable
as String?,
splitNumber: freezed == splitNumber
? _value.splitNumber
: splitNumber // ignore: cast_nullable_to_non_nullable
as int?,
splitTotal: freezed == splitTotal
? _value.splitTotal
: splitTotal // ignore: cast_nullable_to_non_nullable
as int?,
splitDescription: freezed == splitDescription
? _value.splitDescription
: splitDescription // ignore: cast_nullable_to_non_nullable
as String?,
refundAmount: freezed == refundAmount
? _value.refundAmount
: refundAmount // ignore: cast_nullable_to_non_nullable
as int?,
metadata: freezed == metadata
? _value._metadata
: metadata // ignore: cast_nullable_to_non_nullable
as Map<String, dynamic>?,
createdAt: freezed == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as String?,
updatedAt: freezed == updatedAt
? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as String?,
),
);
}
}
/// @nodoc
@JsonSerializable()
class _$PaymentOrderDtoImpl extends _PaymentOrderDto {
const _$PaymentOrderDtoImpl({
@JsonKey(name: "id") this.id,
@JsonKey(name: "order_id") this.orderId,
@JsonKey(name: "payment_method_id") this.paymentMethodId,
@JsonKey(name: "payment_method_name") this.paymentMethodName,
@JsonKey(name: "payment_method_type") this.paymentMethodType,
@JsonKey(name: "amount") this.amount,
@JsonKey(name: "status") this.status,
@JsonKey(name: "split_number") this.splitNumber,
@JsonKey(name: "split_total") this.splitTotal,
@JsonKey(name: "split_description") this.splitDescription,
@JsonKey(name: "refund_amount") this.refundAmount,
@JsonKey(name: "metadata") final Map<String, dynamic>? metadata,
@JsonKey(name: "created_at") this.createdAt,
@JsonKey(name: "updated_at") this.updatedAt,
}) : _metadata = metadata,
super._();
factory _$PaymentOrderDtoImpl.fromJson(Map<String, dynamic> json) =>
_$$PaymentOrderDtoImplFromJson(json);
@override
@JsonKey(name: "id")
final String? id;
@override
@JsonKey(name: "order_id")
final String? orderId;
@override
@JsonKey(name: "payment_method_id")
final String? paymentMethodId;
@override
@JsonKey(name: "payment_method_name")
final String? paymentMethodName;
@override
@JsonKey(name: "payment_method_type")
final String? paymentMethodType;
@override
@JsonKey(name: "amount")
final int? amount;
@override
@JsonKey(name: "status")
final String? status;
@override
@JsonKey(name: "split_number")
final int? splitNumber;
@override
@JsonKey(name: "split_total")
final int? splitTotal;
@override
@JsonKey(name: "split_description")
final String? splitDescription;
@override
@JsonKey(name: "refund_amount")
final int? refundAmount;
final Map<String, dynamic>? _metadata;
@override
@JsonKey(name: "metadata")
Map<String, dynamic>? get metadata {
final value = _metadata;
if (value == null) return null;
if (_metadata is EqualUnmodifiableMapView) return _metadata;
// ignore: implicit_dynamic_type
return EqualUnmodifiableMapView(value);
}
@override
@JsonKey(name: "created_at")
final String? createdAt;
@override
@JsonKey(name: "updated_at")
final String? updatedAt;
@override
String toString() {
return 'PaymentOrderDto(id: $id, orderId: $orderId, paymentMethodId: $paymentMethodId, paymentMethodName: $paymentMethodName, paymentMethodType: $paymentMethodType, amount: $amount, status: $status, splitNumber: $splitNumber, splitTotal: $splitTotal, splitDescription: $splitDescription, refundAmount: $refundAmount, metadata: $metadata, createdAt: $createdAt, updatedAt: $updatedAt)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$PaymentOrderDtoImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.orderId, orderId) || other.orderId == orderId) &&
(identical(other.paymentMethodId, paymentMethodId) ||
other.paymentMethodId == paymentMethodId) &&
(identical(other.paymentMethodName, paymentMethodName) ||
other.paymentMethodName == paymentMethodName) &&
(identical(other.paymentMethodType, paymentMethodType) ||
other.paymentMethodType == paymentMethodType) &&
(identical(other.amount, amount) || other.amount == amount) &&
(identical(other.status, status) || other.status == status) &&
(identical(other.splitNumber, splitNumber) ||
other.splitNumber == splitNumber) &&
(identical(other.splitTotal, splitTotal) ||
other.splitTotal == splitTotal) &&
(identical(other.splitDescription, splitDescription) ||
other.splitDescription == splitDescription) &&
(identical(other.refundAmount, refundAmount) ||
other.refundAmount == refundAmount) &&
const DeepCollectionEquality().equals(other._metadata, _metadata) &&
(identical(other.createdAt, createdAt) ||
other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) ||
other.updatedAt == updatedAt));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
id,
orderId,
paymentMethodId,
paymentMethodName,
paymentMethodType,
amount,
status,
splitNumber,
splitTotal,
splitDescription,
refundAmount,
const DeepCollectionEquality().hash(_metadata),
createdAt,
updatedAt,
);
/// Create a copy of PaymentOrderDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$PaymentOrderDtoImplCopyWith<_$PaymentOrderDtoImpl> get copyWith =>
__$$PaymentOrderDtoImplCopyWithImpl<_$PaymentOrderDtoImpl>(
this,
_$identity,
);
@override
Map<String, dynamic> toJson() {
return _$$PaymentOrderDtoImplToJson(this);
}
}
abstract class _PaymentOrderDto extends PaymentOrderDto {
const factory _PaymentOrderDto({
@JsonKey(name: "id") final String? id,
@JsonKey(name: "order_id") final String? orderId,
@JsonKey(name: "payment_method_id") final String? paymentMethodId,
@JsonKey(name: "payment_method_name") final String? paymentMethodName,
@JsonKey(name: "payment_method_type") final String? paymentMethodType,
@JsonKey(name: "amount") final int? amount,
@JsonKey(name: "status") final String? status,
@JsonKey(name: "split_number") final int? splitNumber,
@JsonKey(name: "split_total") final int? splitTotal,
@JsonKey(name: "split_description") final String? splitDescription,
@JsonKey(name: "refund_amount") final int? refundAmount,
@JsonKey(name: "metadata") final Map<String, dynamic>? metadata,
@JsonKey(name: "created_at") final String? createdAt,
@JsonKey(name: "updated_at") final String? updatedAt,
}) = _$PaymentOrderDtoImpl;
const _PaymentOrderDto._() : super._();
factory _PaymentOrderDto.fromJson(Map<String, dynamic> json) =
_$PaymentOrderDtoImpl.fromJson;
@override
@JsonKey(name: "id")
String? get id;
@override
@JsonKey(name: "order_id")
String? get orderId;
@override
@JsonKey(name: "payment_method_id")
String? get paymentMethodId;
@override
@JsonKey(name: "payment_method_name")
String? get paymentMethodName;
@override
@JsonKey(name: "payment_method_type")
String? get paymentMethodType;
@override
@JsonKey(name: "amount")
int? get amount;
@override
@JsonKey(name: "status")
String? get status;
@override
@JsonKey(name: "split_number")
int? get splitNumber;
@override
@JsonKey(name: "split_total")
int? get splitTotal;
@override
@JsonKey(name: "split_description")
String? get splitDescription;
@override
@JsonKey(name: "refund_amount")
int? get refundAmount;
@override
@JsonKey(name: "metadata")
Map<String, dynamic>? get metadata;
@override
@JsonKey(name: "created_at")
String? get createdAt;
@override
@JsonKey(name: "updated_at")
String? get updatedAt;
/// Create a copy of PaymentOrderDto
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$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;
}