feat(in-kind): varlık türleri, fiyat tablosu, aynî borç/alacak, birikim planı ve ödeme akışı, 008 migration

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-05 12:37:48 +03:00
parent 1062b2d96c
commit 9781cd9ed2
15 changed files with 1354 additions and 3 deletions
+18
View File
@@ -0,0 +1,18 @@
import { AssetPriceModel } from "@/models/asset-price";
import { InKindDebtModel } from "@/models/in-kind-debt";
import type { Migration } from "./types";
export const migration: Migration = {
name: "008-in-kind",
description: "assetPrices ve inKindDebts index'leri; işlemlerde aynî borç alanları",
async up(db) {
await db
.collection("transactions")
.updateMany(
{ inKindDebtId: { $exists: false } },
{ $set: { inKindDebtId: null, inKindRole: null } },
);
await AssetPriceModel.createIndexes();
await InKindDebtModel.createIndexes();
},
};