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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user