feat(dönem): dönem açma, açık dönem, düzenleme ve haftalar (backend)

- /api/periods: liste, açık dönem, aç, detay, düzenle
- Kurallar: tek açık dönem, çakışma yok, bitiş hariç, en fazla 62 gün, kapalı dönem salt okunur
- Tarih daraltılırken dışarıda harcama kalırsa engellenir
- Haftalar Pazartesi başlangıçlı, kısmi haftalar ayrı (takvim yardımcıları)
- Otomatik dönem adı: "Aralık 2026" / "15 Ara 2026 – 14 Oca 2027"
- Testler: takvim (4), dönem kuralları (2), entegrasyon (5)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-12 02:56:13 +03:00
parent a2b4119f3e
commit b883530f76
16 changed files with 1048 additions and 1 deletions
+21
View File
@@ -0,0 +1,21 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { PeriodStatus } from "./PeriodStatus";
import type { PeriodWeek } from "./PeriodWeek";
export type Period = { id: string, name: string,
/**
* Dahil
*/
start_date: string,
/**
* Hariç (veritabanındaki değer)
*/
end_date: string,
/**
* Son gün, dahil (gösterim için)
*/
last_date: string, days: number, status: PeriodStatus,
/**
* Kuruş
*/
savings_goal: number, version: number, weeks: Array<PeriodWeek>, };
+19
View File
@@ -0,0 +1,19 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type PeriodCreateRequest = {
/**
* `"YYYY-MM-DD"`, dahil
*/
start_date: string,
/**
* `"YYYY-MM-DD"`, hariç (ör. Aralık için `2027-01-01`)
*/
end_date: string,
/**
* Boşsa otomatik ("Aralık 2026")
*/
name?: string,
/**
* Kuruş
*/
savings_goal?: number, };
+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 PeriodStatus = "open" | "closed";
@@ -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 PeriodUpdateRequest = { name?: string, start_date?: string, end_date?: string, savings_goal?: number, version?: number, };
+11
View File
@@ -0,0 +1,11 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type PeriodWeek = {
/**
* 1'den başlar
*/
index: number, start_date: string,
/**
* Dahil
*/
last_date: string, days: number, };