Insurance
Below is the model for just user.insurance.
Model​
LikertValue
const LikertValue = {
type: Number,
min: 0,
max: 6,
};
Note
The Likert Values currently go from 0 to 6 on the backend. This may or may not change depending on if we discover any complications from using 0 as a value in calculations.
InsuranceProductData
const InsuranceProductSchema = {
id: Number,
productName: String,
everdaysWrapper: String,
subtitle: String, // NEW - 8.17.22
subtitleBold: String, // NEW - 8.17.22
provider: String,
providerFullName: String, // NEW - 8.24.22
providerLogo: String, // NEW - 8.18.22
type: { type: String, enum: ["wholeLife", "termLife", "finalExpenses"] },
productIcon: String,
disqualifiers: [String],
score: Number,
highlights: [String],
objectives: [String],
negatives: [String],
fullFeatures: [{ header?: String, copy: String }] // NEW - 8.18.22
};
user.insurance
insurance: {
objectives: {
enoughIncomeToRetire: LikertValue,
coverCareCosts: LikertValue,
coverFinalExpenses: LikertValue,
settlePosthumousBills: LikertValue,
policySize: LikertValue,
coveragePermanence: LikertValue,
willingnessToAnswerMoreQuestions: Boolean
},
finances: {
monthlyExpenses: Number,
monthlyAllowance: Number,
totalAssets: Number
},
lostInsurance: {
health: { type: Boolean, default: false },
vision: { type: Boolean, default: false },
dental: { type: Boolean, default: false },
life: { type: Boolean, default: false },
other: []
},
health: {
seriousIllness: Boolean,
inCare: Boolean,
practiceSelfCare: Boolean,
smoker: Boolean,
sleepWell: Boolean,
drinker: Boolean,
exerciser: Boolean,
height: Number, // inches,
weight: Number, // lbs
bmi: Number
},
matches: {
lastCalculated: Date,
bestMatch: InsuranceProductSchema,
remainingMatches: [InsuranceProductSchema]
},
selectedProduct: {
productData: InsuranceProductSchema,
dateSelected: Date,
wasRejected: Boolean
},
rejectedProducts: [
{
_id: false,
dateRejected: Date,
type: { type: String, enum: ['finalExpenses', 'termLife', 'wholeLife'] },
provider: { type: String, enum: ['aa', 'vantis'] }
}
]
}