Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- object Invoice extends AggregateFactory[Invoice, InvoiceEvent] {
- def create(invoiceId: Int) = applyEvent(InvoiceCreated(invoiceId))
- def applyEvent = {
- case event: InvoiceCreated => Invoice(event :: Nil, event.invoiceId)
- case event => unhandled(event)
- }
- }
Add Comment
Please, Sign In to add comment