Skip to content

Instantly share code, notes, and snippets.

@berndruecker
Last active March 13, 2017 06:17
Show Gist options
  • Save berndruecker/924780bf4d55efd9d840ecda7a5488b0 to your computer and use it in GitHub Desktop.
Save berndruecker/924780bf4d55efd9d840ecda7a5488b0 to your computer and use it in GitHub Desktop.
Order entity with state information
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