This commit is contained in:
Haim Kortovich
2026-03-05 11:30:08 -05:00
commit a52f049a29
46 changed files with 1938 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
defmodule PolicyService.Router do
use Commanded.Commands.Router
alias PolicyService.Commands.Car
alias PolicyService.Aggregates
dispatch(
[
Car.SubmitCarPolicyApplication,
Car.RecordCarProviderQuote,
Car.AcceptCarQuoteAndSolicit,
Car.RecordCarPolicyIssued
],
to: PolicyService.Aggregates.CarPolicyApplication,
identity: :application_id
)
end
defmodule PolicyService.CommandedApp do
use Commanded.Application,
otp_app: :policy_service
router(PolicyService.Router)
end