// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'order_dtos.dart';

// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************

_$ListOrderDtoImpl _$$ListOrderDtoImplFromJson(Map<String, dynamic> json) =>
    _$ListOrderDtoImpl(
      orders: (json['orders'] as List<dynamic>?)
          ?.map((e) => OrderDto.fromJson(e as Map<String, dynamic>))
          .toList(),
      totalCount: (json['total_count'] as num?)?.toInt(),
      page: (json['page'] as num?)?.toInt(),
      limit: (json['limit'] as num?)?.toInt(),
      totalPages: (json['total_pages'] as num?)?.toInt(),
    );

Map<String, dynamic> _$$ListOrderDtoImplToJson(_$ListOrderDtoImpl instance) =>
    <String, dynamic>{
      'orders': instance.orders,
      'total_count': instance.totalCount,
      'page': instance.page,
      'limit': instance.limit,
      'total_pages': instance.totalPages,
    };

_$OrderDtoImpl _$$OrderDtoImplFromJson(Map<String, dynamic> json) =>
    _$OrderDtoImpl(
      id: json['id'] as String?,
      orderNumber: json['order_number'] as String?,
      outletId: json['outlet_id'] as String?,
      userId: json['user_id'] as String?,
      tableNumber: json['table_number'] as String?,
      orderType: json['order_type'] as String?,
      status: json['status'] as String?,
      subtotal: (json['subtotal'] as num?)?.toInt(),
      taxAmount: (json['tax_amount'] as num?)?.toInt(),
      discountAmount: (json['discount_amount'] as num?)?.toInt(),
      totalAmount: (json['total_amount'] as num?)?.toInt(),
      totalCost: json['total_cost'] as num?,
      remainingAmount: (json['remaining_amount'] as num?)?.toInt(),
      paymentStatus: json['payment_status'] as String?,
      refundAmount: (json['refund_amount'] as num?)?.toInt(),
      refundReason: json['refund_reason'] as String?,
      isVoid: json['is_void'] as bool?,
      isRefund: json['is_refund'] as bool?,
      notes: json['notes'] as String?,
      metadata: json['metadata'] as Map<String, dynamic>?,
      createdAt: json['created_at'] as String?,
      updatedAt: json['updated_at'] as String?,
      orderItems: (json['order_items'] as List<dynamic>?)
          ?.map((e) => OrderItemDto.fromJson(e as Map<String, dynamic>))
          .toList(),
      payments: (json['payments'] as List<dynamic>?)
          ?.map((e) => PaymentDto.fromJson(e as Map<String, dynamic>))
          .toList(),
      totalPaid: (json['total_paid'] as num?)?.toInt(),
      paymentCount: (json['payment_count'] as num?)?.toInt(),
      splitType: json['split_type'] as String?,
    );

Map<String, dynamic> _$$OrderDtoImplToJson(_$OrderDtoImpl instance) =>
    <String, dynamic>{
      'id': instance.id,
      'order_number': instance.orderNumber,
      'outlet_id': instance.outletId,
      'user_id': instance.userId,
      'table_number': instance.tableNumber,
      'order_type': instance.orderType,
      'status': instance.status,
      'subtotal': instance.subtotal,
      'tax_amount': instance.taxAmount,
      'discount_amount': instance.discountAmount,
      'total_amount': instance.totalAmount,
      'total_cost': instance.totalCost,
      'remaining_amount': instance.remainingAmount,
      'payment_status': instance.paymentStatus,
      'refund_amount': instance.refundAmount,
      'refund_reason': instance.refundReason,
      'is_void': instance.isVoid,
      'is_refund': instance.isRefund,
      'notes': instance.notes,
      'metadata': instance.metadata,
      'created_at': instance.createdAt,
      'updated_at': instance.updatedAt,
      'order_items': instance.orderItems,
      'payments': instance.payments,
      'total_paid': instance.totalPaid,
      'payment_count': instance.paymentCount,
      'split_type': instance.splitType,
    };

_$OrderItemDtoImpl _$$OrderItemDtoImplFromJson(Map<String, dynamic> json) =>
    _$OrderItemDtoImpl(
      id: json['id'] as String?,
      orderId: json['order_id'] as String?,
      productId: json['product_id'] as String?,
      productName: json['product_name'] as String?,
      productVariantId: json['product_variant_id'] as String?,
      productVariantName: json['product_variant_name'] as String?,
      quantity: (json['quantity'] as num?)?.toInt(),
      unitPrice: (json['unit_price'] as num?)?.toInt(),
      totalPrice: (json['total_price'] as num?)?.toInt(),
      modifiers: json['modifiers'] as List<dynamic>?,
      notes: json['notes'] as String?,
      status: json['status'] as String?,
      createdAt: json['created_at'] as String?,
      updatedAt: json['updated_at'] as String?,
      printerType: json['printer_type'] as String?,
      printToChecker: json['print_to_checker'] as bool?,
      paidQuantity: (json['paid_quantity'] as num?)?.toInt(),
      categoryId: json['category_id'] as String?,
      categoryName: json['category_name'] as String?,
    );

Map<String, dynamic> _$$OrderItemDtoImplToJson(_$OrderItemDtoImpl instance) =>
    <String, dynamic>{
      'id': instance.id,
      'order_id': instance.orderId,
      'product_id': instance.productId,
      'product_name': instance.productName,
      'product_variant_id': instance.productVariantId,
      'product_variant_name': instance.productVariantName,
      'quantity': instance.quantity,
      'unit_price': instance.unitPrice,
      'total_price': instance.totalPrice,
      'modifiers': instance.modifiers,
      'notes': instance.notes,
      'status': instance.status,
      'created_at': instance.createdAt,
      'updated_at': instance.updatedAt,
      'printer_type': instance.printerType,
      'print_to_checker': instance.printToChecker,
      'paid_quantity': instance.paidQuantity,
      'category_id': instance.categoryId,
      'category_name': instance.categoryName,
    };

_$OrderRequestDtoImpl _$$OrderRequestDtoImplFromJson(
  Map<String, dynamic> json,
) => _$OrderRequestDtoImpl(
  outletId: json['outlet_id'] as String?,
  customerId: json['customer_id'] as String?,
  tableNumber: json['table_number'] as String?,
  tableId: json['table_id'] as String?,
  orderType: json['order_type'] as String?,
  notes: json['notes'] as String?,
  orderItems: (json['order_items'] as List<dynamic>?)
      ?.map((e) => OrderItemRequestDto.fromJson(e as Map<String, dynamic>))
      .toList(),
  customerName: json['customer_name'] as String?,
);

Map<String, dynamic> _$$OrderRequestDtoImplToJson(
  _$OrderRequestDtoImpl instance,
) => <String, dynamic>{
  'outlet_id': instance.outletId,
  'customer_id': instance.customerId,
  'table_number': instance.tableNumber,
  'table_id': instance.tableId,
  'order_type': instance.orderType,
  'notes': instance.notes,
  'order_items': instance.orderItems,
  'customer_name': instance.customerName,
};

_$OrderItemRequestDtoImpl _$$OrderItemRequestDtoImplFromJson(
  Map<String, dynamic> json,
) => _$OrderItemRequestDtoImpl(
  productId: json['product_id'] as String?,
  productVariantId: json['product_variant_id'] as String?,
  quantity: (json['quantity'] as num?)?.toInt(),
  unitPrice: (json['unit_price'] as num?)?.toInt(),
  notes: json['notes'] as String?,
);

Map<String, dynamic> _$$OrderItemRequestDtoImplToJson(
  _$OrderItemRequestDtoImpl instance,
) => <String, dynamic>{
  'product_id': instance.productId,
  'product_variant_id': instance.productVariantId,
  'quantity': instance.quantity,
  'unit_price': instance.unitPrice,
  'notes': instance.notes,
};

_$PaymentRequestDtoImpl _$$PaymentRequestDtoImplFromJson(
  Map<String, dynamic> json,
) => _$PaymentRequestDtoImpl(
  orderId: json['order_id'] as String?,
  paymentMethodId: json['payment_method_id'] as String?,
  amount: (json['amount'] as num?)?.toInt(),
  transactionId: json['transaction_id'] as String?,
  splitNumber: (json['split_number'] as num?)?.toInt(),
  splitTotal: (json['split_total'] as num?)?.toInt(),
  splitDescription: json['split_description'] as String?,
  paymentOrderItems: (json['payment_order_items'] as List<dynamic>?)
      ?.map((e) => PaymentItemRequestDto.fromJson(e as Map<String, dynamic>))
      .toList(),
);

Map<String, dynamic> _$$PaymentRequestDtoImplToJson(
  _$PaymentRequestDtoImpl instance,
) => <String, dynamic>{
  'order_id': instance.orderId,
  'payment_method_id': instance.paymentMethodId,
  'amount': instance.amount,
  'transaction_id': instance.transactionId,
  'split_number': instance.splitNumber,
  'split_total': instance.splitTotal,
  'split_description': instance.splitDescription,
  'payment_order_items': instance.paymentOrderItems,
};

_$PaymentItemRequestDtoImpl _$$PaymentItemRequestDtoImplFromJson(
  Map<String, dynamic> json,
) => _$PaymentItemRequestDtoImpl(
  orderItemId: json['order_item_id'] as String?,
  amount: (json['amount'] as num?)?.toInt(),
);

Map<String, dynamic> _$$PaymentItemRequestDtoImplToJson(
  _$PaymentItemRequestDtoImpl instance,
) => <String, dynamic>{
  'order_item_id': instance.orderItemId,
  'amount': instance.amount,
};

_$PaymentSplitBillRequestDtoImpl _$$PaymentSplitBillRequestDtoImplFromJson(
  Map<String, dynamic> json,
) => _$PaymentSplitBillRequestDtoImpl(
  orderId: json['order_id'] as String?,
  paymentMethodId: json['payment_method_id'] as String?,
  customerId: json['customer_id'] as String?,
  customerName: json['customer_name'] as String?,
  type: json['type'] as String?,
  amount: (json['amount'] as num?)?.toInt(),
  items: (json['items'] as List<dynamic>?)
      ?.map(
        (e) =>
            PaymentItemSplitBillRequestDto.fromJson(e as Map<String, dynamic>),
      )
      .toList(),
);

Map<String, dynamic> _$$PaymentSplitBillRequestDtoImplToJson(
  _$PaymentSplitBillRequestDtoImpl instance,
) => <String, dynamic>{
  'order_id': instance.orderId,
  'payment_method_id': instance.paymentMethodId,
  'customer_id': instance.customerId,
  'customer_name': instance.customerName,
  'type': instance.type,
  'amount': instance.amount,
  'items': instance.items,
};

_$PaymentItemSplitBillRequestDtoImpl
_$$PaymentItemSplitBillRequestDtoImplFromJson(Map<String, dynamic> json) =>
    _$PaymentItemSplitBillRequestDtoImpl(
      orderItemId: json['order_item_id'] as String?,
      quantity: (json['quantity'] as num?)?.toInt(),
    );

Map<String, dynamic> _$$PaymentItemSplitBillRequestDtoImplToJson(
  _$PaymentItemSplitBillRequestDtoImpl instance,
) => <String, dynamic>{
  'order_item_id': instance.orderItemId,
  'quantity': instance.quantity,
};

_$PaymentOrderDtoImpl _$$PaymentOrderDtoImplFromJson(
  Map<String, dynamic> json,
) => _$PaymentOrderDtoImpl(
  id: json['id'] as String?,
  orderId: json['order_id'] as String?,
  paymentMethodId: json['payment_method_id'] as String?,
  paymentMethodName: json['payment_method_name'] as String?,
  paymentMethodType: json['payment_method_type'] as String?,
  amount: (json['amount'] as num?)?.toInt(),
  status: json['status'] as String?,
  splitNumber: (json['split_number'] as num?)?.toInt(),
  splitTotal: (json['split_total'] as num?)?.toInt(),
  splitDescription: json['split_description'] as String?,
  refundAmount: (json['refund_amount'] as num?)?.toInt(),
  metadata: json['metadata'] as Map<String, dynamic>?,
  createdAt: json['created_at'] as String?,
  updatedAt: json['updated_at'] as String?,
);

Map<String, dynamic> _$$PaymentOrderDtoImplToJson(
  _$PaymentOrderDtoImpl instance,
) => <String, dynamic>{
  'id': instance.id,
  'order_id': instance.orderId,
  'payment_method_id': instance.paymentMethodId,
  'payment_method_name': instance.paymentMethodName,
  'payment_method_type': instance.paymentMethodType,
  'amount': instance.amount,
  'status': instance.status,
  'split_number': instance.splitNumber,
  'split_total': instance.splitTotal,
  'split_description': instance.splitDescription,
  'refund_amount': instance.refundAmount,
  'metadata': instance.metadata,
  'created_at': instance.createdAt,
  'updated_at': instance.updatedAt,
};

_$AddItemOrderRequestDtoImpl _$$AddItemOrderRequestDtoImplFromJson(
  Map<String, dynamic> json,
) => _$AddItemOrderRequestDtoImpl(
  productId: json['product_id'] as String?,
  productvariantId: json['product_variant_id'] as String?,
  quantity: (json['quantity'] as num?)?.toInt(),
  unitPrice: (json['unit_price'] as num?)?.toInt(),
  notes: json['notes'] as String?,
);

Map<String, dynamic> _$$AddItemOrderRequestDtoImplToJson(
  _$AddItemOrderRequestDtoImpl instance,
) => <String, dynamic>{
  'product_id': instance.productId,
  'product_variant_id': instance.productvariantId,
  'quantity': instance.quantity,
  'unit_price': instance.unitPrice,
  'notes': instance.notes,
};
