Skip to content

Instantly share code, notes, and snippets.

@justinhj
Created January 4, 2020 19:35
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/488cb5596f241e90d2f75e4d90f9e583 to your computer and use it in GitHub Desktop.
Save justinhj/488cb5596f241e90d2f75e4d90f9e583 to your computer and use it in GitHub Desktop.
sealed trait BankAccountCommand
case class DepositCmd(time: Instant, amount: Int) extends BankAccountCommand
case class PurchaseCmd(time: Instant, amount: Int) extends BankAccountCommand
case class AssignAccountHolderCmd(time: Instant, accountHolder: String) extends BankAccountCommand
sealed trait BankAccountEvent
case class DepositEvt(time: Instant, amount: Int) extends BankAccountEvent
case class PurchaseEvt(time: Instant, amount: Int) extends BankAccountEvent
case class AssignAccountHolderEvt(time: Instant, accountHolder: String) extends BankAccountEvent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment