mirror of
https://github.com/Zproger/Aurum.git
synced 2026-10-13 02:56:39 +07:00
Initial public release
Aurum — a self-hosted personal finance operating system: cash flow, net worth tracking, budgets, goals, recurring payments, reports, proactive alerts, and a compound-interest returns calculator, all bilingual (RU/EN) and mobile-first. Ships as a three-container Docker Compose stack (Postgres + FastAPI + nginx-served React frontend). See README.md for setup and CONTRIBUTING.md for development.
This commit is contained in:
40
backend/app/schemas/reports.py
Normal file
40
backend/app/schemas/reports.py
Normal file
@@ -0,0 +1,40 @@
|
||||
from datetime import date as date_
|
||||
from decimal import Decimal
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class CategorySpendingPoint(BaseModel):
|
||||
year: int
|
||||
month: int
|
||||
amount: Decimal
|
||||
|
||||
|
||||
class CategorySpendingReport(BaseModel):
|
||||
category_id: int
|
||||
category_name: str
|
||||
category_color: str
|
||||
category_icon: str | None
|
||||
start_date: date_ | None
|
||||
end_date: date_ | None
|
||||
total_amount: Decimal
|
||||
transaction_count: int
|
||||
average_per_month: Decimal
|
||||
series: list[CategorySpendingPoint]
|
||||
|
||||
|
||||
class CategoryRankingItem(BaseModel):
|
||||
category_id: int
|
||||
name: str
|
||||
color: str
|
||||
icon: str | None
|
||||
amount: Decimal
|
||||
percent: float
|
||||
transaction_count: int
|
||||
|
||||
|
||||
class CategoryRankingReport(BaseModel):
|
||||
start_date: date_ | None
|
||||
end_date: date_ | None
|
||||
total_amount: Decimal
|
||||
items: list[CategoryRankingItem]
|
||||
Reference in New Issue
Block a user