feat(members): add taxReceiptPreferences schema field (Phase 1 forward-compat)

Nested object with filesCanadianTaxes, middleInitial, confirmedAddress
(street/city/province/country/postalCode), setupCompletedAt. All
default to null/false so existing members read as 'not set up'.

Schema-only: no Zod, no API route, no UI. Phase 2 will build the
account-page preferences flow and bind to these fields without
needing a migration.
This commit is contained in:
Jennie Robinson Faber 2026-04-20 13:22:19 +01:00
parent ef26b57ce2
commit 9fecb7d374

View file

@ -95,6 +95,19 @@ const memberSchema = new mongoose.Schema({
acceptedAt: Date,
},
taxReceiptPreferences: {
filesCanadianTaxes: { type: Boolean, default: false },
middleInitial: { type: String, default: null },
confirmedAddress: {
street: { type: String, default: null },
city: { type: String, default: null },
province: { type: String, default: null },
country: { type: String, default: null },
postalCode: { type: String, default: null },
},
setupCompletedAt: { type: Date, default: null },
},
// Magic link single-use enforcement
magicLinkJti: String,
magicLinkJtiUsed: { type: Boolean, default: false },