refactor buyer and insured and add more policy types
All checks were successful
Build and Publish / build-release (push) Successful in 1m38s
All checks were successful
Build and Publish / build-release (push) Successful in 1m38s
This commit is contained in:
@@ -13,15 +13,39 @@ defmodule PolicyService.Router do
|
||||
identity: :id
|
||||
)
|
||||
|
||||
# Route Fire commands to Fire Aggregate
|
||||
# Route Life commands to Life Aggregate
|
||||
dispatch(
|
||||
[
|
||||
PolicyService.Commands.FirePolicy.SubmitPolicyApplication,
|
||||
PolicyService.Commands.FirePolicy.RecordProviderQuote,
|
||||
PolicyService.Commands.FirePolicy.AcceptQuoteAndSolicit,
|
||||
PolicyService.Commands.FirePolicy.RecordPolicyIssued
|
||||
PolicyService.Commands.LifePolicy.SubmitPolicyApplication,
|
||||
PolicyService.Commands.LifePolicy.RecordProviderQuote,
|
||||
PolicyService.Commands.LifePolicy.AcceptQuoteAndSolicit,
|
||||
PolicyService.Commands.LifePolicy.RecordPolicyIssued
|
||||
],
|
||||
to: PolicyService.Aggregates.FirePolicyApplication,
|
||||
to: PolicyService.Aggregates.LifePolicyApplication,
|
||||
identity: :id
|
||||
)
|
||||
|
||||
# Route FireStructure commands to FireStructure Aggregate
|
||||
dispatch(
|
||||
[
|
||||
PolicyService.Commands.FireStructurePolicy.SubmitPolicyApplication,
|
||||
PolicyService.Commands.FireStructurePolicy.RecordProviderQuote,
|
||||
PolicyService.Commands.FireStructurePolicy.AcceptQuoteAndSolicit,
|
||||
PolicyService.Commands.FireStructurePolicy.RecordPolicyIssued
|
||||
],
|
||||
to: PolicyService.Aggregates.FireStructurePolicyApplication,
|
||||
identity: :id
|
||||
)
|
||||
|
||||
# Route FireContents commands to FireContents Aggregate
|
||||
dispatch(
|
||||
[
|
||||
PolicyService.Commands.FireContentsPolicy.SubmitPolicyApplication,
|
||||
PolicyService.Commands.FireContentsPolicy.RecordProviderQuote,
|
||||
PolicyService.Commands.FireContentsPolicy.AcceptQuoteAndSolicit,
|
||||
PolicyService.Commands.FireContentsPolicy.RecordPolicyIssued
|
||||
],
|
||||
to: PolicyService.Aggregates.FireContentsPolicyApplication,
|
||||
identity: :id
|
||||
)
|
||||
end
|
||||
@@ -31,4 +55,4 @@ defmodule PolicyService.CommandedApp do
|
||||
otp_app: :policy_service
|
||||
|
||||
router(PolicyService.Router)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user