feat: add pricing quality controls
Quality / test (push) Canceled after 0s

Add robust outlier detection, stale valuation metadata, and audited seller-scoped market-value overrides with migration and tests.
This commit is contained in:
2026-09-09 01:19:51 -04:00
parent ba88814af0
commit 75c0e89511
12 changed files with 141 additions and 3 deletions
@@ -289,6 +289,16 @@ export const marketValuations = pgTable('market_valuations', {
calculatedAt: timestamp('calculated_at', { withTimezone: true }).defaultNow().notNull(),
});
export const marketValueOverrides = pgTable('market_value_overrides', {
id: uuid('id').defaultRandom().primaryKey(),
inventoryItemId: uuid('inventory_item_id').notNull().references(() => inventoryItems.id),
valueMinor: integer('value_minor').notNull(),
currency: text('currency').notNull(),
reason: text('reason').notNull(),
createdBy: uuid('created_by').notNull().references(() => users.id),
createdAt: timestamp('created_at', { withTimezone: true }).defaultNow().notNull(),
});
export const inventoryImages = pgTable(
'inventory_images',
{