refactor buyer and insured and add more policy types
All checks were successful
Build and Publish / build-release (push) Successful in 1m38s

This commit is contained in:
2026-04-27 14:06:28 -05:00
parent c8a58c3f58
commit 2a8f2ffc2d
27 changed files with 676 additions and 170 deletions

View File

@@ -2,29 +2,30 @@ defmodule PolicyService.Projections.PolicyApplication do
use Ecto.Schema
@derive {Jason.Encoder,
only: [
:id,
:application_id,
:org_id,
:submitted_by,
:policy_type,
:applicant_info,
:policy_details,
:selected_providers,
:quotes,
:accepted_plan_id,
:accepted_by,
:provider_policy_number,
:premium,
:effective_date,
:expiry_date,
:status,
:submitted_at,
:solicitation_sent_at,
:issued_at,
:inserted_at,
:updated_at
]}
only: [
:id,
:application_id,
:org_id,
:submitted_by,
:policy_type,
:insured,
:buyer,
:policy_details,
:selected_providers,
:quotes,
:accepted_plan_id,
:accepted_by,
:provider_policy_number,
:premium,
:effective_date,
:expiry_date,
:status,
:submitted_at,
:solicitation_sent_at,
:issued_at,
:inserted_at,
:updated_at
]}
@derive {
Flop.Schema,
@@ -50,7 +51,8 @@ defmodule PolicyService.Projections.PolicyApplication do
field :submitted_by, :string
field :policy_type, :string
field :applicant_info, :map
field :insured, :map
field :buyer, :map
field :policy_details, :map
field :selected_providers, {:array, :string}, default: []
@@ -59,7 +61,7 @@ defmodule PolicyService.Projections.PolicyApplication do
field :accepted_plan_id, :string
field :accepted_by, :string
field :provider_policy_number, :string
field :provider_policy_number, :string
field :premium, :decimal
field :effective_date, :date