part of '../order.dart';

@freezed
class OrderRequest with _$OrderRequest {
  const factory OrderRequest({
    required String outletId,
    required String customerId,
    required String tableNumber,
    required String tableId,
    required String orderType,
    required String notes,
    required List<OrderItemRequest> orderItems,
    required String customerName,
  }) = _OrderRequest;

  factory OrderRequest.empty() => const OrderRequest(
    outletId: '',
    customerId: '',
    tableNumber: '',
    tableId: '',
    orderType: '',
    notes: '',
    orderItems: [],
    customerName: '',
  );
}

@freezed
class OrderItemRequest with _$OrderItemRequest {
  const factory OrderItemRequest({
    required String productId,
    required String productVariantId,
    required int quantity,
    required int unitPrice,
    required String notes,
  }) = _OrderItemRequest;

  factory OrderItemRequest.empty() => const OrderItemRequest(
    productId: '',
    productVariantId: '',
    quantity: 0,
    unitPrice: 0,
    notes: '',
  );
}
