Created
May 2, 2019 09:14
-
-
Save godrm/c8ae04c60e64598744da946f46b64ae8 to your computer and use it in GitHub Desktop.
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 Customer : | |
Entity, | |
AggregateProtocol | |
{ | |
private (set) var id : UUID | |
private (set) var email : String | |
private var orders : Array<Order> | |
init?(email : String, name : String, uniqueChecker : CustomerUniqueCheckerDelegate) { | |
id = UUID.init() | |
self.email = email | |
self.orders = Array<Order>() | |
super.init(name: name) | |
guard uniqueChecker.isUnique(self) else { return nil } | |
} | |
//...중간생략 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment