feat: Mini-Apps registry, Stammdaten backend persistence, bank accounts

- 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.)
This commit is contained in:
Agent Zero
2026-07-25 02:11:29 +02:00
parent 382f500f39
commit 3e7abd4518
9 changed files with 600 additions and 29 deletions
+2
View File
@@ -1,6 +1,7 @@
"""SQLAlchemy models for LeoCRM."""
from app.models.address import Address
from app.models.bank_account import BankAccount
from app.models.ai_conversation import AIConversation, AIMessage
from app.models.attachment import Attachment
from app.models.audit import AuditLog, DeletionLog
@@ -48,6 +49,7 @@ __all__ = [
"SystemSettings",
"Attachment",
"Address",
"BankAccount",
"Plugin",
"PluginMigration",
"AIConversation",
+30
View File
@@ -0,0 +1,30 @@
"""BankAccount model — multiple bank accounts per tenant."""
from __future__ import annotations
import uuid
from sqlalchemy import Boolean, String
from sqlalchemy.dialects.postgresql import UUID as PGUUID
from sqlalchemy.orm import Mapped, mapped_column
from app.core.db import Base, TenantMixin
class BankAccount(Base, TenantMixin):
"""Bank account entity — multiple accounts per tenant.
is_default: one default bank account per tenant.
"""
__tablename__ = "bank_accounts"
id: Mapped[uuid.UUID] = mapped_column(
PGUUID(as_uuid=True), primary_key=True, default=uuid.uuid4
)
bank_name: Mapped[str] = mapped_column(String(100), nullable=False)
iban: Mapped[str] = mapped_column(String(34), nullable=False)
bic: Mapped[str | None] = mapped_column(String(11), nullable=True)
account_holder: Mapped[str | None] = mapped_column(String(200), nullable=True)
default_tax: Mapped[str | None] = mapped_column(String(50), nullable=True)
is_default: Mapped[bool] = mapped_column(Boolean, nullable=False, default=False)