Fas 2 steg 2: Inventory Trust Engine - decay-profiler och cache-jobb
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
timestamp,
|
||||
uuid,
|
||||
integer,
|
||||
varchar,
|
||||
} from "drizzle-orm/pg-core";
|
||||
import type { NutritionDeclaration } from "@app/shared-types";
|
||||
import {
|
||||
@@ -17,7 +18,6 @@ import {
|
||||
expiryStatusEnum,
|
||||
inventorySourceEnum,
|
||||
inventoryTransactionTypeEnum,
|
||||
trustStateEnum,
|
||||
unitEnum,
|
||||
updatedAt,
|
||||
} from "./_shared.js";
|
||||
@@ -64,7 +64,7 @@ export const inventoryItems = pgTable(
|
||||
lastVerifiedAt: timestamp("last_verified_at", { withTimezone: true }),
|
||||
expiryStatus: expiryStatusEnum("expiry_status").notNull().default("unknown"),
|
||||
/** Inventory Trust Engine state (Fas 2): computed from confidence, decay and verification. */
|
||||
trustState: trustStateEnum("trust_state").notNull().default("unverified"),
|
||||
trustState: varchar("trust_state", { length: 16 }).notNull().default("unverified"),
|
||||
/** Sätts när saldot nått 0 och posten arkiverats. */
|
||||
depletedAt: timestamp("depleted_at", { withTimezone: true }),
|
||||
modelVersion: text("model_version"),
|
||||
|
||||
Reference in New Issue
Block a user