Add date to CustomOrder

This commit is contained in:
Mathis Kral 2023-11-05 11:36:39 +01:00 committed by Simon Bruder
parent 4269e278a5
commit 6ce60ec3de
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC

View file

@ -3,6 +3,7 @@ package catering.order;
import org.aspectj.weaver.ast.Or; import org.aspectj.weaver.ast.Or;
import org.salespointframework.quantity.Quantity; import org.salespointframework.quantity.Quantity;
import java.time.LocalDateTime;
import java.util.Map; import java.util.Map;
/** /**
@ -11,12 +12,16 @@ import java.util.Map;
public class CustomOrder { public class CustomOrder {
private OrderType orderType; private OrderType orderType;
private LocalDateTime start;
private LocalDateTime finish;
private Map<String, Quantity> products; private Map<String, Quantity> products;
private boolean invoiceAvailable; private boolean invoiceAvailable;
private double totalCost; // this is in private double totalCost; // this is in
public CustomOrder(OrderType orderType, Map<String, Quantity> products, boolean invoiceAvailable, double totalCost) { public CustomOrder(OrderType orderType, LocalDateTime start, LocalDateTime finish, Map<String, Quantity> products, boolean invoiceAvailable, double totalCost) {
this.orderType = orderType; this.orderType = orderType;
this.start = start;
this.finish = finish;
this.products = products; this.products = products;
this.invoiceAvailable = invoiceAvailable; this.invoiceAvailable = invoiceAvailable;
this.totalCost = totalCost; this.totalCost = totalCost;
@ -26,6 +31,14 @@ public class CustomOrder {
return orderType; return orderType;
} }
public LocalDateTime getStart() {
return start;
}
public LocalDateTime getFinish() {
return finish;
}
public Map<String, Quantity> getProducts() { public Map<String, Quantity> getProducts() {
return products; return products;
} }