feat(backend): migration mekanizması, indeksler ve ortak model yardımcıları

- db/migrations.rs: schema_migrations ile sürümlü migration (v1: koleksiyonlar)
- db/indexes.rs: DATA_MODEL indeksleri + senkronizasyon indeksi, açılışta otomatik
- models/common.rs: UUID v7, ortak alanlar, hane kapsamlı filtre
- Birim testleri (4)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-11 23:25:55 +03:00
parent 8ec24ecec2
commit 5550c7c43d
13 changed files with 367 additions and 34 deletions
+2 -1
View File
@@ -60,7 +60,7 @@ Renkler ve ikonlar frontend tasarım token'larında.
### 3.2 `households`
```js
{ _id, name, owner_id,
{ _id, household_id /* = _id */, name, owner_id,
settings: {
currency: "TRY",
budget_split_pct: { needs: 50, wants: 30, culture: 10, unexpected: 10 },
@@ -68,6 +68,7 @@ Renkler ve ikonlar frontend tasarım token'larında.
},
created_at, updated_at, deleted_at, version }
```
- `household_id` = `_id` (ortak `scope()` filtresi tüm koleksiyonlarda aynı çalışsın diye).
- Prompttaki `settings` koleksiyonu yerine **haneye gömülü** (her hanede tek kayıt olduğu için ayrı koleksiyona gerek yok).
### 3.3 `invites`