feat: Phase 2 – Budget-Engine + Direktzugriff (http://IP:Port)
Budget: - Modelle + Migration 0003: budget_template_lines, planned_income_lines, budget_periods, budget_period_lines. - services/budget: Perioden-Grenzen (einstellbarer Starttag, Label nach Endmonat), Standard-Vorlage vs. Monats-Override (Snapshot-on-Customize), Soll/Ist inkl. budgetierter Sparen-Transfers, geplante Einnahmen (Soll/Ist). - routers/budgets: Vorlage, geplante Einnahmen (CRUD), Monats-Soll/Ist, Monats-Override, Zurücksetzen. pytest: Perioden, Soll/Ist, Override/Reset, Einnahmen. - Frontend: Budget-Seite (Monat + Standard-Budget), Fortschrittsbalken grün/rot, Monats-Navigation, editierbare Soll-Beträge; Sparen-Option im Transfer-Formular. Deployment-Fix (Nutzer-Anforderung: http://IP:Port muss funktionieren): - Dienst bindet an APP_BIND_HOST=0.0.0.0 (direkt im LAN erreichbar). - APP_COOKIE_SECURE=false als Standard (sonst kein Login über reines HTTP); für reinen HTTPS-Betrieb umstellbar. Doku + install.sh entsprechend angepasst. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -255,3 +255,31 @@ class ConversionOut(BaseModel):
|
||||
date: date_t
|
||||
converted_cents: int | None
|
||||
rate: float | None
|
||||
|
||||
|
||||
# --- Budget: geplante Einnahmen --------------------------------------------
|
||||
|
||||
|
||||
class PlannedIncomeCreate(BaseModel):
|
||||
label: str = Field(min_length=1, max_length=120)
|
||||
category_id: int | None = None
|
||||
target_account_id: int | None = None
|
||||
planned_cents: int = Field(ge=0)
|
||||
|
||||
|
||||
class PlannedIncomeUpdate(BaseModel):
|
||||
label: str | None = Field(default=None, min_length=1, max_length=120)
|
||||
category_id: int | None = None
|
||||
target_account_id: int | None = None
|
||||
planned_cents: int | None = Field(default=None, ge=0)
|
||||
|
||||
|
||||
class PlannedIncomeOut(BaseModel):
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
|
||||
id: int
|
||||
label: str
|
||||
category_id: int | None
|
||||
target_account_id: int | None
|
||||
planned_cents: int
|
||||
position: int
|
||||
|
||||
Reference in New Issue
Block a user