feat(plan): sabit gelir/gider kalemleri ve dönem notları (backend)

- /api/periods/{id}/plan-items: listele, ekle; /api/plan-items/{id}: düzenle, sil
- Önceki dönemden kopyala: göreli gün korunur, dönem sonuna kırpılır, aynı kalem tekrar eklenmez
- /api/periods/{id}/notes (planning | review), /api/notes/{id}: Markdown notlar
- Kapalı dönemde değişiklik yok; silme geri alınabilir şekilde işaretlenir
- Entegrasyon testleri (5): kurallar, kopyalama, salt okunur dönem, hane izolasyonu

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-12 03:34:35 +03:00
parent b883530f76
commit 7f3fde074c
23 changed files with 1337 additions and 8 deletions
+7
View File
@@ -0,0 +1,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type CopyPreviousResult = {
/**
* Eklenen kalem sayısı (zaten var olanlar atlanır)
*/
added: number, };
+8
View File
@@ -0,0 +1,8 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { NoteContext } from "./NoteContext";
export type Note = { id: string, context: NoteContext, title: string, body_md: string, created_by: string,
/**
* ISO 8601
*/
updated_at: string, version: number, };
+6
View File
@@ -0,0 +1,6 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
/**
* Notun bağlı olduğu sayfa
*/
export type NoteContext = "planning" | "review";
+8
View File
@@ -0,0 +1,8 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { NoteContext } from "./NoteContext";
export type NoteCreateRequest = { context: NoteContext, title: string,
/**
* Markdown
*/
body_md: string, };
+3
View File
@@ -0,0 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type NoteUpdateRequest = { title?: string, body_md?: string, version?: number, };
+8
View File
@@ -0,0 +1,8 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { PlanItemKind } from "./PlanItemKind";
export type PlanItem = { id: string, kind: PlanItemKind, name: string,
/**
* Kuruş
*/
amount: number, date: string | null, sort_order: number, version: number, };
@@ -0,0 +1,12 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { PlanItemKind } from "./PlanItemKind";
export type PlanItemCreateRequest = { kind: PlanItemKind, name: string,
/**
* Kuruş, > 0
*/
amount: number,
/**
* `"YYYY-MM-DD"`, dönem içinde (isteğe bağlı)
*/
date?: string, };
+3
View File
@@ -0,0 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type PlanItemKind = "income" | "expense";
@@ -0,0 +1,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type PlanItemUpdateRequest = { name?: string, amount?: number,
/**
* Boş metin → tarihi kaldır
*/
date?: string, version?: number, };