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

@@ -7,11 +7,14 @@ defmodule PolicyService.Repo.Migrations.CreatePolicyApplications do
add :application_id, :string, null: false
add :org_id, :string, null: false
add :submitted_by, :string, null: false
# "car" | "life" | "fire"
# "car" | "life" | "fire_structure" | "fire_contents"
add :policy_type, :string, null: false
# Applicant — full map, shape varies by individual vs corporate
add :applicant_info, :map, default: %{}
# Insured — full map, shape varies by individual vs corporate
add :insured, :map, default: %{}
# Buyer — full map, shape varies by individual vs corporate
add :buyer, :map, default: %{}
# Policy-type-specific details — shape varies by policy_type
add :policy_details, :map, default: %{}
@@ -20,15 +23,15 @@ defmodule PolicyService.Repo.Migrations.CreatePolicyApplications do
add :selected_providers, {:array, :string}, default: []
add :quotes, :map, default: %{}
# Accepted plan
add :accepted_plan_id, :string
add :accepted_by, :string
# Accepted plan
add :accepted_plan_id, :string
add :accepted_by, :string
# Issued policy
add :provider_policy_number, :string
add :premium, :decimal
add :effective_date, :date
add :expiry_date, :date
# Issued policy
add :provider_policy_number, :string
add :premium, :decimal
add :effective_date, :date
add :expiry_date, :date
# Status + timestamps
add :status, :string, null: false