Created
December 2, 2018 17:08
-
-
Save laugri/bebf07aa755c4efc46565f549bb2a7c8 to your computer and use it in GitHub Desktop.
DDD example - Entity
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
// 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