Fas 1b punkt 6: First Scan Coach + aktiveringsmätning

This commit is contained in:
Sven (AAMOS AI)
2026-08-06 04:14:49 +07:00
parent 2f3cdf8016
commit bd8df59138
29 changed files with 9378 additions and 29 deletions
@@ -21,6 +21,24 @@ export const households = pgTable(
name: text("name").notNull(),
inviteCode: text("invite_code").notNull(),
weeklyBudgetMinor: integer("weekly_budget_minor"),
/** Fas 1b: aktiveringsmått (spec §4.2) */
firstScanCompletedAt: timestamp("first_scan_completed_at", { withTimezone: true }),
fifthItemConfirmedAt: timestamp("fifth_item_confirmed_at", { withTimezone: true }),
firstRecipeRecommendationViewedAt: timestamp(
"first_recipe_recommendation_viewed_at",
{ withTimezone: true },
),
firstRecipeSavedOrStartedAt: timestamp("first_recipe_saved_or_started_at", {
withTimezone: true,
}),
activatedAt: timestamp("activated_at", { withTimezone: true }),
firstCookingSessionCompletedAt: timestamp("first_cooking_session_completed_at", {
withTimezone: true,
}),
inventoryUpdatedAfterCookingAt: timestamp("inventory_updated_after_cooking_at", {
withTimezone: true,
}),
valueConfirmedAt: timestamp("value_confirmed_at", { withTimezone: true }),
/** 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(),