swt23w23/src/main/java/catering/order/CustomOrder.java

48 lines
1,013 B
Java

package catering.order;
import org.aspectj.weaver.ast.Or;
import org.salespointframework.quantity.Quantity;
import java.util.Map;
/**
* This class is only used for the prototype to avoid using the bloated Salespoint API
*/
public class CustomOrder {
private OrderType orderType;
private Map<String, Quantity> products;
private boolean invoiceAvailable;
private double totalCost; // this is in €
public CustomOrder(OrderType orderType, Map<String, Quantity> products, boolean invoiceAvailable, double totalCost) {
this.orderType = orderType;
this.products = products;
this.invoiceAvailable = invoiceAvailable;
this.totalCost = totalCost;
}
public OrderType getOrderType() {
return orderType;
}
public Map<String, Quantity> getProducts() {
return products;
}
public boolean isInvoiceAvailable() {
return invoiceAvailable;
}
public double getTotalCost() {
return totalCost;
}
private enum OrderType {
RENT_A_COOK,
EVENT_CATERING,
SUSHI_NIGHT,
SOMETHING_ELSE
}
}