Last active
January 19, 2020 04:15
-
-
Save justinhj/ddf44b78bfc5348e7aca4915273ed4a6 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
trait PersistentEntity[IDType, T <: PersistentEntity[IDType, T]] { | |
type Command | |
type Event | |
type State | |
def id: IDType | |
def state : State | |
def processCommand(command: Command) : List[Event] | |
def processEvent(event: Event) : T | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment