feat(shopping): mağazalar, zahmet skoru ve ürünler (marka/paket, dönüşüm, görseller)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-06 11:48:04 +03:00
parent 8e7e374778
commit f0b570284e
23 changed files with 1893 additions and 1 deletions
+12
View File
@@ -13,6 +13,7 @@ import { runMigrations } from "../migrations";
import { seedContacts } from "./contacts";
import { seedAssets } from "./assets";
import { seedBudgets } from "./budgets";
import { seedShopping } from "./shopping";
import { seedStock } from "./stock";
import { seedInKind } from "./in-kind";
import { seedInstallments } from "./installments";
@@ -57,6 +58,8 @@ export type SeedSummary = {
assets: number;
budgets: number;
stock: number;
stores: number;
products: number;
};
accounts: SeedAccountRow[];
};
@@ -84,6 +87,8 @@ const DOMAIN_COLLECTIONS = [
"productTypes",
"stockMovements",
"stockCounts",
"stores",
"products",
];
type AuthApi = ReturnType<typeof getAuth>["api"];
@@ -140,6 +145,8 @@ export async function runSeed({
assets: 0,
budgets: 0,
stock: 0,
stores: 0,
products: 0,
},
accounts: [],
};
@@ -324,6 +331,11 @@ export async function runSeed({
if (summary.created.budgets) log(`✓ Örnek bütçeler: ${summary.created.budgets}`);
summary.created.stock = await seedStock(householdIds, userIdMap);
if (summary.created.stock) log(`✓ Örnek stok ürün tipleri: ${summary.created.stock}`);
const shopping = await seedShopping(householdIds, userIdMap);
summary.created.stores = shopping.stores;
summary.created.products = shopping.products;
if (shopping.stores || shopping.products)
log(`✓ Örnek mağazalar ve ürünler: ${shopping.stores} / ${shopping.products}`);
// 7) Geliştirme hesapları tablosu
const all = [