Last active
March 13, 2017 06:17
-
-
Save berndruecker/924780bf4d55efd9d840ecda7a5488b0 to your computer and use it in GitHub Desktop.
Order entity with state information
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Order { | |
String id; | |
Customer customer; | |
List<OrderItem> items; | |
static enum GoodsDeliveryStatus { | |
NOTHING_DONE, | |
GOODS_RESERVED, | |
GOODS_PICKED | |
} | |
boolean paymentReceived = false; | |
GoodsDeliveryStatus deliveryStatus = GoodsDeliveryStatus.NOTHING_DONE; | |
boolean shipped = false; | |
//... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment