first sketch; incomplete; WiP
Tests / test (push) Successful in 11s
Tests / lint (push) Failing after 8s

This commit is contained in:
2026-10-27 20:35:49 +01:00
parent 6babc560c7
commit 6b2821ba96
4 changed files with 72 additions and 7 deletions
+3 -2
View File
@@ -5,7 +5,7 @@ from pydantic import Field, computed_field
from sqlalchemy import Date, ForeignKey, Index, Integer, String, UniqueConstraint
from sqlalchemy.orm import Mapped, mapped_column, relationship
from src.models.common import ExportBaseModel, IngestdbBase, date2str, hashify
from src.models.common import Amount, ExportBaseModel, IngestdbBase, date2str, hashify
class Transaction(ExportBaseModel):
@@ -22,12 +22,13 @@ class Transaction(ExportBaseModel):
account_iban: str
account_currency: str
date_valid: date
amount: Decimal = Field(description="Signed amount; negative = money out")
amount: Amount
amount_currency: str
date_book: date | None = None
text: str | None = None
other_name: str | None = None
other_iban: str | None = None
# TODO: The Pydantic model should hold a category object, NOT the category id which is owned by the DB
category_id: int | None = None
@computed_field # type: ignore[prop-decorator]