feat(seed): örnek bütçeler

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-06 00:58:51 +03:00
parent 62023ef35d
commit a274d29728
4 changed files with 72 additions and 0 deletions
+6
View File
@@ -12,6 +12,7 @@ import { storedEmail } from "@/shared/account-email";
import { runMigrations } from "../migrations";
import { seedContacts } from "./contacts";
import { seedAssets } from "./assets";
import { seedBudgets } from "./budgets";
import { seedInKind } from "./in-kind";
import { seedInstallments } from "./installments";
import { seedRecurring } from "./recurring";
@@ -53,6 +54,7 @@ export type SeedSummary = {
contacts: number;
inKind: number;
assets: number;
budgets: number;
};
accounts: SeedAccountRow[];
};
@@ -75,6 +77,7 @@ const DOMAIN_COLLECTIONS = [
"inKindDebts",
"assets",
"assetMovements",
"budgets",
];
type AuthApi = ReturnType<typeof getAuth>["api"];
@@ -129,6 +132,7 @@ export async function runSeed({
contacts: 0,
inKind: 0,
assets: 0,
budgets: 0,
},
accounts: [],
};
@@ -309,6 +313,8 @@ export async function runSeed({
if (summary.created.inKind) log(`✓ Örnek aynî kayıtlar ve fiyatlar: ${summary.created.inKind}`);
summary.created.assets = await seedAssets(householdIds, userIdMap);
if (summary.created.assets) log(`✓ Örnek varlıklar: ${summary.created.assets}`);
summary.created.budgets = await seedBudgets(householdIds, userIdMap);
if (summary.created.budgets) log(`✓ Örnek bütçeler: ${summary.created.budgets}`);
// 7) Geliştirme hesapları tablosu
const all = [