Skip to content

Instantly share code, notes, and snippets.

@justinhj
Last active December 18, 2019 05:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justinhj/048aa0c87b4df71c7dda86e584192380 to your computer and use it in GitHub Desktop.
Save justinhj/048aa0c87b4df71c7dda86e584192380 to your computer and use it in GitHub Desktop.
PE1
case class Account(balance: Int, accountHolder: Option[String])
class BankAccountEntity extends PersistentEntity {
override type Command = BankAccountCommand[_]
override type Event = BankAccountEvent
override type State = AccountState
override def initialState : State = Account(0, None)
def behavior = ??? // To come later
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment