wip
Some checks are pending
Build and Publish / build-release (push) Waiting to run

This commit is contained in:
2026-04-13 15:30:31 -05:00
parent a52f049a29
commit 5037bc3632
44 changed files with 2210 additions and 676 deletions

View File

@@ -1,17 +1,28 @@
defmodule PolicyService.Router do
use Commanded.Commands.Router
alias PolicyService.Commands.Car
alias PolicyService.Aggregates
# Route Car commands to Car Aggregate
dispatch(
[
Car.SubmitCarPolicyApplication,
Car.RecordCarProviderQuote,
Car.AcceptCarQuoteAndSolicit,
Car.RecordCarPolicyIssued
PolicyService.Commands.CarPolicy.SubmitPolicyApplication,
PolicyService.Commands.CarPolicy.RecordProviderQuote,
PolicyService.Commands.CarPolicy.AcceptQuoteAndSolicit,
PolicyService.Commands.CarPolicy.RecordPolicyIssued
],
to: PolicyService.Aggregates.CarPolicyApplication,
identity: :application_id
identity: :id
)
# Route Fire commands to Fire Aggregate
dispatch(
[
PolicyService.Commands.FirePolicy.SubmitPolicyApplication,
PolicyService.Commands.FirePolicy.RecordProviderQuote,
PolicyService.Commands.FirePolicy.AcceptQuoteAndSolicit,
PolicyService.Commands.FirePolicy.RecordPolicyIssued
],
to: PolicyService.Aggregates.FirePolicyApplication,
identity: :id
)
end