Hermetiska integrationstester + auto-hushall i onboarding (size, i18n, locations)
This commit is contained in:
@@ -39,6 +39,8 @@ export const households = pgTable(
|
||||
withTimezone: true,
|
||||
}),
|
||||
valueConfirmedAt: timestamp("value_confirmed_at", { withTimezone: true }),
|
||||
/** Antal personer i hushållet – anges tidigt i onboarding för att styra portionsant och budget. */
|
||||
size: integer("size"),
|
||||
/** ISO 4217. Pengagränsen går vid hushållet (i18n-spec §20) – alla belopp i hushållet tolkas i denna valuta. */
|
||||
currencyCode: varchar("currency_code", { length: 3 }).notNull().default("SEK"),
|
||||
createdAt: createdAt(),
|
||||
|
||||
@@ -77,6 +77,8 @@ export const quickStartInputSchema = z.object({
|
||||
primaryGoal: z.enum(GOAL_TYPES).optional(),
|
||||
// Multi-select goals (new UI). First goal is considered primary.
|
||||
goals: z.array(z.enum(GOAL_TYPES)).max(11).optional(),
|
||||
// Household size for the auto-created household (default 1 if omitted).
|
||||
persons: z.coerce.number().int().min(1).max(50).optional(),
|
||||
precisionMode: z.enum(PRECISION_MODES).default("simple"),
|
||||
});
|
||||
export type QuickStartInput = z.infer<typeof quickStartInputSchema>;
|
||||
|
||||
Reference in New Issue
Block a user