3e7abd4518
- Register 6 mini-apps in kommunikation plugin (contact_picker, file_share, calendar_invite, mail_forward, ai_search, task_create) - Connect AdressenTab to backend API (GET/POST/PATCH/DELETE /addresses) - Create BankAccount model, schema, service, routes + migration 0033 - Connect KontenTab to backend API (GET/POST/PATCH/DELETE /bank-accounts) - AI tools already working: 7 tools registered (hybrid_search, get_contact_mails, etc.)
41 lines
1.2 KiB
Python
41 lines
1.2 KiB
Python
"""Bank account schemas — create, update, read, list."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class BankAccountCreate(BaseModel):
|
|
bank_name: str = Field(..., min_length=1, max_length=100)
|
|
iban: str = Field(..., min_length=1, max_length=34)
|
|
bic: str | None = Field(None, max_length=11)
|
|
account_holder: str | None = Field(None, max_length=200)
|
|
default_tax: str | None = Field(None, max_length=50)
|
|
is_default: bool = False
|
|
|
|
|
|
class BankAccountUpdate(BaseModel):
|
|
bank_name: str | None = Field(None, min_length=1, max_length=100)
|
|
iban: str | None = Field(None, min_length=1, max_length=34)
|
|
bic: str | None = Field(None, max_length=11)
|
|
account_holder: str | None = Field(None, max_length=200)
|
|
default_tax: str | None = Field(None, max_length=50)
|
|
is_default: bool | None = None
|
|
|
|
|
|
class BankAccountResponse(BaseModel):
|
|
id: str
|
|
bank_name: str
|
|
iban: str
|
|
bic: str | None = None
|
|
account_holder: str | None = None
|
|
default_tax: str | None = None
|
|
is_default: bool
|
|
created_at: str | None = None
|
|
updated_at: str | None = None
|
|
|
|
|
|
class BankAccountListResponse(BaseModel):
|
|
items: list[BankAccountResponse]
|
|
total: int
|