CoreBanking.Accounts.Aggregates.Account alias CoreBanking.Accounts.Commands.OpenAccount dispatch([OpenAccount], to: Account) end CoreBanking.Accounts.Router.dispatch(%OpenAccount{ ... })
"Projectors.Account" alias CoreBanking.Accounts.Events.AccountOpened alias CoreBanking.ViewModel.Account alias Ecto.Multi project %AccountOpened{} = evt do Multi.insert(multi, :account, %Account{ operator_id: evt.operator_id, id: evt.account_id, owner_id: evt.owner_id, balance: 0 }) end end