feat(raporlar): harcama kırılımı uç noktası ve dönem istatistiklerinde birikim oranı verileri
- GET /reports/breakdown: grup, tüm kategoriler, ödeme türü ve ay kırılımı; dönem/tarih/grup/kategori/ödeme türü filtreleri - /stats/periods: gelir, sabit gider, devirler, gerçekleşen birikim - Faz 9 planı kullanıcı kararlarıyla güncellendi (ekstre içe aktarma, JSON geri dönüş noktası, aylık rapor) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -6,11 +6,15 @@ export type PeriodStat = { id: string, name: string, start_date: string,
|
||||
/**
|
||||
* Son gün, dahil
|
||||
*/
|
||||
last_date: string, status: PeriodStatus, spendable: number, spent: number,
|
||||
last_date: string, status: PeriodStatus, income_total: number, fixed_expense_total: number, savings_goal: number, carryover_debt: number, carryover_surplus: number, spendable: number, spent: number,
|
||||
/**
|
||||
* Harcanan, gruplara göre
|
||||
*/
|
||||
spent_by_group: GroupAmounts,
|
||||
/**
|
||||
* Gelir − sabit − borç + artı − harcanan (negatifse açık). Birikim oranı = bu ÷ gelir
|
||||
*/
|
||||
realized_savings: number,
|
||||
/**
|
||||
* Kapanmamışsa `null`
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { ReportCategoryRow } from "./ReportCategoryRow";
|
||||
import type { ReportGroupRow } from "./ReportGroupRow";
|
||||
import type { ReportMethodRow } from "./ReportMethodRow";
|
||||
import type { ReportMonthRow } from "./ReportMonthRow";
|
||||
|
||||
export type ReportBreakdown = {
|
||||
/**
|
||||
* Kuruş
|
||||
*/
|
||||
total: number, count: number,
|
||||
/**
|
||||
* 4 grup, sabit sırada
|
||||
*/
|
||||
groups: Array<ReportGroupRow>,
|
||||
/**
|
||||
* Harcama olan **tüm** kategoriler, çoktan aza
|
||||
*/
|
||||
categories: Array<ReportCategoryRow>,
|
||||
/**
|
||||
* Ödeme türleri; `null` = girilmemiş
|
||||
*/
|
||||
payment_methods: Array<ReportMethodRow>,
|
||||
/**
|
||||
* Aylar (`"YYYY-MM"`), eskiden yeniye
|
||||
*/
|
||||
months: Array<ReportMonthRow>, };
|
||||
@@ -0,0 +1,4 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { Group } from "./Group";
|
||||
|
||||
export type ReportCategoryRow = { category_id: string, group: Group, total: number, count: number, };
|
||||
@@ -0,0 +1,4 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { Group } from "./Group";
|
||||
|
||||
export type ReportGroupRow = { group: Group, total: number, count: number, };
|
||||
@@ -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 ReportMethodRow = { payment_method_id: string | null, total: number, count: number, };
|
||||
@@ -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 ReportMonthRow = {
|
||||
/**
|
||||
* `"YYYY-MM"`
|
||||
*/
|
||||
month: string, total: number, count: number, };
|
||||
Reference in New Issue
Block a user