Skip to content

Instantly share code, notes, and snippets.

@laugri
Created December 2, 2018 17:08
Show Gist options
  • Save laugri/bebf07aa755c4efc46565f549bb2a7c8 to your computer and use it in GitHub Desktop.
Save laugri/bebf07aa755c4efc46565f549bb2a7c8 to your computer and use it in GitHub Desktop.
DDD example - Entity
// An example of an Entity
class ShoppingCart {
id: ShoppingCartId;
items: Array<ShoppingCartItem>
addItem(item: ShoppingCartItem) {
// implementation
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment