test
This commit is contained in:
1 parent
8d26a04095
commit
d3a8e8493c
13 files changed
+686
-69
No files matched your search
@@ -11,6 +11,14 @@ class Transaction(BaseModel):
|
||||
category: str = ""
|
||||
amount: Decimal = Field(default=Decimal("0"))
|
||||
description: str = ""
|
||||
# Валюта суммы. Пусто = валюта счёта, к которому привязана операция
|
||||
# (а если счёт не найден — базовая валюта модели).
|
||||
currency: str = ""
|
||||
|
||||
@field_validator("currency")
|
||||
@classmethod
|
||||
def _currency_upper(cls, v: str) -> str:
|
||||
return v.strip().upper()
|
||||
|
||||
@field_validator("amount")
|
||||
@classmethod
|
||||
|
||||
Reference in new issue
Block a user