apskel-pos-flutter-v2/lib/infrastructure/order/order_dtos.freezed.dart

3636 lines
126 KiB
Dart
Raw Normal View History

2025-10-27 21:55:19 +07:00
// 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")
2025-10-28 00:58:39 +07:00
List<PaymentDto>? get payments => throw _privateConstructorUsedError;
2025-10-27 21:55:19 +07:00
@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,
2025-10-28 00:58:39 +07:00
@JsonKey(name: "payments") List<PaymentDto>? payments,
2025-10-27 21:55:19 +07:00
@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
2025-10-28 00:58:39 +07:00
as List<PaymentDto>?,
2025-10-27 21:55:19 +07:00
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,
2025-10-28 00:58:39 +07:00
@JsonKey(name: "payments") List<PaymentDto>? payments,
2025-10-27 21:55:19 +07:00
@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
2025-10-28 00:58:39 +07:00
as List<PaymentDto>?,
2025-10-27 21:55:19 +07:00
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,
2025-10-28 00:58:39 +07:00
@JsonKey(name: "payments") final List<PaymentDto>? payments,
2025-10-27 21:55:19 +07:00
@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);
}
2025-10-28 00:58:39 +07:00
final List<PaymentDto>? _payments;
2025-10-27 21:55:19 +07:00
@override
@JsonKey(name: "payments")
2025-10-28 00:58:39 +07:00
List<PaymentDto>? get payments {
2025-10-27 21:55:19 +07:00
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,
2025-10-28 00:58:39 +07:00
@JsonKey(name: "payments") final List<PaymentDto>? payments,
2025-10-27 21:55:19 +07:00
@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")
2025-10-28 00:58:39 +07:00
List<PaymentDto>? get payments;
2025-10-27 21:55:19 +07:00
@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;
}
2025-10-28 00:58:39 +07:00
OrderRequestDto _$OrderRequestDtoFromJson(Map<String, dynamic> json) {
return _OrderRequestDto.fromJson(json);
2025-10-27 21:55:19 +07:00
}
/// @nodoc
2025-10-28 00:58:39 +07:00
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;
2025-10-27 21:55:19 +07:00
2025-10-28 00:58:39 +07:00
/// Serializes this OrderRequestDto to a JSON map.
2025-10-27 21:55:19 +07:00
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
2025-10-28 00:58:39 +07:00
/// Create a copy of OrderRequestDto
2025-10-27 21:55:19 +07:00
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
2025-10-28 00:58:39 +07:00
$OrderRequestDtoCopyWith<OrderRequestDto> get copyWith =>
2025-10-27 21:55:19 +07:00
throw _privateConstructorUsedError;
}
/// @nodoc
2025-10-28 00:58:39 +07:00
abstract class $OrderRequestDtoCopyWith<$Res> {
factory $OrderRequestDtoCopyWith(
OrderRequestDto value,
$Res Function(OrderRequestDto) then,
) = _$OrderRequestDtoCopyWithImpl<$Res, OrderRequestDto>;
2025-10-27 21:55:19 +07:00
@useResult
$Res call({
2025-10-28 00:58:39 +07:00
@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,
2025-10-27 21:55:19 +07:00
});
}
/// @nodoc
2025-10-28 00:58:39 +07:00
class _$OrderRequestDtoCopyWithImpl<$Res, $Val extends OrderRequestDto>
implements $OrderRequestDtoCopyWith<$Res> {
_$OrderRequestDtoCopyWithImpl(this._value, this._then);
2025-10-27 21:55:19 +07:00
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
2025-10-28 00:58:39 +07:00
/// Create a copy of OrderRequestDto
2025-10-27 21:55:19 +07:00
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
2025-10-28 00:58:39 +07:00
Object? outletId = freezed,
Object? customerId = freezed,
Object? tableNumber = freezed,
Object? tableId = freezed,
Object? orderType = freezed,
Object? notes = freezed,
Object? orderItems = freezed,
Object? customerName = freezed,
2025-10-27 21:55:19 +07:00
}) {
return _then(
_value.copyWith(
2025-10-28 00:58:39 +07:00
outletId: freezed == outletId
? _value.outletId
: outletId // ignore: cast_nullable_to_non_nullable
2025-10-27 21:55:19 +07:00
as String?,
2025-10-28 00:58:39 +07:00
customerId: freezed == customerId
? _value.customerId
: customerId // ignore: cast_nullable_to_non_nullable
2025-10-27 21:55:19 +07:00
as String?,
2025-10-28 00:58:39 +07:00
tableNumber: freezed == tableNumber
? _value.tableNumber
: tableNumber // ignore: cast_nullable_to_non_nullable
2025-10-27 21:55:19 +07:00
as String?,
2025-10-28 00:58:39 +07:00
tableId: freezed == tableId
? _value.tableId
: tableId // ignore: cast_nullable_to_non_nullable
2025-10-27 21:55:19 +07:00
as String?,
2025-10-28 00:58:39 +07:00
orderType: freezed == orderType
? _value.orderType
: orderType // ignore: cast_nullable_to_non_nullable
2025-10-27 21:55:19 +07:00
as String?,
2025-10-28 00:58:39 +07:00
notes: freezed == notes
? _value.notes
: notes // ignore: cast_nullable_to_non_nullable
2025-10-27 21:55:19 +07:00
as String?,
2025-10-28 00:58:39 +07:00
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
2025-10-27 21:55:19 +07:00
as String?,
)
as $Val,
);
}
}
/// @nodoc
2025-10-28 00:58:39 +07:00
abstract class _$$OrderRequestDtoImplCopyWith<$Res>
implements $OrderRequestDtoCopyWith<$Res> {
factory _$$OrderRequestDtoImplCopyWith(
_$OrderRequestDtoImpl value,
$Res Function(_$OrderRequestDtoImpl) then,
) = __$$OrderRequestDtoImplCopyWithImpl<$Res>;
2025-10-27 21:55:19 +07:00
@override
@useResult
$Res call({
2025-10-28 00:58:39 +07:00
@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,
2025-10-27 21:55:19 +07:00
});
}
/// @nodoc
2025-10-28 00:58:39 +07:00
class __$$OrderRequestDtoImplCopyWithImpl<$Res>
extends _$OrderRequestDtoCopyWithImpl<$Res, _$OrderRequestDtoImpl>
implements _$$OrderRequestDtoImplCopyWith<$Res> {
__$$OrderRequestDtoImplCopyWithImpl(
_$OrderRequestDtoImpl _value,
$Res Function(_$OrderRequestDtoImpl) _then,
2025-10-27 21:55:19 +07:00
) : super(_value, _then);
2025-10-28 00:58:39 +07:00
/// Create a copy of OrderRequestDto
2025-10-27 21:55:19 +07:00
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
2025-10-28 00:58:39 +07:00
Object? outletId = freezed,
Object? customerId = freezed,
Object? tableNumber = freezed,
Object? tableId = freezed,
Object? orderType = freezed,
Object? notes = freezed,
Object? orderItems = freezed,
Object? customerName = freezed,
2025-10-27 21:55:19 +07:00
}) {
return _then(
2025-10-28 00:58:39 +07:00
_$OrderRequestDtoImpl(
outletId: freezed == outletId
? _value.outletId
: outletId // ignore: cast_nullable_to_non_nullable
2025-10-27 21:55:19 +07:00
as String?,
2025-10-28 00:58:39 +07:00
customerId: freezed == customerId
? _value.customerId
: customerId // ignore: cast_nullable_to_non_nullable
2025-10-27 21:55:19 +07:00
as String?,
2025-10-28 00:58:39 +07:00
tableNumber: freezed == tableNumber
? _value.tableNumber
: tableNumber // ignore: cast_nullable_to_non_nullable
2025-10-27 21:55:19 +07:00
as String?,
2025-10-28 00:58:39 +07:00
tableId: freezed == tableId
? _value.tableId
: tableId // ignore: cast_nullable_to_non_nullable
2025-10-27 21:55:19 +07:00
as String?,
2025-10-28 00:58:39 +07:00
orderType: freezed == orderType
? _value.orderType
: orderType // ignore: cast_nullable_to_non_nullable
2025-10-27 21:55:19 +07:00
as String?,
2025-10-28 00:58:39 +07:00
notes: freezed == notes
? _value.notes
: notes // ignore: cast_nullable_to_non_nullable
2025-10-27 21:55:19 +07:00
as String?,
2025-10-28 00:58:39 +07:00
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
2025-10-27 21:55:19 +07:00
as String?,
),
);
}
}
/// @nodoc
@JsonSerializable()
2025-10-28 00:58:39 +07:00
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,
2025-10-27 21:55:19 +07:00
super._();
2025-10-28 00:58:39 +07:00
factory _$OrderRequestDtoImpl.fromJson(Map<String, dynamic> json) =>
_$$OrderRequestDtoImplFromJson(json);
2025-10-27 21:55:19 +07:00
@override
2025-10-28 00:58:39 +07:00
@JsonKey(name: "outlet_id")
final String? outletId;
2025-10-27 21:55:19 +07:00
@override
2025-10-28 00:58:39 +07:00
@JsonKey(name: "customer_id")
final String? customerId;
2025-10-27 21:55:19 +07:00
@override
2025-10-28 00:58:39 +07:00
@JsonKey(name: "table_number")
final String? tableNumber;
2025-10-27 21:55:19 +07:00
@override
2025-10-28 00:58:39 +07:00
@JsonKey(name: "table_id")
final String? tableId;
2025-10-27 21:55:19 +07:00
@override
2025-10-28 00:58:39 +07:00
@JsonKey(name: "order_type")
final String? orderType;
2025-10-27 21:55:19 +07:00
@override
2025-10-28 00:58:39 +07:00
@JsonKey(name: "notes")
final String? notes;
final List<OrderItemRequestDto>? _orderItems;
2025-10-27 21:55:19 +07:00
@override
2025-10-28 00:58:39 +07:00
@JsonKey(name: "order_items")
List<OrderItemRequestDto>? get orderItems {
final value = _orderItems;
2025-10-27 21:55:19 +07:00
if (value == null) return null;
2025-10-28 00:58:39 +07:00
if (_orderItems is EqualUnmodifiableListView) return _orderItems;
2025-10-27 21:55:19 +07:00
// ignore: implicit_dynamic_type
2025-10-28 00:58:39 +07:00
return EqualUnmodifiableListView(value);
2025-10-27 21:55:19 +07:00
}
@override
2025-10-28 00:58:39 +07:00
@JsonKey(name: "customer_name")
final String? customerName;
2025-10-27 21:55:19 +07:00
@override
String toString() {
2025-10-28 00:58:39 +07:00
return 'OrderRequestDto(outletId: $outletId, customerId: $customerId, tableNumber: $tableNumber, tableId: $tableId, orderType: $orderType, notes: $notes, orderItems: $orderItems, customerName: $customerName)';
2025-10-27 21:55:19 +07:00
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
2025-10-28 00:58:39 +07:00
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));
2025-10-27 21:55:19 +07:00
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
2025-10-28 00:58:39 +07:00
outletId,
customerId,
tableNumber,
tableId,
orderType,
notes,
const DeepCollectionEquality().hash(_orderItems),
customerName,
2025-10-27 21:55:19 +07:00
);
2025-10-28 00:58:39 +07:00
/// Create a copy of OrderRequestDto
2025-10-27 21:55:19 +07:00
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
2025-10-28 00:58:39 +07:00
_$$OrderRequestDtoImplCopyWith<_$OrderRequestDtoImpl> get copyWith =>
__$$OrderRequestDtoImplCopyWithImpl<_$OrderRequestDtoImpl>(
2025-10-27 21:55:19 +07:00
this,
_$identity,
);
@override
Map<String, dynamic> toJson() {
2025-10-28 00:58:39 +07:00
return _$$OrderRequestDtoImplToJson(this);
2025-10-27 21:55:19 +07:00
}
}
2025-10-28 00:58:39 +07:00
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._();
2025-10-27 21:55:19 +07:00
2025-10-28 00:58:39 +07:00
factory _OrderRequestDto.fromJson(Map<String, dynamic> json) =
_$OrderRequestDtoImpl.fromJson;
2025-10-27 21:55:19 +07:00
@override
2025-10-28 00:58:39 +07:00
@JsonKey(name: "outlet_id")
String? get outletId;
2025-10-27 21:55:19 +07:00
@override
2025-10-28 00:58:39 +07:00
@JsonKey(name: "customer_id")
String? get customerId;
2025-10-27 21:55:19 +07:00
@override
2025-10-28 00:58:39 +07:00
@JsonKey(name: "table_number")
String? get tableNumber;
2025-10-27 21:55:19 +07:00
@override
2025-10-28 00:58:39 +07:00
@JsonKey(name: "table_id")
String? get tableId;
2025-10-27 21:55:19 +07:00
@override
2025-10-28 00:58:39 +07:00
@JsonKey(name: "order_type")
String? get orderType;
2025-10-27 21:55:19 +07:00
@override
2025-10-28 00:58:39 +07:00
@JsonKey(name: "notes")
String? get notes;
2025-10-27 21:55:19 +07:00
@override
2025-10-28 00:58:39 +07:00
@JsonKey(name: "order_items")
List<OrderItemRequestDto>? get orderItems;
2025-10-27 21:55:19 +07:00
@override
2025-10-28 00:58:39 +07:00
@JsonKey(name: "customer_name")
String? get customerName;
2025-10-27 21:55:19 +07:00
2025-10-28 00:58:39 +07:00
/// Create a copy of OrderRequestDto
2025-10-27 21:55:19 +07:00
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
2025-10-28 00:58:39 +07:00
_$$OrderRequestDtoImplCopyWith<_$OrderRequestDtoImpl> get copyWith =>
2025-10-27 21:55:19 +07:00
throw _privateConstructorUsedError;
}
2025-10-28 00:08:12 +07:00
2025-10-28 00:58:39 +07:00
OrderItemRequestDto _$OrderItemRequestDtoFromJson(Map<String, dynamic> json) {
return _OrderItemRequestDto.fromJson(json);
2025-10-28 00:08:12 +07:00
}
/// @nodoc
2025-10-28 00:58:39 +07:00
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;
2025-10-28 00:08:12 +07:00
@JsonKey(name: "notes")
String? get notes => throw _privateConstructorUsedError;
2025-10-28 00:58:39 +07:00
/// Serializes this OrderItemRequestDto to a JSON map.
2025-10-28 00:08:12 +07:00
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
2025-10-28 00:58:39 +07:00
/// Create a copy of OrderItemRequestDto
2025-10-28 00:08:12 +07:00
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
2025-10-28 00:58:39 +07:00
$OrderItemRequestDtoCopyWith<OrderItemRequestDto> get copyWith =>
2025-10-28 00:08:12 +07:00
throw _privateConstructorUsedError;
}
/// @nodoc
2025-10-28 00:58:39 +07:00
abstract class $OrderItemRequestDtoCopyWith<$Res> {
factory $OrderItemRequestDtoCopyWith(
OrderItemRequestDto value,
$Res Function(OrderItemRequestDto) then,
) = _$OrderItemRequestDtoCopyWithImpl<$Res, OrderItemRequestDto>;
2025-10-28 00:08:12 +07:00
@useResult
$Res call({
2025-10-28 00:58:39 +07:00
@JsonKey(name: "product_id") String? productId,
@JsonKey(name: "product_variant_id") String? productVariantId,
@JsonKey(name: "quantity") int? quantity,
@JsonKey(name: "unit_price") int? unitPrice,
2025-10-28 00:08:12 +07:00
@JsonKey(name: "notes") String? notes,
});
}
/// @nodoc
2025-10-28 00:58:39 +07:00
class _$OrderItemRequestDtoCopyWithImpl<$Res, $Val extends OrderItemRequestDto>
implements $OrderItemRequestDtoCopyWith<$Res> {
_$OrderItemRequestDtoCopyWithImpl(this._value, this._then);
2025-10-28 00:08:12 +07:00
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
2025-10-28 00:58:39 +07:00
/// Create a copy of OrderItemRequestDto
2025-10-28 00:08:12 +07:00
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
2025-10-28 00:58:39 +07:00
Object? productId = freezed,
Object? productVariantId = freezed,
Object? quantity = freezed,
Object? unitPrice = freezed,
2025-10-28 00:08:12 +07:00
Object? notes = freezed,
}) {
return _then(
_value.copyWith(
2025-10-28 00:58:39 +07:00
productId: freezed == productId
? _value.productId
: productId // ignore: cast_nullable_to_non_nullable
2025-10-28 00:08:12 +07:00
as String?,
2025-10-28 00:58:39 +07:00
productVariantId: freezed == productVariantId
? _value.productVariantId
: productVariantId // ignore: cast_nullable_to_non_nullable
2025-10-28 00:08:12 +07:00
as String?,
2025-10-28 00:58:39 +07:00
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?,
2025-10-28 00:08:12 +07:00
notes: freezed == notes
? _value.notes
: notes // ignore: cast_nullable_to_non_nullable
as String?,
)
as $Val,
);
}
}
/// @nodoc
2025-10-28 00:58:39 +07:00
abstract class _$$OrderItemRequestDtoImplCopyWith<$Res>
implements $OrderItemRequestDtoCopyWith<$Res> {
factory _$$OrderItemRequestDtoImplCopyWith(
_$OrderItemRequestDtoImpl value,
$Res Function(_$OrderItemRequestDtoImpl) then,
) = __$$OrderItemRequestDtoImplCopyWithImpl<$Res>;
2025-10-28 00:08:12 +07:00
@override
@useResult
$Res call({
2025-10-28 00:58:39 +07:00
@JsonKey(name: "product_id") String? productId,
@JsonKey(name: "product_variant_id") String? productVariantId,
@JsonKey(name: "quantity") int? quantity,
@JsonKey(name: "unit_price") int? unitPrice,
2025-10-28 00:08:12 +07:00
@JsonKey(name: "notes") String? notes,
});
}
/// @nodoc
2025-10-28 00:58:39 +07:00
class __$$OrderItemRequestDtoImplCopyWithImpl<$Res>
extends _$OrderItemRequestDtoCopyWithImpl<$Res, _$OrderItemRequestDtoImpl>
implements _$$OrderItemRequestDtoImplCopyWith<$Res> {
__$$OrderItemRequestDtoImplCopyWithImpl(
_$OrderItemRequestDtoImpl _value,
$Res Function(_$OrderItemRequestDtoImpl) _then,
2025-10-28 00:08:12 +07:00
) : super(_value, _then);
2025-10-28 00:58:39 +07:00
/// Create a copy of OrderItemRequestDto
2025-10-28 00:08:12 +07:00
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
2025-10-28 00:58:39 +07:00
Object? productId = freezed,
Object? productVariantId = freezed,
Object? quantity = freezed,
Object? unitPrice = freezed,
2025-10-28 00:08:12 +07:00
Object? notes = freezed,
}) {
return _then(
2025-10-28 00:58:39 +07:00
_$OrderItemRequestDtoImpl(
productId: freezed == productId
? _value.productId
: productId // ignore: cast_nullable_to_non_nullable
2025-10-28 00:08:12 +07:00
as String?,
2025-10-28 00:58:39 +07:00
productVariantId: freezed == productVariantId
? _value.productVariantId
: productVariantId // ignore: cast_nullable_to_non_nullable
2025-10-28 00:08:12 +07:00
as String?,
2025-10-28 00:58:39 +07:00
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?,
2025-10-28 00:08:12 +07:00
notes: freezed == notes
? _value.notes
: notes // ignore: cast_nullable_to_non_nullable
as String?,
),
);
}
}
/// @nodoc
@JsonSerializable()
2025-10-28 00:58:39 +07:00
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,
2025-10-28 00:08:12 +07:00
@JsonKey(name: "notes") this.notes,
2025-10-28 00:58:39 +07:00
}) : super._();
2025-10-28 00:08:12 +07:00
2025-10-28 00:58:39 +07:00
factory _$OrderItemRequestDtoImpl.fromJson(Map<String, dynamic> json) =>
_$$OrderItemRequestDtoImplFromJson(json);
2025-10-28 00:08:12 +07:00
@override
2025-10-28 00:58:39 +07:00
@JsonKey(name: "product_id")
final String? productId;
2025-10-28 00:08:12 +07:00
@override
2025-10-28 00:58:39 +07:00
@JsonKey(name: "product_variant_id")
final String? productVariantId;
2025-10-28 00:08:12 +07:00
@override
2025-10-28 00:58:39 +07:00
@JsonKey(name: "quantity")
final int? quantity;
2025-10-28 00:08:12 +07:00
@override
2025-10-28 00:58:39 +07:00
@JsonKey(name: "unit_price")
final int? unitPrice;
2025-10-28 00:08:12 +07:00
@override
@JsonKey(name: "notes")
final String? notes;
@override
String toString() {
2025-10-28 00:58:39 +07:00
return 'OrderItemRequestDto(productId: $productId, productVariantId: $productVariantId, quantity: $quantity, unitPrice: $unitPrice, notes: $notes)';
2025-10-28 00:08:12 +07:00
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
2025-10-28 00:58:39 +07:00
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));
2025-10-28 00:08:12 +07:00
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
2025-10-28 00:58:39 +07:00
productId,
productVariantId,
quantity,
unitPrice,
2025-10-28 00:08:12 +07:00
notes,
);
2025-10-28 00:58:39 +07:00
/// Create a copy of OrderItemRequestDto
2025-10-28 00:08:12 +07:00
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
2025-10-28 00:58:39 +07:00
_$$OrderItemRequestDtoImplCopyWith<_$OrderItemRequestDtoImpl> get copyWith =>
__$$OrderItemRequestDtoImplCopyWithImpl<_$OrderItemRequestDtoImpl>(
2025-10-28 00:08:12 +07:00
this,
_$identity,
);
@override
Map<String, dynamic> toJson() {
2025-10-28 00:58:39 +07:00
return _$$OrderItemRequestDtoImplToJson(this);
2025-10-28 00:08:12 +07:00
}
}
2025-10-28 00:58:39 +07:00
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,
2025-10-28 00:08:12 +07:00
@JsonKey(name: "notes") final String? notes,
2025-10-28 00:58:39 +07:00
}) = _$OrderItemRequestDtoImpl;
const _OrderItemRequestDto._() : super._();
2025-10-28 00:08:12 +07:00
2025-10-28 00:58:39 +07:00
factory _OrderItemRequestDto.fromJson(Map<String, dynamic> json) =
_$OrderItemRequestDtoImpl.fromJson;
2025-10-28 00:08:12 +07:00
@override
2025-10-28 00:58:39 +07:00
@JsonKey(name: "product_id")
String? get productId;
2025-10-28 00:08:12 +07:00
@override
2025-10-28 00:58:39 +07:00
@JsonKey(name: "product_variant_id")
String? get productVariantId;
2025-10-28 00:08:12 +07:00
@override
2025-10-28 00:58:39 +07:00
@JsonKey(name: "quantity")
int? get quantity;
2025-10-28 00:08:12 +07:00
@override
2025-10-28 00:58:39 +07:00
@JsonKey(name: "unit_price")
int? get unitPrice;
2025-10-28 00:08:12 +07:00
@override
@JsonKey(name: "notes")
String? get notes;
2025-10-28 00:58:39 +07:00
/// Create a copy of OrderItemRequestDto
2025-10-28 00:08:12 +07:00
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
2025-10-28 00:58:39 +07:00
_$$OrderItemRequestDtoImplCopyWith<_$OrderItemRequestDtoImpl> get copyWith =>
2025-10-28 00:08:12 +07:00
throw _privateConstructorUsedError;
}
2025-10-28 00:58:39 +07:00
PaymentRequestDto _$PaymentRequestDtoFromJson(Map<String, dynamic> json) {
return _PaymentRequestDto.fromJson(json);
2025-10-28 00:08:12 +07:00
}
/// @nodoc
2025-10-28 00:58:39 +07:00
mixin _$PaymentRequestDto {
@JsonKey(name: "order_id")
String? get orderId => throw _privateConstructorUsedError;
@JsonKey(name: "payment_method_id")
String? get paymentMethodId => throw _privateConstructorUsedError;
@JsonKey(name: "amount")
int? get amount => throw _privateConstructorUsedError;
@JsonKey(name: "transaction_id")
String? get transactionId => 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: "payment_order_items")
List<PaymentItemRequestDto>? get paymentOrderItems =>
throw _privateConstructorUsedError;
2025-10-28 00:08:12 +07:00
2025-10-28 00:58:39 +07:00
/// Serializes this PaymentRequestDto to a JSON map.
2025-10-28 00:08:12 +07:00
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
2025-10-28 00:58:39 +07:00
/// Create a copy of PaymentRequestDto
2025-10-28 00:08:12 +07:00
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
2025-10-28 00:58:39 +07:00
$PaymentRequestDtoCopyWith<PaymentRequestDto> get copyWith =>
2025-10-28 00:08:12 +07:00
throw _privateConstructorUsedError;
}
/// @nodoc
2025-10-28 00:58:39 +07:00
abstract class $PaymentRequestDtoCopyWith<$Res> {
factory $PaymentRequestDtoCopyWith(
PaymentRequestDto value,
$Res Function(PaymentRequestDto) then,
) = _$PaymentRequestDtoCopyWithImpl<$Res, PaymentRequestDto>;
2025-10-28 00:08:12 +07:00
@useResult
$Res call({
2025-10-28 00:58:39 +07:00
@JsonKey(name: "order_id") String? orderId,
@JsonKey(name: "payment_method_id") String? paymentMethodId,
@JsonKey(name: "amount") int? amount,
@JsonKey(name: "transaction_id") String? transactionId,
@JsonKey(name: "split_number") int? splitNumber,
@JsonKey(name: "split_total") int? splitTotal,
@JsonKey(name: "split_description") String? splitDescription,
@JsonKey(name: "payment_order_items")
List<PaymentItemRequestDto>? paymentOrderItems,
2025-10-28 00:08:12 +07:00
});
}
/// @nodoc
2025-10-28 00:58:39 +07:00
class _$PaymentRequestDtoCopyWithImpl<$Res, $Val extends PaymentRequestDto>
implements $PaymentRequestDtoCopyWith<$Res> {
_$PaymentRequestDtoCopyWithImpl(this._value, this._then);
2025-10-28 00:08:12 +07:00
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
2025-10-28 00:58:39 +07:00
/// Create a copy of PaymentRequestDto
2025-10-28 00:08:12 +07:00
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
2025-10-28 00:58:39 +07:00
Object? orderId = freezed,
Object? paymentMethodId = freezed,
Object? amount = freezed,
Object? transactionId = freezed,
Object? splitNumber = freezed,
Object? splitTotal = freezed,
Object? splitDescription = freezed,
Object? paymentOrderItems = freezed,
2025-10-28 00:08:12 +07:00
}) {
return _then(
_value.copyWith(
2025-10-28 00:58:39 +07:00
orderId: freezed == orderId
? _value.orderId
: orderId // ignore: cast_nullable_to_non_nullable
2025-10-28 00:08:12 +07:00
as String?,
2025-10-28 00:58:39 +07:00
paymentMethodId: freezed == paymentMethodId
? _value.paymentMethodId
: paymentMethodId // ignore: cast_nullable_to_non_nullable
2025-10-28 00:08:12 +07:00
as String?,
2025-10-28 00:58:39 +07:00
amount: freezed == amount
? _value.amount
: amount // ignore: cast_nullable_to_non_nullable
2025-10-28 00:08:12 +07:00
as int?,
2025-10-28 00:58:39 +07:00
transactionId: freezed == transactionId
? _value.transactionId
: transactionId // ignore: cast_nullable_to_non_nullable
as String?,
splitNumber: freezed == splitNumber
? _value.splitNumber
: splitNumber // ignore: cast_nullable_to_non_nullable
2025-10-28 00:08:12 +07:00
as int?,
2025-10-28 00:58:39 +07:00
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
2025-10-28 00:08:12 +07:00
as String?,
2025-10-28 00:58:39 +07:00
paymentOrderItems: freezed == paymentOrderItems
? _value.paymentOrderItems
: paymentOrderItems // ignore: cast_nullable_to_non_nullable
as List<PaymentItemRequestDto>?,
2025-10-28 00:08:12 +07:00
)
as $Val,
);
}
}
/// @nodoc
2025-10-28 00:58:39 +07:00
abstract class _$$PaymentRequestDtoImplCopyWith<$Res>
implements $PaymentRequestDtoCopyWith<$Res> {
factory _$$PaymentRequestDtoImplCopyWith(
_$PaymentRequestDtoImpl value,
$Res Function(_$PaymentRequestDtoImpl) then,
) = __$$PaymentRequestDtoImplCopyWithImpl<$Res>;
2025-10-28 00:08:12 +07:00
@override
@useResult
$Res call({
2025-10-28 00:58:39 +07:00
@JsonKey(name: "order_id") String? orderId,
@JsonKey(name: "payment_method_id") String? paymentMethodId,
@JsonKey(name: "amount") int? amount,
@JsonKey(name: "transaction_id") String? transactionId,
@JsonKey(name: "split_number") int? splitNumber,
@JsonKey(name: "split_total") int? splitTotal,
@JsonKey(name: "split_description") String? splitDescription,
@JsonKey(name: "payment_order_items")
List<PaymentItemRequestDto>? paymentOrderItems,
2025-10-28 00:08:12 +07:00
});
}
/// @nodoc
2025-10-28 00:58:39 +07:00
class __$$PaymentRequestDtoImplCopyWithImpl<$Res>
extends _$PaymentRequestDtoCopyWithImpl<$Res, _$PaymentRequestDtoImpl>
implements _$$PaymentRequestDtoImplCopyWith<$Res> {
__$$PaymentRequestDtoImplCopyWithImpl(
_$PaymentRequestDtoImpl _value,
$Res Function(_$PaymentRequestDtoImpl) _then,
2025-10-28 00:08:12 +07:00
) : super(_value, _then);
2025-10-28 00:58:39 +07:00
/// Create a copy of PaymentRequestDto
2025-10-28 00:08:12 +07:00
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
2025-10-28 00:58:39 +07:00
Object? orderId = freezed,
Object? paymentMethodId = freezed,
Object? amount = freezed,
Object? transactionId = freezed,
Object? splitNumber = freezed,
Object? splitTotal = freezed,
Object? splitDescription = freezed,
Object? paymentOrderItems = freezed,
2025-10-28 00:08:12 +07:00
}) {
return _then(
2025-10-28 00:58:39 +07:00
_$PaymentRequestDtoImpl(
orderId: freezed == orderId
? _value.orderId
: orderId // ignore: cast_nullable_to_non_nullable
2025-10-28 00:08:12 +07:00
as String?,
2025-10-28 00:58:39 +07:00
paymentMethodId: freezed == paymentMethodId
? _value.paymentMethodId
: paymentMethodId // ignore: cast_nullable_to_non_nullable
2025-10-28 00:08:12 +07:00
as String?,
2025-10-28 00:58:39 +07:00
amount: freezed == amount
? _value.amount
: amount // ignore: cast_nullable_to_non_nullable
2025-10-28 00:08:12 +07:00
as int?,
2025-10-28 00:58:39 +07:00
transactionId: freezed == transactionId
? _value.transactionId
: transactionId // ignore: cast_nullable_to_non_nullable
as String?,
splitNumber: freezed == splitNumber
? _value.splitNumber
: splitNumber // ignore: cast_nullable_to_non_nullable
2025-10-28 00:08:12 +07:00
as int?,
2025-10-28 00:58:39 +07:00
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
2025-10-28 00:08:12 +07:00
as String?,
2025-10-28 00:58:39 +07:00
paymentOrderItems: freezed == paymentOrderItems
? _value._paymentOrderItems
: paymentOrderItems // ignore: cast_nullable_to_non_nullable
as List<PaymentItemRequestDto>?,
2025-10-28 00:08:12 +07:00
),
);
}
}
/// @nodoc
@JsonSerializable()
2025-10-28 00:58:39 +07:00
class _$PaymentRequestDtoImpl extends _PaymentRequestDto {
const _$PaymentRequestDtoImpl({
@JsonKey(name: "order_id") this.orderId,
@JsonKey(name: "payment_method_id") this.paymentMethodId,
@JsonKey(name: "amount") this.amount,
@JsonKey(name: "transaction_id") this.transactionId,
@JsonKey(name: "split_number") this.splitNumber,
@JsonKey(name: "split_total") this.splitTotal,
@JsonKey(name: "split_description") this.splitDescription,
@JsonKey(name: "payment_order_items")
final List<PaymentItemRequestDto>? paymentOrderItems,
}) : _paymentOrderItems = paymentOrderItems,
super._();
2025-10-28 00:08:12 +07:00
2025-10-28 00:58:39 +07:00
factory _$PaymentRequestDtoImpl.fromJson(Map<String, dynamic> json) =>
_$$PaymentRequestDtoImplFromJson(json);
2025-10-28 00:08:12 +07:00
@override
2025-10-28 00:58:39 +07:00
@JsonKey(name: "order_id")
final String? orderId;
2025-10-28 00:08:12 +07:00
@override
2025-10-28 00:58:39 +07:00
@JsonKey(name: "payment_method_id")
final String? paymentMethodId;
2025-10-28 00:08:12 +07:00
@override
2025-10-28 00:58:39 +07:00
@JsonKey(name: "amount")
final int? amount;
2025-10-28 00:08:12 +07:00
@override
2025-10-28 00:58:39 +07:00
@JsonKey(name: "transaction_id")
final String? transactionId;
2025-10-28 00:08:12 +07:00
@override
2025-10-28 00:58:39 +07:00
@JsonKey(name: "split_number")
final int? splitNumber;
@override
@JsonKey(name: "split_total")
final int? splitTotal;
@override
@JsonKey(name: "split_description")
final String? splitDescription;
final List<PaymentItemRequestDto>? _paymentOrderItems;
@override
@JsonKey(name: "payment_order_items")
List<PaymentItemRequestDto>? get paymentOrderItems {
final value = _paymentOrderItems;
if (value == null) return null;
if (_paymentOrderItems is EqualUnmodifiableListView)
return _paymentOrderItems;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
2025-10-28 00:08:12 +07:00
@override
String toString() {
2025-10-28 00:58:39 +07:00
return 'PaymentRequestDto(orderId: $orderId, paymentMethodId: $paymentMethodId, amount: $amount, transactionId: $transactionId, splitNumber: $splitNumber, splitTotal: $splitTotal, splitDescription: $splitDescription, paymentOrderItems: $paymentOrderItems)';
2025-10-28 00:08:12 +07:00
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
2025-10-28 00:58:39 +07:00
other is _$PaymentRequestDtoImpl &&
(identical(other.orderId, orderId) || other.orderId == orderId) &&
(identical(other.paymentMethodId, paymentMethodId) ||
other.paymentMethodId == paymentMethodId) &&
(identical(other.amount, amount) || other.amount == amount) &&
(identical(other.transactionId, transactionId) ||
other.transactionId == transactionId) &&
(identical(other.splitNumber, splitNumber) ||
other.splitNumber == splitNumber) &&
(identical(other.splitTotal, splitTotal) ||
other.splitTotal == splitTotal) &&
(identical(other.splitDescription, splitDescription) ||
other.splitDescription == splitDescription) &&
const DeepCollectionEquality().equals(
other._paymentOrderItems,
_paymentOrderItems,
));
2025-10-28 00:08:12 +07:00
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
2025-10-28 00:58:39 +07:00
orderId,
paymentMethodId,
amount,
transactionId,
splitNumber,
splitTotal,
splitDescription,
const DeepCollectionEquality().hash(_paymentOrderItems),
2025-10-28 00:08:12 +07:00
);
2025-10-28 00:58:39 +07:00
/// Create a copy of PaymentRequestDto
2025-10-28 00:08:12 +07:00
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
2025-10-28 00:58:39 +07:00
_$$PaymentRequestDtoImplCopyWith<_$PaymentRequestDtoImpl> get copyWith =>
__$$PaymentRequestDtoImplCopyWithImpl<_$PaymentRequestDtoImpl>(
2025-10-28 00:08:12 +07:00
this,
_$identity,
);
@override
Map<String, dynamic> toJson() {
2025-10-28 00:58:39 +07:00
return _$$PaymentRequestDtoImplToJson(this);
2025-10-28 00:08:12 +07:00
}
}
2025-10-28 00:58:39 +07:00
abstract class _PaymentRequestDto extends PaymentRequestDto {
const factory _PaymentRequestDto({
@JsonKey(name: "order_id") final String? orderId,
@JsonKey(name: "payment_method_id") final String? paymentMethodId,
@JsonKey(name: "amount") final int? amount,
@JsonKey(name: "transaction_id") final String? transactionId,
@JsonKey(name: "split_number") final int? splitNumber,
@JsonKey(name: "split_total") final int? splitTotal,
@JsonKey(name: "split_description") final String? splitDescription,
@JsonKey(name: "payment_order_items")
final List<PaymentItemRequestDto>? paymentOrderItems,
}) = _$PaymentRequestDtoImpl;
const _PaymentRequestDto._() : super._();
2025-10-28 00:08:12 +07:00
2025-10-28 00:58:39 +07:00
factory _PaymentRequestDto.fromJson(Map<String, dynamic> json) =
_$PaymentRequestDtoImpl.fromJson;
2025-10-28 00:08:12 +07:00
@override
2025-10-28 00:58:39 +07:00
@JsonKey(name: "order_id")
String? get orderId;
2025-10-28 00:08:12 +07:00
@override
2025-10-28 00:58:39 +07:00
@JsonKey(name: "payment_method_id")
String? get paymentMethodId;
2025-10-28 00:08:12 +07:00
@override
2025-10-28 00:58:39 +07:00
@JsonKey(name: "amount")
int? get amount;
2025-10-28 00:08:12 +07:00
@override
2025-10-28 00:58:39 +07:00
@JsonKey(name: "transaction_id")
String? get transactionId;
2025-10-28 00:08:12 +07:00
@override
2025-10-28 00:58:39 +07:00
@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: "payment_order_items")
List<PaymentItemRequestDto>? get paymentOrderItems;
2025-10-28 00:08:12 +07:00
2025-10-28 00:58:39 +07:00
/// Create a copy of PaymentRequestDto
2025-10-28 00:08:12 +07:00
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
2025-10-28 00:58:39 +07:00
_$$PaymentRequestDtoImplCopyWith<_$PaymentRequestDtoImpl> get copyWith =>
throw _privateConstructorUsedError;
}
PaymentItemRequestDto _$PaymentItemRequestDtoFromJson(
Map<String, dynamic> json,
) {
return _PaymentItemRequestDto.fromJson(json);
}
/// @nodoc
mixin _$PaymentItemRequestDto {
@JsonKey(name: "order_item_id")
String? get orderItemId => throw _privateConstructorUsedError;
@JsonKey(name: "amount")
int? get amount => throw _privateConstructorUsedError;
/// Serializes this PaymentItemRequestDto to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of PaymentItemRequestDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$PaymentItemRequestDtoCopyWith<PaymentItemRequestDto> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $PaymentItemRequestDtoCopyWith<$Res> {
factory $PaymentItemRequestDtoCopyWith(
PaymentItemRequestDto value,
$Res Function(PaymentItemRequestDto) then,
) = _$PaymentItemRequestDtoCopyWithImpl<$Res, PaymentItemRequestDto>;
@useResult
$Res call({
@JsonKey(name: "order_item_id") String? orderItemId,
@JsonKey(name: "amount") int? amount,
});
}
/// @nodoc
class _$PaymentItemRequestDtoCopyWithImpl<
$Res,
$Val extends PaymentItemRequestDto
>
implements $PaymentItemRequestDtoCopyWith<$Res> {
_$PaymentItemRequestDtoCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of PaymentItemRequestDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({Object? orderItemId = freezed, Object? amount = freezed}) {
return _then(
_value.copyWith(
orderItemId: freezed == orderItemId
? _value.orderItemId
: orderItemId // ignore: cast_nullable_to_non_nullable
as String?,
amount: freezed == amount
? _value.amount
: amount // ignore: cast_nullable_to_non_nullable
as int?,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$PaymentItemRequestDtoImplCopyWith<$Res>
implements $PaymentItemRequestDtoCopyWith<$Res> {
factory _$$PaymentItemRequestDtoImplCopyWith(
_$PaymentItemRequestDtoImpl value,
$Res Function(_$PaymentItemRequestDtoImpl) then,
) = __$$PaymentItemRequestDtoImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
@JsonKey(name: "order_item_id") String? orderItemId,
@JsonKey(name: "amount") int? amount,
});
}
/// @nodoc
class __$$PaymentItemRequestDtoImplCopyWithImpl<$Res>
extends
_$PaymentItemRequestDtoCopyWithImpl<$Res, _$PaymentItemRequestDtoImpl>
implements _$$PaymentItemRequestDtoImplCopyWith<$Res> {
__$$PaymentItemRequestDtoImplCopyWithImpl(
_$PaymentItemRequestDtoImpl _value,
$Res Function(_$PaymentItemRequestDtoImpl) _then,
) : super(_value, _then);
/// Create a copy of PaymentItemRequestDto
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({Object? orderItemId = freezed, Object? amount = freezed}) {
return _then(
_$PaymentItemRequestDtoImpl(
orderItemId: freezed == orderItemId
? _value.orderItemId
: orderItemId // ignore: cast_nullable_to_non_nullable
as String?,
amount: freezed == amount
? _value.amount
: amount // ignore: cast_nullable_to_non_nullable
as int?,
),
);
}
}
/// @nodoc
@JsonSerializable()
class _$PaymentItemRequestDtoImpl extends _PaymentItemRequestDto {
const _$PaymentItemRequestDtoImpl({
@JsonKey(name: "order_item_id") this.orderItemId,
@JsonKey(name: "amount") this.amount,
}) : super._();
factory _$PaymentItemRequestDtoImpl.fromJson(Map<String, dynamic> json) =>
_$$PaymentItemRequestDtoImplFromJson(json);
@override
@JsonKey(name: "order_item_id")
final String? orderItemId;
@override
@JsonKey(name: "amount")
final int? amount;
@override
String toString() {
return 'PaymentItemRequestDto(orderItemId: $orderItemId, amount: $amount)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$PaymentItemRequestDtoImpl &&
(identical(other.orderItemId, orderItemId) ||
other.orderItemId == orderItemId) &&
(identical(other.amount, amount) || other.amount == amount));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, orderItemId, amount);
/// Create a copy of PaymentItemRequestDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$PaymentItemRequestDtoImplCopyWith<_$PaymentItemRequestDtoImpl>
get copyWith =>
__$$PaymentItemRequestDtoImplCopyWithImpl<_$PaymentItemRequestDtoImpl>(
this,
_$identity,
);
@override
Map<String, dynamic> toJson() {
return _$$PaymentItemRequestDtoImplToJson(this);
}
}
abstract class _PaymentItemRequestDto extends PaymentItemRequestDto {
const factory _PaymentItemRequestDto({
@JsonKey(name: "order_item_id") final String? orderItemId,
@JsonKey(name: "amount") final int? amount,
}) = _$PaymentItemRequestDtoImpl;
const _PaymentItemRequestDto._() : super._();
factory _PaymentItemRequestDto.fromJson(Map<String, dynamic> json) =
_$PaymentItemRequestDtoImpl.fromJson;
@override
@JsonKey(name: "order_item_id")
String? get orderItemId;
@override
@JsonKey(name: "amount")
int? get amount;
/// Create a copy of PaymentItemRequestDto
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$PaymentItemRequestDtoImplCopyWith<_$PaymentItemRequestDtoImpl>
get copyWith => throw _privateConstructorUsedError;
}
PaymentDto _$PaymentDtoFromJson(Map<String, dynamic> json) {
return _PaymentOrderDto.fromJson(json);
}
/// @nodoc
mixin _$PaymentDto {
@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 PaymentDto to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of PaymentDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$PaymentDtoCopyWith<PaymentDto> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $PaymentDtoCopyWith<$Res> {
factory $PaymentDtoCopyWith(
PaymentDto value,
$Res Function(PaymentDto) then,
) = _$PaymentDtoCopyWithImpl<$Res, PaymentDto>;
@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 _$PaymentDtoCopyWithImpl<$Res, $Val extends PaymentDto>
implements $PaymentDtoCopyWith<$Res> {
_$PaymentDtoCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of PaymentDto
/// 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 $PaymentDtoCopyWith<$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 _$PaymentDtoCopyWithImpl<$Res, _$PaymentOrderDtoImpl>
implements _$$PaymentOrderDtoImplCopyWith<$Res> {
__$$PaymentOrderDtoImplCopyWithImpl(
_$PaymentOrderDtoImpl _value,
$Res Function(_$PaymentOrderDtoImpl) _then,
) : super(_value, _then);
/// Create a copy of PaymentDto
/// 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 'PaymentDto(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 PaymentDto
/// 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 PaymentDto {
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 PaymentDto
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$PaymentOrderDtoImplCopyWith<_$PaymentOrderDtoImpl> get copyWith =>
2025-10-28 00:08:12 +07:00
throw _privateConstructorUsedError;
}
2025-10-28 20:55:10 +07:00
AddItemOrderRequestDto _$AddItemOrderRequestDtoFromJson(
Map<String, dynamic> json,
) {
return _AddItemOrderRequestDto.fromJson(json);
}
/// @nodoc
mixin _$AddItemOrderRequestDto {
@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 AddItemOrderRequestDto to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of AddItemOrderRequestDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$AddItemOrderRequestDtoCopyWith<AddItemOrderRequestDto> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $AddItemOrderRequestDtoCopyWith<$Res> {
factory $AddItemOrderRequestDtoCopyWith(
AddItemOrderRequestDto value,
$Res Function(AddItemOrderRequestDto) then,
) = _$AddItemOrderRequestDtoCopyWithImpl<$Res, AddItemOrderRequestDto>;
@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 _$AddItemOrderRequestDtoCopyWithImpl<
$Res,
$Val extends AddItemOrderRequestDto
>
implements $AddItemOrderRequestDtoCopyWith<$Res> {
_$AddItemOrderRequestDtoCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of AddItemOrderRequestDto
/// 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 _$$AddItemOrderRequestDtoImplCopyWith<$Res>
implements $AddItemOrderRequestDtoCopyWith<$Res> {
factory _$$AddItemOrderRequestDtoImplCopyWith(
_$AddItemOrderRequestDtoImpl value,
$Res Function(_$AddItemOrderRequestDtoImpl) then,
) = __$$AddItemOrderRequestDtoImplCopyWithImpl<$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 __$$AddItemOrderRequestDtoImplCopyWithImpl<$Res>
extends
_$AddItemOrderRequestDtoCopyWithImpl<$Res, _$AddItemOrderRequestDtoImpl>
implements _$$AddItemOrderRequestDtoImplCopyWith<$Res> {
__$$AddItemOrderRequestDtoImplCopyWithImpl(
_$AddItemOrderRequestDtoImpl _value,
$Res Function(_$AddItemOrderRequestDtoImpl) _then,
) : super(_value, _then);
/// Create a copy of AddItemOrderRequestDto
/// 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(
_$AddItemOrderRequestDtoImpl(
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 _$AddItemOrderRequestDtoImpl extends _AddItemOrderRequestDto {
const _$AddItemOrderRequestDtoImpl({
@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 _$AddItemOrderRequestDtoImpl.fromJson(Map<String, dynamic> json) =>
_$$AddItemOrderRequestDtoImplFromJson(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 'AddItemOrderRequestDto(productId: $productId, productvariantId: $productvariantId, quantity: $quantity, unitPrice: $unitPrice, notes: $notes)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$AddItemOrderRequestDtoImpl &&
(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 AddItemOrderRequestDto
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$AddItemOrderRequestDtoImplCopyWith<_$AddItemOrderRequestDtoImpl>
get copyWith =>
__$$AddItemOrderRequestDtoImplCopyWithImpl<_$AddItemOrderRequestDtoImpl>(
this,
_$identity,
);
@override
Map<String, dynamic> toJson() {
return _$$AddItemOrderRequestDtoImplToJson(this);
}
}
abstract class _AddItemOrderRequestDto extends AddItemOrderRequestDto {
const factory _AddItemOrderRequestDto({
@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,
}) = _$AddItemOrderRequestDtoImpl;
const _AddItemOrderRequestDto._() : super._();
factory _AddItemOrderRequestDto.fromJson(Map<String, dynamic> json) =
_$AddItemOrderRequestDtoImpl.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 AddItemOrderRequestDto
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$AddItemOrderRequestDtoImplCopyWith<_$AddItemOrderRequestDtoImpl>
get copyWith => throw _privateConstructorUsedError;
}