2198 lines
79 KiB
Dart
2198 lines
79 KiB
Dart
|
|
// coverage:ignore-file
|
||
|
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||
|
|
// ignore_for_file: type=lint
|
||
|
|
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||
|
|
|
||
|
|
part of 'order_dtos.dart';
|
||
|
|
|
||
|
|
// **************************************************************************
|
||
|
|
// FreezedGenerator
|
||
|
|
// **************************************************************************
|
||
|
|
|
||
|
|
T _$identity<T>(T value) => value;
|
||
|
|
|
||
|
|
final _privateConstructorUsedError = UnsupportedError(
|
||
|
|
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
|
||
|
|
);
|
||
|
|
|
||
|
|
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')
|
||
|
|
int? get totalCost => throw _privateConstructorUsedError;
|
||
|
|
@JsonKey(name: 'remaining_amount')
|
||
|
|
int? get remainingAmount => throw _privateConstructorUsedError;
|
||
|
|
@JsonKey(name: 'payment_status')
|
||
|
|
String? get paymentStatus => throw _privateConstructorUsedError;
|
||
|
|
@JsonKey(name: 'refund_amount')
|
||
|
|
int? get refundAmount => throw _privateConstructorUsedError;
|
||
|
|
@JsonKey(name: 'is_void')
|
||
|
|
bool? get isVoid => throw _privateConstructorUsedError;
|
||
|
|
@JsonKey(name: 'is_refund')
|
||
|
|
bool? get isRefund => throw _privateConstructorUsedError;
|
||
|
|
@JsonKey(name: 'notes')
|
||
|
|
String? get notes => throw _privateConstructorUsedError;
|
||
|
|
@JsonKey(name: 'metadata')
|
||
|
|
Map<String, dynamic>? get metadata => throw _privateConstructorUsedError;
|
||
|
|
@JsonKey(name: 'created_at')
|
||
|
|
String? get createdAt => throw _privateConstructorUsedError;
|
||
|
|
@JsonKey(name: 'updated_at')
|
||
|
|
String? get updatedAt => throw _privateConstructorUsedError;
|
||
|
|
@JsonKey(name: 'order_items')
|
||
|
|
List<OrderItemDto>? get orderItems => throw _privateConstructorUsedError;
|
||
|
|
@JsonKey(name: 'payments')
|
||
|
|
List<OrderPaymentDto>? get payments => throw _privateConstructorUsedError;
|
||
|
|
@JsonKey(name: 'total_paid')
|
||
|
|
int? get totalPaid => throw _privateConstructorUsedError;
|
||
|
|
@JsonKey(name: 'payment_count')
|
||
|
|
int? get paymentCount => throw _privateConstructorUsedError;
|
||
|
|
@JsonKey(name: 'split_type')
|
||
|
|
String? get splitType => throw _privateConstructorUsedError;
|
||
|
|
|
||
|
|
/// Serializes this OrderDto to a JSON map.
|
||
|
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||
|
|
|
||
|
|
/// Create a copy of OrderDto
|
||
|
|
/// with the given fields replaced by the non-null parameter values.
|
||
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||
|
|
$OrderDtoCopyWith<OrderDto> get copyWith =>
|
||
|
|
throw _privateConstructorUsedError;
|
||
|
|
}
|
||
|
|
|
||
|
|
/// @nodoc
|
||
|
|
abstract class $OrderDtoCopyWith<$Res> {
|
||
|
|
factory $OrderDtoCopyWith(OrderDto value, $Res Function(OrderDto) then) =
|
||
|
|
_$OrderDtoCopyWithImpl<$Res, OrderDto>;
|
||
|
|
@useResult
|
||
|
|
$Res call({
|
||
|
|
@JsonKey(name: 'id') String? id,
|
||
|
|
@JsonKey(name: 'order_number') String? orderNumber,
|
||
|
|
@JsonKey(name: 'outlet_id') String? outletId,
|
||
|
|
@JsonKey(name: 'user_id') String? userId,
|
||
|
|
@JsonKey(name: 'table_number') String? tableNumber,
|
||
|
|
@JsonKey(name: 'order_type') String? orderType,
|
||
|
|
@JsonKey(name: 'status') String? status,
|
||
|
|
@JsonKey(name: 'subtotal') int? subtotal,
|
||
|
|
@JsonKey(name: 'tax_amount') int? taxAmount,
|
||
|
|
@JsonKey(name: 'discount_amount') int? discountAmount,
|
||
|
|
@JsonKey(name: 'total_amount') int? totalAmount,
|
||
|
|
@JsonKey(name: 'total_cost') int? totalCost,
|
||
|
|
@JsonKey(name: 'remaining_amount') int? remainingAmount,
|
||
|
|
@JsonKey(name: 'payment_status') String? paymentStatus,
|
||
|
|
@JsonKey(name: 'refund_amount') int? refundAmount,
|
||
|
|
@JsonKey(name: 'is_void') bool? isVoid,
|
||
|
|
@JsonKey(name: 'is_refund') bool? isRefund,
|
||
|
|
@JsonKey(name: 'notes') String? notes,
|
||
|
|
@JsonKey(name: 'metadata') Map<String, dynamic>? metadata,
|
||
|
|
@JsonKey(name: 'created_at') String? createdAt,
|
||
|
|
@JsonKey(name: 'updated_at') String? updatedAt,
|
||
|
|
@JsonKey(name: 'order_items') List<OrderItemDto>? orderItems,
|
||
|
|
@JsonKey(name: 'payments') List<OrderPaymentDto>? payments,
|
||
|
|
@JsonKey(name: 'total_paid') int? totalPaid,
|
||
|
|
@JsonKey(name: 'payment_count') int? paymentCount,
|
||
|
|
@JsonKey(name: 'split_type') String? splitType,
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
/// @nodoc
|
||
|
|
class _$OrderDtoCopyWithImpl<$Res, $Val extends OrderDto>
|
||
|
|
implements $OrderDtoCopyWith<$Res> {
|
||
|
|
_$OrderDtoCopyWithImpl(this._value, this._then);
|
||
|
|
|
||
|
|
// ignore: unused_field
|
||
|
|
final $Val _value;
|
||
|
|
// ignore: unused_field
|
||
|
|
final $Res Function($Val) _then;
|
||
|
|
|
||
|
|
/// Create a copy of OrderDto
|
||
|
|
/// with the given fields replaced by the non-null parameter values.
|
||
|
|
@pragma('vm:prefer-inline')
|
||
|
|
@override
|
||
|
|
$Res call({
|
||
|
|
Object? id = freezed,
|
||
|
|
Object? orderNumber = freezed,
|
||
|
|
Object? outletId = freezed,
|
||
|
|
Object? userId = freezed,
|
||
|
|
Object? tableNumber = freezed,
|
||
|
|
Object? orderType = freezed,
|
||
|
|
Object? status = freezed,
|
||
|
|
Object? subtotal = freezed,
|
||
|
|
Object? taxAmount = freezed,
|
||
|
|
Object? discountAmount = freezed,
|
||
|
|
Object? totalAmount = freezed,
|
||
|
|
Object? totalCost = freezed,
|
||
|
|
Object? remainingAmount = freezed,
|
||
|
|
Object? paymentStatus = freezed,
|
||
|
|
Object? refundAmount = freezed,
|
||
|
|
Object? isVoid = freezed,
|
||
|
|
Object? isRefund = freezed,
|
||
|
|
Object? notes = freezed,
|
||
|
|
Object? metadata = freezed,
|
||
|
|
Object? createdAt = freezed,
|
||
|
|
Object? updatedAt = freezed,
|
||
|
|
Object? orderItems = freezed,
|
||
|
|
Object? payments = freezed,
|
||
|
|
Object? totalPaid = freezed,
|
||
|
|
Object? paymentCount = freezed,
|
||
|
|
Object? splitType = freezed,
|
||
|
|
}) {
|
||
|
|
return _then(
|
||
|
|
_value.copyWith(
|
||
|
|
id: freezed == id
|
||
|
|
? _value.id
|
||
|
|
: id // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String?,
|
||
|
|
orderNumber: freezed == orderNumber
|
||
|
|
? _value.orderNumber
|
||
|
|
: orderNumber // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String?,
|
||
|
|
outletId: freezed == outletId
|
||
|
|
? _value.outletId
|
||
|
|
: outletId // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String?,
|
||
|
|
userId: freezed == userId
|
||
|
|
? _value.userId
|
||
|
|
: userId // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String?,
|
||
|
|
tableNumber: freezed == tableNumber
|
||
|
|
? _value.tableNumber
|
||
|
|
: tableNumber // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String?,
|
||
|
|
orderType: freezed == orderType
|
||
|
|
? _value.orderType
|
||
|
|
: orderType // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String?,
|
||
|
|
status: freezed == status
|
||
|
|
? _value.status
|
||
|
|
: status // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String?,
|
||
|
|
subtotal: freezed == subtotal
|
||
|
|
? _value.subtotal
|
||
|
|
: subtotal // ignore: cast_nullable_to_non_nullable
|
||
|
|
as int?,
|
||
|
|
taxAmount: freezed == taxAmount
|
||
|
|
? _value.taxAmount
|
||
|
|
: taxAmount // ignore: cast_nullable_to_non_nullable
|
||
|
|
as int?,
|
||
|
|
discountAmount: freezed == discountAmount
|
||
|
|
? _value.discountAmount
|
||
|
|
: discountAmount // ignore: cast_nullable_to_non_nullable
|
||
|
|
as int?,
|
||
|
|
totalAmount: freezed == totalAmount
|
||
|
|
? _value.totalAmount
|
||
|
|
: totalAmount // ignore: cast_nullable_to_non_nullable
|
||
|
|
as int?,
|
||
|
|
totalCost: freezed == totalCost
|
||
|
|
? _value.totalCost
|
||
|
|
: totalCost // ignore: cast_nullable_to_non_nullable
|
||
|
|
as int?,
|
||
|
|
remainingAmount: freezed == remainingAmount
|
||
|
|
? _value.remainingAmount
|
||
|
|
: remainingAmount // ignore: cast_nullable_to_non_nullable
|
||
|
|
as int?,
|
||
|
|
paymentStatus: freezed == paymentStatus
|
||
|
|
? _value.paymentStatus
|
||
|
|
: paymentStatus // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String?,
|
||
|
|
refundAmount: freezed == refundAmount
|
||
|
|
? _value.refundAmount
|
||
|
|
: refundAmount // ignore: cast_nullable_to_non_nullable
|
||
|
|
as int?,
|
||
|
|
isVoid: freezed == isVoid
|
||
|
|
? _value.isVoid
|
||
|
|
: isVoid // ignore: cast_nullable_to_non_nullable
|
||
|
|
as bool?,
|
||
|
|
isRefund: freezed == isRefund
|
||
|
|
? _value.isRefund
|
||
|
|
: isRefund // ignore: cast_nullable_to_non_nullable
|
||
|
|
as bool?,
|
||
|
|
notes: freezed == notes
|
||
|
|
? _value.notes
|
||
|
|
: notes // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String?,
|
||
|
|
metadata: freezed == metadata
|
||
|
|
? _value.metadata
|
||
|
|
: metadata // ignore: cast_nullable_to_non_nullable
|
||
|
|
as Map<String, dynamic>?,
|
||
|
|
createdAt: freezed == createdAt
|
||
|
|
? _value.createdAt
|
||
|
|
: createdAt // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String?,
|
||
|
|
updatedAt: freezed == updatedAt
|
||
|
|
? _value.updatedAt
|
||
|
|
: updatedAt // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String?,
|
||
|
|
orderItems: freezed == orderItems
|
||
|
|
? _value.orderItems
|
||
|
|
: orderItems // ignore: cast_nullable_to_non_nullable
|
||
|
|
as List<OrderItemDto>?,
|
||
|
|
payments: freezed == payments
|
||
|
|
? _value.payments
|
||
|
|
: payments // ignore: cast_nullable_to_non_nullable
|
||
|
|
as List<OrderPaymentDto>?,
|
||
|
|
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') int? totalCost,
|
||
|
|
@JsonKey(name: 'remaining_amount') int? remainingAmount,
|
||
|
|
@JsonKey(name: 'payment_status') String? paymentStatus,
|
||
|
|
@JsonKey(name: 'refund_amount') int? refundAmount,
|
||
|
|
@JsonKey(name: 'is_void') bool? isVoid,
|
||
|
|
@JsonKey(name: 'is_refund') bool? isRefund,
|
||
|
|
@JsonKey(name: 'notes') String? notes,
|
||
|
|
@JsonKey(name: 'metadata') Map<String, dynamic>? metadata,
|
||
|
|
@JsonKey(name: 'created_at') String? createdAt,
|
||
|
|
@JsonKey(name: 'updated_at') String? updatedAt,
|
||
|
|
@JsonKey(name: 'order_items') List<OrderItemDto>? orderItems,
|
||
|
|
@JsonKey(name: 'payments') List<OrderPaymentDto>? payments,
|
||
|
|
@JsonKey(name: 'total_paid') int? totalPaid,
|
||
|
|
@JsonKey(name: 'payment_count') int? paymentCount,
|
||
|
|
@JsonKey(name: 'split_type') String? splitType,
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
/// @nodoc
|
||
|
|
class __$$OrderDtoImplCopyWithImpl<$Res>
|
||
|
|
extends _$OrderDtoCopyWithImpl<$Res, _$OrderDtoImpl>
|
||
|
|
implements _$$OrderDtoImplCopyWith<$Res> {
|
||
|
|
__$$OrderDtoImplCopyWithImpl(
|
||
|
|
_$OrderDtoImpl _value,
|
||
|
|
$Res Function(_$OrderDtoImpl) _then,
|
||
|
|
) : super(_value, _then);
|
||
|
|
|
||
|
|
/// Create a copy of OrderDto
|
||
|
|
/// with the given fields replaced by the non-null parameter values.
|
||
|
|
@pragma('vm:prefer-inline')
|
||
|
|
@override
|
||
|
|
$Res call({
|
||
|
|
Object? id = freezed,
|
||
|
|
Object? orderNumber = freezed,
|
||
|
|
Object? outletId = freezed,
|
||
|
|
Object? userId = freezed,
|
||
|
|
Object? tableNumber = freezed,
|
||
|
|
Object? orderType = freezed,
|
||
|
|
Object? status = freezed,
|
||
|
|
Object? subtotal = freezed,
|
||
|
|
Object? taxAmount = freezed,
|
||
|
|
Object? discountAmount = freezed,
|
||
|
|
Object? totalAmount = freezed,
|
||
|
|
Object? totalCost = freezed,
|
||
|
|
Object? remainingAmount = freezed,
|
||
|
|
Object? paymentStatus = freezed,
|
||
|
|
Object? refundAmount = freezed,
|
||
|
|
Object? isVoid = freezed,
|
||
|
|
Object? isRefund = freezed,
|
||
|
|
Object? notes = freezed,
|
||
|
|
Object? metadata = freezed,
|
||
|
|
Object? createdAt = freezed,
|
||
|
|
Object? updatedAt = freezed,
|
||
|
|
Object? orderItems = freezed,
|
||
|
|
Object? payments = freezed,
|
||
|
|
Object? totalPaid = freezed,
|
||
|
|
Object? paymentCount = freezed,
|
||
|
|
Object? splitType = freezed,
|
||
|
|
}) {
|
||
|
|
return _then(
|
||
|
|
_$OrderDtoImpl(
|
||
|
|
id: freezed == id
|
||
|
|
? _value.id
|
||
|
|
: id // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String?,
|
||
|
|
orderNumber: freezed == orderNumber
|
||
|
|
? _value.orderNumber
|
||
|
|
: orderNumber // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String?,
|
||
|
|
outletId: freezed == outletId
|
||
|
|
? _value.outletId
|
||
|
|
: outletId // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String?,
|
||
|
|
userId: freezed == userId
|
||
|
|
? _value.userId
|
||
|
|
: userId // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String?,
|
||
|
|
tableNumber: freezed == tableNumber
|
||
|
|
? _value.tableNumber
|
||
|
|
: tableNumber // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String?,
|
||
|
|
orderType: freezed == orderType
|
||
|
|
? _value.orderType
|
||
|
|
: orderType // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String?,
|
||
|
|
status: freezed == status
|
||
|
|
? _value.status
|
||
|
|
: status // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String?,
|
||
|
|
subtotal: freezed == subtotal
|
||
|
|
? _value.subtotal
|
||
|
|
: subtotal // ignore: cast_nullable_to_non_nullable
|
||
|
|
as int?,
|
||
|
|
taxAmount: freezed == taxAmount
|
||
|
|
? _value.taxAmount
|
||
|
|
: taxAmount // ignore: cast_nullable_to_non_nullable
|
||
|
|
as int?,
|
||
|
|
discountAmount: freezed == discountAmount
|
||
|
|
? _value.discountAmount
|
||
|
|
: discountAmount // ignore: cast_nullable_to_non_nullable
|
||
|
|
as int?,
|
||
|
|
totalAmount: freezed == totalAmount
|
||
|
|
? _value.totalAmount
|
||
|
|
: totalAmount // ignore: cast_nullable_to_non_nullable
|
||
|
|
as int?,
|
||
|
|
totalCost: freezed == totalCost
|
||
|
|
? _value.totalCost
|
||
|
|
: totalCost // ignore: cast_nullable_to_non_nullable
|
||
|
|
as int?,
|
||
|
|
remainingAmount: freezed == remainingAmount
|
||
|
|
? _value.remainingAmount
|
||
|
|
: remainingAmount // ignore: cast_nullable_to_non_nullable
|
||
|
|
as int?,
|
||
|
|
paymentStatus: freezed == paymentStatus
|
||
|
|
? _value.paymentStatus
|
||
|
|
: paymentStatus // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String?,
|
||
|
|
refundAmount: freezed == refundAmount
|
||
|
|
? _value.refundAmount
|
||
|
|
: refundAmount // ignore: cast_nullable_to_non_nullable
|
||
|
|
as int?,
|
||
|
|
isVoid: freezed == isVoid
|
||
|
|
? _value.isVoid
|
||
|
|
: isVoid // ignore: cast_nullable_to_non_nullable
|
||
|
|
as bool?,
|
||
|
|
isRefund: freezed == isRefund
|
||
|
|
? _value.isRefund
|
||
|
|
: isRefund // ignore: cast_nullable_to_non_nullable
|
||
|
|
as bool?,
|
||
|
|
notes: freezed == notes
|
||
|
|
? _value.notes
|
||
|
|
: notes // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String?,
|
||
|
|
metadata: freezed == metadata
|
||
|
|
? _value._metadata
|
||
|
|
: metadata // ignore: cast_nullable_to_non_nullable
|
||
|
|
as Map<String, dynamic>?,
|
||
|
|
createdAt: freezed == createdAt
|
||
|
|
? _value.createdAt
|
||
|
|
: createdAt // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String?,
|
||
|
|
updatedAt: freezed == updatedAt
|
||
|
|
? _value.updatedAt
|
||
|
|
: updatedAt // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String?,
|
||
|
|
orderItems: freezed == orderItems
|
||
|
|
? _value._orderItems
|
||
|
|
: orderItems // ignore: cast_nullable_to_non_nullable
|
||
|
|
as List<OrderItemDto>?,
|
||
|
|
payments: freezed == payments
|
||
|
|
? _value._payments
|
||
|
|
: payments // ignore: cast_nullable_to_non_nullable
|
||
|
|
as List<OrderPaymentDto>?,
|
||
|
|
totalPaid: freezed == totalPaid
|
||
|
|
? _value.totalPaid
|
||
|
|
: totalPaid // ignore: cast_nullable_to_non_nullable
|
||
|
|
as int?,
|
||
|
|
paymentCount: freezed == paymentCount
|
||
|
|
? _value.paymentCount
|
||
|
|
: paymentCount // ignore: cast_nullable_to_non_nullable
|
||
|
|
as int?,
|
||
|
|
splitType: freezed == splitType
|
||
|
|
? _value.splitType
|
||
|
|
: splitType // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String?,
|
||
|
|
),
|
||
|
|
);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
/// @nodoc
|
||
|
|
@JsonSerializable()
|
||
|
|
class _$OrderDtoImpl extends _OrderDto {
|
||
|
|
const _$OrderDtoImpl({
|
||
|
|
@JsonKey(name: 'id') this.id,
|
||
|
|
@JsonKey(name: 'order_number') this.orderNumber,
|
||
|
|
@JsonKey(name: 'outlet_id') this.outletId,
|
||
|
|
@JsonKey(name: 'user_id') this.userId,
|
||
|
|
@JsonKey(name: 'table_number') this.tableNumber,
|
||
|
|
@JsonKey(name: 'order_type') this.orderType,
|
||
|
|
@JsonKey(name: 'status') this.status,
|
||
|
|
@JsonKey(name: 'subtotal') this.subtotal,
|
||
|
|
@JsonKey(name: 'tax_amount') this.taxAmount,
|
||
|
|
@JsonKey(name: 'discount_amount') this.discountAmount,
|
||
|
|
@JsonKey(name: 'total_amount') this.totalAmount,
|
||
|
|
@JsonKey(name: 'total_cost') this.totalCost,
|
||
|
|
@JsonKey(name: 'remaining_amount') this.remainingAmount,
|
||
|
|
@JsonKey(name: 'payment_status') this.paymentStatus,
|
||
|
|
@JsonKey(name: 'refund_amount') this.refundAmount,
|
||
|
|
@JsonKey(name: 'is_void') this.isVoid,
|
||
|
|
@JsonKey(name: 'is_refund') this.isRefund,
|
||
|
|
@JsonKey(name: 'notes') this.notes,
|
||
|
|
@JsonKey(name: 'metadata') final Map<String, dynamic>? metadata,
|
||
|
|
@JsonKey(name: 'created_at') this.createdAt,
|
||
|
|
@JsonKey(name: 'updated_at') this.updatedAt,
|
||
|
|
@JsonKey(name: 'order_items') final List<OrderItemDto>? orderItems,
|
||
|
|
@JsonKey(name: 'payments') final List<OrderPaymentDto>? payments,
|
||
|
|
@JsonKey(name: 'total_paid') this.totalPaid,
|
||
|
|
@JsonKey(name: 'payment_count') this.paymentCount,
|
||
|
|
@JsonKey(name: 'split_type') this.splitType,
|
||
|
|
}) : _metadata = metadata,
|
||
|
|
_orderItems = orderItems,
|
||
|
|
_payments = payments,
|
||
|
|
super._();
|
||
|
|
|
||
|
|
factory _$OrderDtoImpl.fromJson(Map<String, dynamic> json) =>
|
||
|
|
_$$OrderDtoImplFromJson(json);
|
||
|
|
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'id')
|
||
|
|
final String? id;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'order_number')
|
||
|
|
final String? orderNumber;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'outlet_id')
|
||
|
|
final String? outletId;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'user_id')
|
||
|
|
final String? userId;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'table_number')
|
||
|
|
final String? tableNumber;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'order_type')
|
||
|
|
final String? orderType;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'status')
|
||
|
|
final String? status;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'subtotal')
|
||
|
|
final int? subtotal;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'tax_amount')
|
||
|
|
final int? taxAmount;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'discount_amount')
|
||
|
|
final int? discountAmount;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'total_amount')
|
||
|
|
final int? totalAmount;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'total_cost')
|
||
|
|
final int? totalCost;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'remaining_amount')
|
||
|
|
final int? remainingAmount;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'payment_status')
|
||
|
|
final String? paymentStatus;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'refund_amount')
|
||
|
|
final int? refundAmount;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'is_void')
|
||
|
|
final bool? isVoid;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'is_refund')
|
||
|
|
final bool? isRefund;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'notes')
|
||
|
|
final String? notes;
|
||
|
|
final Map<String, dynamic>? _metadata;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'metadata')
|
||
|
|
Map<String, dynamic>? get metadata {
|
||
|
|
final value = _metadata;
|
||
|
|
if (value == null) return null;
|
||
|
|
if (_metadata is EqualUnmodifiableMapView) return _metadata;
|
||
|
|
// ignore: implicit_dynamic_type
|
||
|
|
return EqualUnmodifiableMapView(value);
|
||
|
|
}
|
||
|
|
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'created_at')
|
||
|
|
final String? createdAt;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'updated_at')
|
||
|
|
final String? updatedAt;
|
||
|
|
final List<OrderItemDto>? _orderItems;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'order_items')
|
||
|
|
List<OrderItemDto>? get orderItems {
|
||
|
|
final value = _orderItems;
|
||
|
|
if (value == null) return null;
|
||
|
|
if (_orderItems is EqualUnmodifiableListView) return _orderItems;
|
||
|
|
// ignore: implicit_dynamic_type
|
||
|
|
return EqualUnmodifiableListView(value);
|
||
|
|
}
|
||
|
|
|
||
|
|
final List<OrderPaymentDto>? _payments;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'payments')
|
||
|
|
List<OrderPaymentDto>? get payments {
|
||
|
|
final value = _payments;
|
||
|
|
if (value == null) return null;
|
||
|
|
if (_payments is EqualUnmodifiableListView) return _payments;
|
||
|
|
// ignore: implicit_dynamic_type
|
||
|
|
return EqualUnmodifiableListView(value);
|
||
|
|
}
|
||
|
|
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'total_paid')
|
||
|
|
final int? totalPaid;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'payment_count')
|
||
|
|
final int? paymentCount;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'split_type')
|
||
|
|
final String? splitType;
|
||
|
|
|
||
|
|
@override
|
||
|
|
String toString() {
|
||
|
|
return 'OrderDto(id: $id, orderNumber: $orderNumber, outletId: $outletId, userId: $userId, tableNumber: $tableNumber, orderType: $orderType, status: $status, subtotal: $subtotal, taxAmount: $taxAmount, discountAmount: $discountAmount, totalAmount: $totalAmount, totalCost: $totalCost, remainingAmount: $remainingAmount, paymentStatus: $paymentStatus, refundAmount: $refundAmount, isVoid: $isVoid, isRefund: $isRefund, notes: $notes, metadata: $metadata, createdAt: $createdAt, updatedAt: $updatedAt, orderItems: $orderItems, payments: $payments, totalPaid: $totalPaid, paymentCount: $paymentCount, splitType: $splitType)';
|
||
|
|
}
|
||
|
|
|
||
|
|
@override
|
||
|
|
bool operator ==(Object other) {
|
||
|
|
return identical(this, other) ||
|
||
|
|
(other.runtimeType == runtimeType &&
|
||
|
|
other is _$OrderDtoImpl &&
|
||
|
|
(identical(other.id, id) || other.id == id) &&
|
||
|
|
(identical(other.orderNumber, orderNumber) ||
|
||
|
|
other.orderNumber == orderNumber) &&
|
||
|
|
(identical(other.outletId, outletId) ||
|
||
|
|
other.outletId == outletId) &&
|
||
|
|
(identical(other.userId, userId) || other.userId == userId) &&
|
||
|
|
(identical(other.tableNumber, tableNumber) ||
|
||
|
|
other.tableNumber == tableNumber) &&
|
||
|
|
(identical(other.orderType, orderType) ||
|
||
|
|
other.orderType == orderType) &&
|
||
|
|
(identical(other.status, status) || other.status == status) &&
|
||
|
|
(identical(other.subtotal, subtotal) ||
|
||
|
|
other.subtotal == subtotal) &&
|
||
|
|
(identical(other.taxAmount, taxAmount) ||
|
||
|
|
other.taxAmount == taxAmount) &&
|
||
|
|
(identical(other.discountAmount, discountAmount) ||
|
||
|
|
other.discountAmount == discountAmount) &&
|
||
|
|
(identical(other.totalAmount, totalAmount) ||
|
||
|
|
other.totalAmount == totalAmount) &&
|
||
|
|
(identical(other.totalCost, totalCost) ||
|
||
|
|
other.totalCost == totalCost) &&
|
||
|
|
(identical(other.remainingAmount, remainingAmount) ||
|
||
|
|
other.remainingAmount == remainingAmount) &&
|
||
|
|
(identical(other.paymentStatus, paymentStatus) ||
|
||
|
|
other.paymentStatus == paymentStatus) &&
|
||
|
|
(identical(other.refundAmount, refundAmount) ||
|
||
|
|
other.refundAmount == refundAmount) &&
|
||
|
|
(identical(other.isVoid, isVoid) || other.isVoid == isVoid) &&
|
||
|
|
(identical(other.isRefund, isRefund) ||
|
||
|
|
other.isRefund == isRefund) &&
|
||
|
|
(identical(other.notes, notes) || other.notes == notes) &&
|
||
|
|
const DeepCollectionEquality().equals(other._metadata, _metadata) &&
|
||
|
|
(identical(other.createdAt, createdAt) ||
|
||
|
|
other.createdAt == createdAt) &&
|
||
|
|
(identical(other.updatedAt, updatedAt) ||
|
||
|
|
other.updatedAt == updatedAt) &&
|
||
|
|
const DeepCollectionEquality().equals(
|
||
|
|
other._orderItems,
|
||
|
|
_orderItems,
|
||
|
|
) &&
|
||
|
|
const DeepCollectionEquality().equals(other._payments, _payments) &&
|
||
|
|
(identical(other.totalPaid, totalPaid) ||
|
||
|
|
other.totalPaid == totalPaid) &&
|
||
|
|
(identical(other.paymentCount, paymentCount) ||
|
||
|
|
other.paymentCount == paymentCount) &&
|
||
|
|
(identical(other.splitType, splitType) ||
|
||
|
|
other.splitType == splitType));
|
||
|
|
}
|
||
|
|
|
||
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||
|
|
@override
|
||
|
|
int get hashCode => Object.hashAll([
|
||
|
|
runtimeType,
|
||
|
|
id,
|
||
|
|
orderNumber,
|
||
|
|
outletId,
|
||
|
|
userId,
|
||
|
|
tableNumber,
|
||
|
|
orderType,
|
||
|
|
status,
|
||
|
|
subtotal,
|
||
|
|
taxAmount,
|
||
|
|
discountAmount,
|
||
|
|
totalAmount,
|
||
|
|
totalCost,
|
||
|
|
remainingAmount,
|
||
|
|
paymentStatus,
|
||
|
|
refundAmount,
|
||
|
|
isVoid,
|
||
|
|
isRefund,
|
||
|
|
notes,
|
||
|
|
const DeepCollectionEquality().hash(_metadata),
|
||
|
|
createdAt,
|
||
|
|
updatedAt,
|
||
|
|
const DeepCollectionEquality().hash(_orderItems),
|
||
|
|
const DeepCollectionEquality().hash(_payments),
|
||
|
|
totalPaid,
|
||
|
|
paymentCount,
|
||
|
|
splitType,
|
||
|
|
]);
|
||
|
|
|
||
|
|
/// Create a copy of OrderDto
|
||
|
|
/// with the given fields replaced by the non-null parameter values.
|
||
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||
|
|
@override
|
||
|
|
@pragma('vm:prefer-inline')
|
||
|
|
_$$OrderDtoImplCopyWith<_$OrderDtoImpl> get copyWith =>
|
||
|
|
__$$OrderDtoImplCopyWithImpl<_$OrderDtoImpl>(this, _$identity);
|
||
|
|
|
||
|
|
@override
|
||
|
|
Map<String, dynamic> toJson() {
|
||
|
|
return _$$OrderDtoImplToJson(this);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
abstract class _OrderDto extends OrderDto {
|
||
|
|
const factory _OrderDto({
|
||
|
|
@JsonKey(name: 'id') final String? id,
|
||
|
|
@JsonKey(name: 'order_number') final String? orderNumber,
|
||
|
|
@JsonKey(name: 'outlet_id') final String? outletId,
|
||
|
|
@JsonKey(name: 'user_id') final String? userId,
|
||
|
|
@JsonKey(name: 'table_number') final String? tableNumber,
|
||
|
|
@JsonKey(name: 'order_type') final String? orderType,
|
||
|
|
@JsonKey(name: 'status') final String? status,
|
||
|
|
@JsonKey(name: 'subtotal') final int? subtotal,
|
||
|
|
@JsonKey(name: 'tax_amount') final int? taxAmount,
|
||
|
|
@JsonKey(name: 'discount_amount') final int? discountAmount,
|
||
|
|
@JsonKey(name: 'total_amount') final int? totalAmount,
|
||
|
|
@JsonKey(name: 'total_cost') final int? totalCost,
|
||
|
|
@JsonKey(name: 'remaining_amount') final int? remainingAmount,
|
||
|
|
@JsonKey(name: 'payment_status') final String? paymentStatus,
|
||
|
|
@JsonKey(name: 'refund_amount') final int? refundAmount,
|
||
|
|
@JsonKey(name: 'is_void') final bool? isVoid,
|
||
|
|
@JsonKey(name: 'is_refund') final bool? isRefund,
|
||
|
|
@JsonKey(name: 'notes') final String? notes,
|
||
|
|
@JsonKey(name: 'metadata') final Map<String, dynamic>? metadata,
|
||
|
|
@JsonKey(name: 'created_at') final String? createdAt,
|
||
|
|
@JsonKey(name: 'updated_at') final String? updatedAt,
|
||
|
|
@JsonKey(name: 'order_items') final List<OrderItemDto>? orderItems,
|
||
|
|
@JsonKey(name: 'payments') final List<OrderPaymentDto>? payments,
|
||
|
|
@JsonKey(name: 'total_paid') final int? totalPaid,
|
||
|
|
@JsonKey(name: 'payment_count') final int? paymentCount,
|
||
|
|
@JsonKey(name: 'split_type') final String? splitType,
|
||
|
|
}) = _$OrderDtoImpl;
|
||
|
|
const _OrderDto._() : super._();
|
||
|
|
|
||
|
|
factory _OrderDto.fromJson(Map<String, dynamic> json) =
|
||
|
|
_$OrderDtoImpl.fromJson;
|
||
|
|
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'id')
|
||
|
|
String? get id;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'order_number')
|
||
|
|
String? get orderNumber;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'outlet_id')
|
||
|
|
String? get outletId;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'user_id')
|
||
|
|
String? get userId;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'table_number')
|
||
|
|
String? get tableNumber;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'order_type')
|
||
|
|
String? get orderType;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'status')
|
||
|
|
String? get status;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'subtotal')
|
||
|
|
int? get subtotal;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'tax_amount')
|
||
|
|
int? get taxAmount;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'discount_amount')
|
||
|
|
int? get discountAmount;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'total_amount')
|
||
|
|
int? get totalAmount;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'total_cost')
|
||
|
|
int? get totalCost;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'remaining_amount')
|
||
|
|
int? get remainingAmount;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'payment_status')
|
||
|
|
String? get paymentStatus;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'refund_amount')
|
||
|
|
int? get refundAmount;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'is_void')
|
||
|
|
bool? get isVoid;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'is_refund')
|
||
|
|
bool? get isRefund;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'notes')
|
||
|
|
String? get notes;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'metadata')
|
||
|
|
Map<String, dynamic>? get metadata;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'created_at')
|
||
|
|
String? get createdAt;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'updated_at')
|
||
|
|
String? get updatedAt;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'order_items')
|
||
|
|
List<OrderItemDto>? get orderItems;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'payments')
|
||
|
|
List<OrderPaymentDto>? get payments;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'total_paid')
|
||
|
|
int? get totalPaid;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'payment_count')
|
||
|
|
int? get paymentCount;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'split_type')
|
||
|
|
String? get splitType;
|
||
|
|
|
||
|
|
/// Create a copy of OrderDto
|
||
|
|
/// with the given fields replaced by the non-null parameter values.
|
||
|
|
@override
|
||
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||
|
|
_$$OrderDtoImplCopyWith<_$OrderDtoImpl> get copyWith =>
|
||
|
|
throw _privateConstructorUsedError;
|
||
|
|
}
|
||
|
|
|
||
|
|
OrderItemDto _$OrderItemDtoFromJson(Map<String, dynamic> json) {
|
||
|
|
return _OrderItemDto.fromJson(json);
|
||
|
|
}
|
||
|
|
|
||
|
|
/// @nodoc
|
||
|
|
mixin _$OrderItemDto {
|
||
|
|
@JsonKey(name: 'id')
|
||
|
|
String? get id => throw _privateConstructorUsedError;
|
||
|
|
@JsonKey(name: 'order_id')
|
||
|
|
String? get orderId => throw _privateConstructorUsedError;
|
||
|
|
@JsonKey(name: 'product_id')
|
||
|
|
String? get productId => throw _privateConstructorUsedError;
|
||
|
|
@JsonKey(name: 'product_name')
|
||
|
|
String? get productName => throw _privateConstructorUsedError;
|
||
|
|
@JsonKey(name: 'quantity')
|
||
|
|
int? get quantity => throw _privateConstructorUsedError;
|
||
|
|
@JsonKey(name: 'price')
|
||
|
|
int? get price => throw _privateConstructorUsedError;
|
||
|
|
@JsonKey(name: 'subtotal')
|
||
|
|
int? get subtotal => throw _privateConstructorUsedError;
|
||
|
|
@JsonKey(name: 'discount_amount')
|
||
|
|
int? get discountAmount => throw _privateConstructorUsedError;
|
||
|
|
@JsonKey(name: 'total')
|
||
|
|
int? get total => throw _privateConstructorUsedError;
|
||
|
|
@JsonKey(name: 'cost')
|
||
|
|
int? get cost => 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 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: 'quantity') int? quantity,
|
||
|
|
@JsonKey(name: 'price') int? price,
|
||
|
|
@JsonKey(name: 'subtotal') int? subtotal,
|
||
|
|
@JsonKey(name: 'discount_amount') int? discountAmount,
|
||
|
|
@JsonKey(name: 'total') int? total,
|
||
|
|
@JsonKey(name: 'cost') int? cost,
|
||
|
|
@JsonKey(name: 'metadata') Map<String, dynamic>? metadata,
|
||
|
|
@JsonKey(name: 'created_at') String? createdAt,
|
||
|
|
@JsonKey(name: 'updated_at') String? updatedAt,
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
/// @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? quantity = freezed,
|
||
|
|
Object? price = freezed,
|
||
|
|
Object? subtotal = freezed,
|
||
|
|
Object? discountAmount = freezed,
|
||
|
|
Object? total = freezed,
|
||
|
|
Object? cost = 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?,
|
||
|
|
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?,
|
||
|
|
quantity: freezed == quantity
|
||
|
|
? _value.quantity
|
||
|
|
: quantity // ignore: cast_nullable_to_non_nullable
|
||
|
|
as int?,
|
||
|
|
price: freezed == price
|
||
|
|
? _value.price
|
||
|
|
: price // ignore: cast_nullable_to_non_nullable
|
||
|
|
as int?,
|
||
|
|
subtotal: freezed == subtotal
|
||
|
|
? _value.subtotal
|
||
|
|
: subtotal // ignore: cast_nullable_to_non_nullable
|
||
|
|
as int?,
|
||
|
|
discountAmount: freezed == discountAmount
|
||
|
|
? _value.discountAmount
|
||
|
|
: discountAmount // ignore: cast_nullable_to_non_nullable
|
||
|
|
as int?,
|
||
|
|
total: freezed == total
|
||
|
|
? _value.total
|
||
|
|
: total // ignore: cast_nullable_to_non_nullable
|
||
|
|
as int?,
|
||
|
|
cost: freezed == cost
|
||
|
|
? _value.cost
|
||
|
|
: cost // 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 _$$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: 'quantity') int? quantity,
|
||
|
|
@JsonKey(name: 'price') int? price,
|
||
|
|
@JsonKey(name: 'subtotal') int? subtotal,
|
||
|
|
@JsonKey(name: 'discount_amount') int? discountAmount,
|
||
|
|
@JsonKey(name: 'total') int? total,
|
||
|
|
@JsonKey(name: 'cost') int? cost,
|
||
|
|
@JsonKey(name: 'metadata') Map<String, dynamic>? metadata,
|
||
|
|
@JsonKey(name: 'created_at') String? createdAt,
|
||
|
|
@JsonKey(name: 'updated_at') String? updatedAt,
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
/// @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? quantity = freezed,
|
||
|
|
Object? price = freezed,
|
||
|
|
Object? subtotal = freezed,
|
||
|
|
Object? discountAmount = freezed,
|
||
|
|
Object? total = freezed,
|
||
|
|
Object? cost = freezed,
|
||
|
|
Object? metadata = freezed,
|
||
|
|
Object? createdAt = freezed,
|
||
|
|
Object? updatedAt = 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?,
|
||
|
|
quantity: freezed == quantity
|
||
|
|
? _value.quantity
|
||
|
|
: quantity // ignore: cast_nullable_to_non_nullable
|
||
|
|
as int?,
|
||
|
|
price: freezed == price
|
||
|
|
? _value.price
|
||
|
|
: price // ignore: cast_nullable_to_non_nullable
|
||
|
|
as int?,
|
||
|
|
subtotal: freezed == subtotal
|
||
|
|
? _value.subtotal
|
||
|
|
: subtotal // ignore: cast_nullable_to_non_nullable
|
||
|
|
as int?,
|
||
|
|
discountAmount: freezed == discountAmount
|
||
|
|
? _value.discountAmount
|
||
|
|
: discountAmount // ignore: cast_nullable_to_non_nullable
|
||
|
|
as int?,
|
||
|
|
total: freezed == total
|
||
|
|
? _value.total
|
||
|
|
: total // ignore: cast_nullable_to_non_nullable
|
||
|
|
as int?,
|
||
|
|
cost: freezed == cost
|
||
|
|
? _value.cost
|
||
|
|
: cost // 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 _$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: 'quantity') this.quantity,
|
||
|
|
@JsonKey(name: 'price') this.price,
|
||
|
|
@JsonKey(name: 'subtotal') this.subtotal,
|
||
|
|
@JsonKey(name: 'discount_amount') this.discountAmount,
|
||
|
|
@JsonKey(name: 'total') this.total,
|
||
|
|
@JsonKey(name: 'cost') this.cost,
|
||
|
|
@JsonKey(name: 'metadata') final Map<String, dynamic>? metadata,
|
||
|
|
@JsonKey(name: 'created_at') this.createdAt,
|
||
|
|
@JsonKey(name: 'updated_at') this.updatedAt,
|
||
|
|
}) : _metadata = metadata,
|
||
|
|
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: 'quantity')
|
||
|
|
final int? quantity;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'price')
|
||
|
|
final int? price;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'subtotal')
|
||
|
|
final int? subtotal;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'discount_amount')
|
||
|
|
final int? discountAmount;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'total')
|
||
|
|
final int? total;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'cost')
|
||
|
|
final int? cost;
|
||
|
|
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 'OrderItemDto(id: $id, orderId: $orderId, productId: $productId, productName: $productName, quantity: $quantity, price: $price, subtotal: $subtotal, discountAmount: $discountAmount, total: $total, cost: $cost, metadata: $metadata, createdAt: $createdAt, updatedAt: $updatedAt)';
|
||
|
|
}
|
||
|
|
|
||
|
|
@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.quantity, quantity) ||
|
||
|
|
other.quantity == quantity) &&
|
||
|
|
(identical(other.price, price) || other.price == price) &&
|
||
|
|
(identical(other.subtotal, subtotal) ||
|
||
|
|
other.subtotal == subtotal) &&
|
||
|
|
(identical(other.discountAmount, discountAmount) ||
|
||
|
|
other.discountAmount == discountAmount) &&
|
||
|
|
(identical(other.total, total) || other.total == total) &&
|
||
|
|
(identical(other.cost, cost) || other.cost == cost) &&
|
||
|
|
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,
|
||
|
|
productId,
|
||
|
|
productName,
|
||
|
|
quantity,
|
||
|
|
price,
|
||
|
|
subtotal,
|
||
|
|
discountAmount,
|
||
|
|
total,
|
||
|
|
cost,
|
||
|
|
const DeepCollectionEquality().hash(_metadata),
|
||
|
|
createdAt,
|
||
|
|
updatedAt,
|
||
|
|
);
|
||
|
|
|
||
|
|
/// 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: 'quantity') final int? quantity,
|
||
|
|
@JsonKey(name: 'price') final int? price,
|
||
|
|
@JsonKey(name: 'subtotal') final int? subtotal,
|
||
|
|
@JsonKey(name: 'discount_amount') final int? discountAmount,
|
||
|
|
@JsonKey(name: 'total') final int? total,
|
||
|
|
@JsonKey(name: 'cost') final int? cost,
|
||
|
|
@JsonKey(name: 'metadata') final Map<String, dynamic>? metadata,
|
||
|
|
@JsonKey(name: 'created_at') final String? createdAt,
|
||
|
|
@JsonKey(name: 'updated_at') final String? updatedAt,
|
||
|
|
}) = _$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: 'quantity')
|
||
|
|
int? get quantity;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'price')
|
||
|
|
int? get price;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'subtotal')
|
||
|
|
int? get subtotal;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'discount_amount')
|
||
|
|
int? get discountAmount;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'total')
|
||
|
|
int? get total;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'cost')
|
||
|
|
int? get cost;
|
||
|
|
@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 OrderItemDto
|
||
|
|
/// with the given fields replaced by the non-null parameter values.
|
||
|
|
@override
|
||
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||
|
|
_$$OrderItemDtoImplCopyWith<_$OrderItemDtoImpl> get copyWith =>
|
||
|
|
throw _privateConstructorUsedError;
|
||
|
|
}
|
||
|
|
|
||
|
|
OrderPaymentDto _$OrderPaymentDtoFromJson(Map<String, dynamic> json) {
|
||
|
|
return _OrderPaymentDto.fromJson(json);
|
||
|
|
}
|
||
|
|
|
||
|
|
/// @nodoc
|
||
|
|
mixin _$OrderPaymentDto {
|
||
|
|
@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_type')
|
||
|
|
String? get splitType => 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;
|
||
|
|
@JsonKey(name: 'payment_order_items')
|
||
|
|
List<PaymentOrderItemDto>? get paymentOrderItems =>
|
||
|
|
throw _privateConstructorUsedError;
|
||
|
|
|
||
|
|
/// Serializes this OrderPaymentDto to a JSON map.
|
||
|
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||
|
|
|
||
|
|
/// Create a copy of OrderPaymentDto
|
||
|
|
/// with the given fields replaced by the non-null parameter values.
|
||
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||
|
|
$OrderPaymentDtoCopyWith<OrderPaymentDto> get copyWith =>
|
||
|
|
throw _privateConstructorUsedError;
|
||
|
|
}
|
||
|
|
|
||
|
|
/// @nodoc
|
||
|
|
abstract class $OrderPaymentDtoCopyWith<$Res> {
|
||
|
|
factory $OrderPaymentDtoCopyWith(
|
||
|
|
OrderPaymentDto value,
|
||
|
|
$Res Function(OrderPaymentDto) then,
|
||
|
|
) = _$OrderPaymentDtoCopyWithImpl<$Res, OrderPaymentDto>;
|
||
|
|
@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_type') String? splitType,
|
||
|
|
@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,
|
||
|
|
@JsonKey(name: 'payment_order_items')
|
||
|
|
List<PaymentOrderItemDto>? paymentOrderItems,
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
/// @nodoc
|
||
|
|
class _$OrderPaymentDtoCopyWithImpl<$Res, $Val extends OrderPaymentDto>
|
||
|
|
implements $OrderPaymentDtoCopyWith<$Res> {
|
||
|
|
_$OrderPaymentDtoCopyWithImpl(this._value, this._then);
|
||
|
|
|
||
|
|
// ignore: unused_field
|
||
|
|
final $Val _value;
|
||
|
|
// ignore: unused_field
|
||
|
|
final $Res Function($Val) _then;
|
||
|
|
|
||
|
|
/// Create a copy of OrderPaymentDto
|
||
|
|
/// 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? splitType = freezed,
|
||
|
|
Object? splitDescription = freezed,
|
||
|
|
Object? refundAmount = freezed,
|
||
|
|
Object? metadata = freezed,
|
||
|
|
Object? createdAt = freezed,
|
||
|
|
Object? updatedAt = freezed,
|
||
|
|
Object? paymentOrderItems = 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?,
|
||
|
|
splitType: freezed == splitType
|
||
|
|
? _value.splitType
|
||
|
|
: splitType // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String?,
|
||
|
|
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?,
|
||
|
|
paymentOrderItems: freezed == paymentOrderItems
|
||
|
|
? _value.paymentOrderItems
|
||
|
|
: paymentOrderItems // ignore: cast_nullable_to_non_nullable
|
||
|
|
as List<PaymentOrderItemDto>?,
|
||
|
|
)
|
||
|
|
as $Val,
|
||
|
|
);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
/// @nodoc
|
||
|
|
abstract class _$$OrderPaymentDtoImplCopyWith<$Res>
|
||
|
|
implements $OrderPaymentDtoCopyWith<$Res> {
|
||
|
|
factory _$$OrderPaymentDtoImplCopyWith(
|
||
|
|
_$OrderPaymentDtoImpl value,
|
||
|
|
$Res Function(_$OrderPaymentDtoImpl) then,
|
||
|
|
) = __$$OrderPaymentDtoImplCopyWithImpl<$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_type') String? splitType,
|
||
|
|
@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,
|
||
|
|
@JsonKey(name: 'payment_order_items')
|
||
|
|
List<PaymentOrderItemDto>? paymentOrderItems,
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
/// @nodoc
|
||
|
|
class __$$OrderPaymentDtoImplCopyWithImpl<$Res>
|
||
|
|
extends _$OrderPaymentDtoCopyWithImpl<$Res, _$OrderPaymentDtoImpl>
|
||
|
|
implements _$$OrderPaymentDtoImplCopyWith<$Res> {
|
||
|
|
__$$OrderPaymentDtoImplCopyWithImpl(
|
||
|
|
_$OrderPaymentDtoImpl _value,
|
||
|
|
$Res Function(_$OrderPaymentDtoImpl) _then,
|
||
|
|
) : super(_value, _then);
|
||
|
|
|
||
|
|
/// Create a copy of OrderPaymentDto
|
||
|
|
/// 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? splitType = freezed,
|
||
|
|
Object? splitDescription = freezed,
|
||
|
|
Object? refundAmount = freezed,
|
||
|
|
Object? metadata = freezed,
|
||
|
|
Object? createdAt = freezed,
|
||
|
|
Object? updatedAt = freezed,
|
||
|
|
Object? paymentOrderItems = freezed,
|
||
|
|
}) {
|
||
|
|
return _then(
|
||
|
|
_$OrderPaymentDtoImpl(
|
||
|
|
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?,
|
||
|
|
splitType: freezed == splitType
|
||
|
|
? _value.splitType
|
||
|
|
: splitType // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String?,
|
||
|
|
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?,
|
||
|
|
paymentOrderItems: freezed == paymentOrderItems
|
||
|
|
? _value._paymentOrderItems
|
||
|
|
: paymentOrderItems // ignore: cast_nullable_to_non_nullable
|
||
|
|
as List<PaymentOrderItemDto>?,
|
||
|
|
),
|
||
|
|
);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
/// @nodoc
|
||
|
|
@JsonSerializable()
|
||
|
|
class _$OrderPaymentDtoImpl extends _OrderPaymentDto {
|
||
|
|
const _$OrderPaymentDtoImpl({
|
||
|
|
@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_type') this.splitType,
|
||
|
|
@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,
|
||
|
|
@JsonKey(name: 'payment_order_items')
|
||
|
|
final List<PaymentOrderItemDto>? paymentOrderItems,
|
||
|
|
}) : _metadata = metadata,
|
||
|
|
_paymentOrderItems = paymentOrderItems,
|
||
|
|
super._();
|
||
|
|
|
||
|
|
factory _$OrderPaymentDtoImpl.fromJson(Map<String, dynamic> json) =>
|
||
|
|
_$$OrderPaymentDtoImplFromJson(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_type')
|
||
|
|
final String? splitType;
|
||
|
|
@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;
|
||
|
|
final List<PaymentOrderItemDto>? _paymentOrderItems;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'payment_order_items')
|
||
|
|
List<PaymentOrderItemDto>? get paymentOrderItems {
|
||
|
|
final value = _paymentOrderItems;
|
||
|
|
if (value == null) return null;
|
||
|
|
if (_paymentOrderItems is EqualUnmodifiableListView)
|
||
|
|
return _paymentOrderItems;
|
||
|
|
// ignore: implicit_dynamic_type
|
||
|
|
return EqualUnmodifiableListView(value);
|
||
|
|
}
|
||
|
|
|
||
|
|
@override
|
||
|
|
String toString() {
|
||
|
|
return 'OrderPaymentDto(id: $id, orderId: $orderId, paymentMethodId: $paymentMethodId, paymentMethodName: $paymentMethodName, paymentMethodType: $paymentMethodType, amount: $amount, status: $status, splitNumber: $splitNumber, splitTotal: $splitTotal, splitType: $splitType, splitDescription: $splitDescription, refundAmount: $refundAmount, metadata: $metadata, createdAt: $createdAt, updatedAt: $updatedAt, paymentOrderItems: $paymentOrderItems)';
|
||
|
|
}
|
||
|
|
|
||
|
|
@override
|
||
|
|
bool operator ==(Object other) {
|
||
|
|
return identical(this, other) ||
|
||
|
|
(other.runtimeType == runtimeType &&
|
||
|
|
other is _$OrderPaymentDtoImpl &&
|
||
|
|
(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.splitType, splitType) ||
|
||
|
|
other.splitType == splitType) &&
|
||
|
|
(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) &&
|
||
|
|
const DeepCollectionEquality().equals(
|
||
|
|
other._paymentOrderItems,
|
||
|
|
_paymentOrderItems,
|
||
|
|
));
|
||
|
|
}
|
||
|
|
|
||
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||
|
|
@override
|
||
|
|
int get hashCode => Object.hash(
|
||
|
|
runtimeType,
|
||
|
|
id,
|
||
|
|
orderId,
|
||
|
|
paymentMethodId,
|
||
|
|
paymentMethodName,
|
||
|
|
paymentMethodType,
|
||
|
|
amount,
|
||
|
|
status,
|
||
|
|
splitNumber,
|
||
|
|
splitTotal,
|
||
|
|
splitType,
|
||
|
|
splitDescription,
|
||
|
|
refundAmount,
|
||
|
|
const DeepCollectionEquality().hash(_metadata),
|
||
|
|
createdAt,
|
||
|
|
updatedAt,
|
||
|
|
const DeepCollectionEquality().hash(_paymentOrderItems),
|
||
|
|
);
|
||
|
|
|
||
|
|
/// Create a copy of OrderPaymentDto
|
||
|
|
/// with the given fields replaced by the non-null parameter values.
|
||
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||
|
|
@override
|
||
|
|
@pragma('vm:prefer-inline')
|
||
|
|
_$$OrderPaymentDtoImplCopyWith<_$OrderPaymentDtoImpl> get copyWith =>
|
||
|
|
__$$OrderPaymentDtoImplCopyWithImpl<_$OrderPaymentDtoImpl>(
|
||
|
|
this,
|
||
|
|
_$identity,
|
||
|
|
);
|
||
|
|
|
||
|
|
@override
|
||
|
|
Map<String, dynamic> toJson() {
|
||
|
|
return _$$OrderPaymentDtoImplToJson(this);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
abstract class _OrderPaymentDto extends OrderPaymentDto {
|
||
|
|
const factory _OrderPaymentDto({
|
||
|
|
@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_type') final String? splitType,
|
||
|
|
@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,
|
||
|
|
@JsonKey(name: 'payment_order_items')
|
||
|
|
final List<PaymentOrderItemDto>? paymentOrderItems,
|
||
|
|
}) = _$OrderPaymentDtoImpl;
|
||
|
|
const _OrderPaymentDto._() : super._();
|
||
|
|
|
||
|
|
factory _OrderPaymentDto.fromJson(Map<String, dynamic> json) =
|
||
|
|
_$OrderPaymentDtoImpl.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_type')
|
||
|
|
String? get splitType;
|
||
|
|
@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;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'payment_order_items')
|
||
|
|
List<PaymentOrderItemDto>? get paymentOrderItems;
|
||
|
|
|
||
|
|
/// Create a copy of OrderPaymentDto
|
||
|
|
/// with the given fields replaced by the non-null parameter values.
|
||
|
|
@override
|
||
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||
|
|
_$$OrderPaymentDtoImplCopyWith<_$OrderPaymentDtoImpl> get copyWith =>
|
||
|
|
throw _privateConstructorUsedError;
|
||
|
|
}
|
||
|
|
|
||
|
|
PaymentOrderItemDto _$PaymentOrderItemDtoFromJson(Map<String, dynamic> json) {
|
||
|
|
return _PaymentOrderItemDto.fromJson(json);
|
||
|
|
}
|
||
|
|
|
||
|
|
/// @nodoc
|
||
|
|
mixin _$PaymentOrderItemDto {
|
||
|
|
@JsonKey(name: 'id')
|
||
|
|
String? get id => throw _privateConstructorUsedError;
|
||
|
|
@JsonKey(name: 'order_payment_id')
|
||
|
|
String? get orderPaymentId => throw _privateConstructorUsedError;
|
||
|
|
@JsonKey(name: 'order_item_id')
|
||
|
|
String? get orderItemId => throw _privateConstructorUsedError;
|
||
|
|
@JsonKey(name: 'amount')
|
||
|
|
int? get amount => throw _privateConstructorUsedError;
|
||
|
|
@JsonKey(name: 'refund_amount')
|
||
|
|
int? get refundAmount => throw _privateConstructorUsedError;
|
||
|
|
@JsonKey(name: 'created_at')
|
||
|
|
String? get createdAt => throw _privateConstructorUsedError;
|
||
|
|
@JsonKey(name: 'updated_at')
|
||
|
|
String? get updatedAt => throw _privateConstructorUsedError;
|
||
|
|
|
||
|
|
/// Serializes this PaymentOrderItemDto to a JSON map.
|
||
|
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||
|
|
|
||
|
|
/// Create a copy of PaymentOrderItemDto
|
||
|
|
/// with the given fields replaced by the non-null parameter values.
|
||
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||
|
|
$PaymentOrderItemDtoCopyWith<PaymentOrderItemDto> get copyWith =>
|
||
|
|
throw _privateConstructorUsedError;
|
||
|
|
}
|
||
|
|
|
||
|
|
/// @nodoc
|
||
|
|
abstract class $PaymentOrderItemDtoCopyWith<$Res> {
|
||
|
|
factory $PaymentOrderItemDtoCopyWith(
|
||
|
|
PaymentOrderItemDto value,
|
||
|
|
$Res Function(PaymentOrderItemDto) then,
|
||
|
|
) = _$PaymentOrderItemDtoCopyWithImpl<$Res, PaymentOrderItemDto>;
|
||
|
|
@useResult
|
||
|
|
$Res call({
|
||
|
|
@JsonKey(name: 'id') String? id,
|
||
|
|
@JsonKey(name: 'order_payment_id') String? orderPaymentId,
|
||
|
|
@JsonKey(name: 'order_item_id') String? orderItemId,
|
||
|
|
@JsonKey(name: 'amount') int? amount,
|
||
|
|
@JsonKey(name: 'refund_amount') int? refundAmount,
|
||
|
|
@JsonKey(name: 'created_at') String? createdAt,
|
||
|
|
@JsonKey(name: 'updated_at') String? updatedAt,
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
/// @nodoc
|
||
|
|
class _$PaymentOrderItemDtoCopyWithImpl<$Res, $Val extends PaymentOrderItemDto>
|
||
|
|
implements $PaymentOrderItemDtoCopyWith<$Res> {
|
||
|
|
_$PaymentOrderItemDtoCopyWithImpl(this._value, this._then);
|
||
|
|
|
||
|
|
// ignore: unused_field
|
||
|
|
final $Val _value;
|
||
|
|
// ignore: unused_field
|
||
|
|
final $Res Function($Val) _then;
|
||
|
|
|
||
|
|
/// Create a copy of PaymentOrderItemDto
|
||
|
|
/// with the given fields replaced by the non-null parameter values.
|
||
|
|
@pragma('vm:prefer-inline')
|
||
|
|
@override
|
||
|
|
$Res call({
|
||
|
|
Object? id = freezed,
|
||
|
|
Object? orderPaymentId = freezed,
|
||
|
|
Object? orderItemId = freezed,
|
||
|
|
Object? amount = freezed,
|
||
|
|
Object? refundAmount = 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?,
|
||
|
|
orderPaymentId: freezed == orderPaymentId
|
||
|
|
? _value.orderPaymentId
|
||
|
|
: orderPaymentId // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String?,
|
||
|
|
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?,
|
||
|
|
refundAmount: freezed == refundAmount
|
||
|
|
? _value.refundAmount
|
||
|
|
: refundAmount // ignore: cast_nullable_to_non_nullable
|
||
|
|
as int?,
|
||
|
|
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 _$$PaymentOrderItemDtoImplCopyWith<$Res>
|
||
|
|
implements $PaymentOrderItemDtoCopyWith<$Res> {
|
||
|
|
factory _$$PaymentOrderItemDtoImplCopyWith(
|
||
|
|
_$PaymentOrderItemDtoImpl value,
|
||
|
|
$Res Function(_$PaymentOrderItemDtoImpl) then,
|
||
|
|
) = __$$PaymentOrderItemDtoImplCopyWithImpl<$Res>;
|
||
|
|
@override
|
||
|
|
@useResult
|
||
|
|
$Res call({
|
||
|
|
@JsonKey(name: 'id') String? id,
|
||
|
|
@JsonKey(name: 'order_payment_id') String? orderPaymentId,
|
||
|
|
@JsonKey(name: 'order_item_id') String? orderItemId,
|
||
|
|
@JsonKey(name: 'amount') int? amount,
|
||
|
|
@JsonKey(name: 'refund_amount') int? refundAmount,
|
||
|
|
@JsonKey(name: 'created_at') String? createdAt,
|
||
|
|
@JsonKey(name: 'updated_at') String? updatedAt,
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
/// @nodoc
|
||
|
|
class __$$PaymentOrderItemDtoImplCopyWithImpl<$Res>
|
||
|
|
extends _$PaymentOrderItemDtoCopyWithImpl<$Res, _$PaymentOrderItemDtoImpl>
|
||
|
|
implements _$$PaymentOrderItemDtoImplCopyWith<$Res> {
|
||
|
|
__$$PaymentOrderItemDtoImplCopyWithImpl(
|
||
|
|
_$PaymentOrderItemDtoImpl _value,
|
||
|
|
$Res Function(_$PaymentOrderItemDtoImpl) _then,
|
||
|
|
) : super(_value, _then);
|
||
|
|
|
||
|
|
/// Create a copy of PaymentOrderItemDto
|
||
|
|
/// with the given fields replaced by the non-null parameter values.
|
||
|
|
@pragma('vm:prefer-inline')
|
||
|
|
@override
|
||
|
|
$Res call({
|
||
|
|
Object? id = freezed,
|
||
|
|
Object? orderPaymentId = freezed,
|
||
|
|
Object? orderItemId = freezed,
|
||
|
|
Object? amount = freezed,
|
||
|
|
Object? refundAmount = freezed,
|
||
|
|
Object? createdAt = freezed,
|
||
|
|
Object? updatedAt = freezed,
|
||
|
|
}) {
|
||
|
|
return _then(
|
||
|
|
_$PaymentOrderItemDtoImpl(
|
||
|
|
id: freezed == id
|
||
|
|
? _value.id
|
||
|
|
: id // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String?,
|
||
|
|
orderPaymentId: freezed == orderPaymentId
|
||
|
|
? _value.orderPaymentId
|
||
|
|
: orderPaymentId // ignore: cast_nullable_to_non_nullable
|
||
|
|
as String?,
|
||
|
|
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?,
|
||
|
|
refundAmount: freezed == refundAmount
|
||
|
|
? _value.refundAmount
|
||
|
|
: refundAmount // ignore: cast_nullable_to_non_nullable
|
||
|
|
as int?,
|
||
|
|
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 _$PaymentOrderItemDtoImpl extends _PaymentOrderItemDto {
|
||
|
|
const _$PaymentOrderItemDtoImpl({
|
||
|
|
@JsonKey(name: 'id') this.id,
|
||
|
|
@JsonKey(name: 'order_payment_id') this.orderPaymentId,
|
||
|
|
@JsonKey(name: 'order_item_id') this.orderItemId,
|
||
|
|
@JsonKey(name: 'amount') this.amount,
|
||
|
|
@JsonKey(name: 'refund_amount') this.refundAmount,
|
||
|
|
@JsonKey(name: 'created_at') this.createdAt,
|
||
|
|
@JsonKey(name: 'updated_at') this.updatedAt,
|
||
|
|
}) : super._();
|
||
|
|
|
||
|
|
factory _$PaymentOrderItemDtoImpl.fromJson(Map<String, dynamic> json) =>
|
||
|
|
_$$PaymentOrderItemDtoImplFromJson(json);
|
||
|
|
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'id')
|
||
|
|
final String? id;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'order_payment_id')
|
||
|
|
final String? orderPaymentId;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'order_item_id')
|
||
|
|
final String? orderItemId;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'amount')
|
||
|
|
final int? amount;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'refund_amount')
|
||
|
|
final int? refundAmount;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'created_at')
|
||
|
|
final String? createdAt;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'updated_at')
|
||
|
|
final String? updatedAt;
|
||
|
|
|
||
|
|
@override
|
||
|
|
String toString() {
|
||
|
|
return 'PaymentOrderItemDto(id: $id, orderPaymentId: $orderPaymentId, orderItemId: $orderItemId, amount: $amount, refundAmount: $refundAmount, createdAt: $createdAt, updatedAt: $updatedAt)';
|
||
|
|
}
|
||
|
|
|
||
|
|
@override
|
||
|
|
bool operator ==(Object other) {
|
||
|
|
return identical(this, other) ||
|
||
|
|
(other.runtimeType == runtimeType &&
|
||
|
|
other is _$PaymentOrderItemDtoImpl &&
|
||
|
|
(identical(other.id, id) || other.id == id) &&
|
||
|
|
(identical(other.orderPaymentId, orderPaymentId) ||
|
||
|
|
other.orderPaymentId == orderPaymentId) &&
|
||
|
|
(identical(other.orderItemId, orderItemId) ||
|
||
|
|
other.orderItemId == orderItemId) &&
|
||
|
|
(identical(other.amount, amount) || other.amount == amount) &&
|
||
|
|
(identical(other.refundAmount, refundAmount) ||
|
||
|
|
other.refundAmount == refundAmount) &&
|
||
|
|
(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,
|
||
|
|
orderPaymentId,
|
||
|
|
orderItemId,
|
||
|
|
amount,
|
||
|
|
refundAmount,
|
||
|
|
createdAt,
|
||
|
|
updatedAt,
|
||
|
|
);
|
||
|
|
|
||
|
|
/// Create a copy of PaymentOrderItemDto
|
||
|
|
/// with the given fields replaced by the non-null parameter values.
|
||
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||
|
|
@override
|
||
|
|
@pragma('vm:prefer-inline')
|
||
|
|
_$$PaymentOrderItemDtoImplCopyWith<_$PaymentOrderItemDtoImpl> get copyWith =>
|
||
|
|
__$$PaymentOrderItemDtoImplCopyWithImpl<_$PaymentOrderItemDtoImpl>(
|
||
|
|
this,
|
||
|
|
_$identity,
|
||
|
|
);
|
||
|
|
|
||
|
|
@override
|
||
|
|
Map<String, dynamic> toJson() {
|
||
|
|
return _$$PaymentOrderItemDtoImplToJson(this);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
abstract class _PaymentOrderItemDto extends PaymentOrderItemDto {
|
||
|
|
const factory _PaymentOrderItemDto({
|
||
|
|
@JsonKey(name: 'id') final String? id,
|
||
|
|
@JsonKey(name: 'order_payment_id') final String? orderPaymentId,
|
||
|
|
@JsonKey(name: 'order_item_id') final String? orderItemId,
|
||
|
|
@JsonKey(name: 'amount') final int? amount,
|
||
|
|
@JsonKey(name: 'refund_amount') final int? refundAmount,
|
||
|
|
@JsonKey(name: 'created_at') final String? createdAt,
|
||
|
|
@JsonKey(name: 'updated_at') final String? updatedAt,
|
||
|
|
}) = _$PaymentOrderItemDtoImpl;
|
||
|
|
const _PaymentOrderItemDto._() : super._();
|
||
|
|
|
||
|
|
factory _PaymentOrderItemDto.fromJson(Map<String, dynamic> json) =
|
||
|
|
_$PaymentOrderItemDtoImpl.fromJson;
|
||
|
|
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'id')
|
||
|
|
String? get id;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'order_payment_id')
|
||
|
|
String? get orderPaymentId;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'order_item_id')
|
||
|
|
String? get orderItemId;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'amount')
|
||
|
|
int? get amount;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'refund_amount')
|
||
|
|
int? get refundAmount;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'created_at')
|
||
|
|
String? get createdAt;
|
||
|
|
@override
|
||
|
|
@JsonKey(name: 'updated_at')
|
||
|
|
String? get updatedAt;
|
||
|
|
|
||
|
|
/// Create a copy of PaymentOrderItemDto
|
||
|
|
/// with the given fields replaced by the non-null parameter values.
|
||
|
|
@override
|
||
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
||
|
|
_$$PaymentOrderItemDtoImplCopyWith<_$PaymentOrderItemDtoImpl> get copyWith =>
|
||
|
|
throw _privateConstructorUsedError;
|
||
|
|
}
|