forked from ashishps1/awesome-low-level-design
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOrder.java
44 lines (35 loc) · 973 Bytes
/
Order.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package restaurantmanagementsystem;
import java.sql.Timestamp;
import java.util.List;
public class Order {
private final int id;
private final List<MenuItem> items;
private final double totalAmount;
private OrderStatus status;
private final Timestamp timestamp;
public Order(int id, List<MenuItem> items, double totalAmount, OrderStatus status, Timestamp timestamp) {
this.id = id;
this.items = items;
this.totalAmount = totalAmount;
this.status = status;
this.timestamp = timestamp;
}
public void setStatus(OrderStatus status) {
this.status = status;
}
public int getId() {
return id;
}
public List<MenuItem> getItems() {
return items;
}
public double getTotalAmount() {
return totalAmount;
}
public OrderStatus getStatus() {
return status;
}
public Timestamp getTimestamp() {
return timestamp;
}
}