create order
This commit is contained in:
@@ -167,3 +167,51 @@ Map<String, dynamic> _$$PaymentOrderDtoImplToJson(
|
||||
'created_at': instance.createdAt,
|
||||
'updated_at': instance.updatedAt,
|
||||
};
|
||||
|
||||
_$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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user