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

@@ -0,0 +1,65 @@
defmodule PolicyService.Commands.Policy do
@moduledoc """
Base templates for Policy commands.
Use these macros to ensure all policy types share the same structure.
"""
defmodule SubmitPolicyApplication do
defmacro __using__(_opts) do
quote do
defstruct [
:id,
:submitted_by,
:applicant_info,
:policy_details,
:selected_providers
]
end
end
end
defmodule RecordProviderQuote do
defmacro __using__(_opts) do
quote do
defstruct [
:id,
:recorded_by,
:provider_id,
:quote_id,
:premium,
:coverage_details,
:valid_until,
:plans
]
end
end
end
defmodule AcceptQuoteAndSolicit do
defmacro __using__(_opts) do
quote do
defstruct [
:id,
:accepted_by,
:quote_id,
:plan_id,
:solicitation_fields
]
end
end
end
defmodule RecordPolicyIssued do
defmacro __using__(_opts) do
quote do
defstruct [
:id,
:policy_number,
:effective_date,
:expiry_date,
:issued_at
]
end
end
end
end