Files
moneyfyandClaude Opus 5 b586d27b77 feat(api): Core-API mit Authentifizierung, CRUD und Monatsreport
- Anmeldung über Argon2id und JWT in httpOnly-Cookies, Refresh mit echter
  Rotation über die neue Tabelle refresh_token
- AuthProvider-Protokoll als Vorbereitung für OIDC, Administrator-Anlage beim
  Erststart mit erzwungenem Passwortwechsel
- CRUD für Konten, Kategorien (zweistufiger Baum), Firmen, Recurrences,
  Preisversionen, Buchungen, Budgets, Vorlagen und Sparziele
- Fälligkeiten mit Overlay-Logik: abrufen, bestätigen, auslassen, zurücksetzen
- Kontosalden zum Stichtag, Monatsübersicht mit Plan-Ist-Vergleich
- SECRET_KEY jetzt mindestens 32 Zeichen; Platzhalter in Produktion abgelehnt
- 61 neue Integrationstests, insgesamt 148 grün

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014e7t8UpmoVNMtWivY5LiSH
2026-09-09 13:40:37 +02:00

49 lines
1.3 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""Schemata für einmalige Buchungen."""
from datetime import date, datetime
from pydantic import Field
from app.models.enums import EntryKind
from app.schemas.common import ApiModel, InputModel, Money, PositiveMoney
from app.schemas.merchant import MerchantOut
class TransactionCreate(InputModel):
kind: EntryKind
title: str = Field(min_length=1, max_length=160, examples=["Wocheneinkauf"])
merchant_id: int | None = None
category_id: int
account_id: int
amount: PositiveMoney = Field(description="Immer positiv die Richtung steckt in `kind`.")
booking_date: date
note: str | None = None
tags: list[str] = Field(default_factory=list)
class TransactionUpdate(InputModel):
kind: EntryKind | None = None
title: str | None = Field(default=None, min_length=1, max_length=160)
merchant_id: int | None = None
category_id: int | None = None
account_id: int | None = None
amount: PositiveMoney | None = None
booking_date: date | None = None
note: str | None = None
tags: list[str] | None = None
class TransactionOut(ApiModel):
id: int
kind: EntryKind
title: str
merchant_id: int | None
category_id: int
account_id: int
amount: Money
booking_date: date
note: str | None
tags: list[str]
created_at: datetime
merchant: MerchantOut | None = None