ec81940178
- 0.7: UI-Design-Richtlinien (docs/ui-design-guidelines.md, 535 lines) - 0.8: Theme-Customization Backend (4 theme fields, migration 0023) - 0.9: Theme-Customization Frontend (SettingsTheme.tsx, themeStore.ts, live preview) - 0.10: RBAC-Audit (4 plugins secured, 53 routes with require_permission) - 0.11: LiteLLM-Cleanup (llm_client.py migrated from httpx to litellm) - 0.12: KI-Agent-Framework docs (plugin-development-guide.md, agent_capabilities field) - 0.13: Heartbeat configurable (ProactiveSettings, migration 0024, frontend UI) - 0.14: Unified Search Field-Level RBAC (resolve_permissions + filter_fields_by_permission) - 0.15: Undo/History-System (EntityHistory model, service, routes, migration 0025, HistoryViewer) - 0.16: Storage Backend (LocalStorage + S3Storage, DMS/attachments/mail updated) - 0.17: Import/Export unified Contact fields (firstname, surname, email_1, phone_1) - 0.18: .gitignore & Config-Cleanup (webui→frontend, python-jose removed, .env untracked) - 0.19: Mail-Salt Security-Fix (per-account random salt, migration 0026) - 0.20: AGPL replaced (PyMuPDF→pypdf, OnlyOffice→Collabora, LICENSE + THIRD_PARTY_LICENSES.md)
61 lines
2.2 KiB
Python
61 lines
2.2 KiB
Python
"""System settings schemas — read, upsert."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class SystemSettingsUpsert(BaseModel):
|
|
company_name: str = Field(..., min_length=1, max_length=200)
|
|
company_legal_form: str | None = Field(None, max_length=50)
|
|
company_street: str = Field(..., min_length=1, max_length=255)
|
|
company_city: str = Field(..., min_length=1, max_length=100)
|
|
company_zip: str = Field(..., min_length=1, max_length=20)
|
|
company_country: str = Field(..., min_length=2, max_length=2)
|
|
tax_number: str | None = Field(None, max_length=50)
|
|
vat_id: str | None = Field(None, max_length=50)
|
|
iban: str | None = Field(None, max_length=34)
|
|
bic: str | None = Field(None, max_length=11)
|
|
bank_name: str | None = Field(None, max_length=100)
|
|
ceo: str | None = Field(None, max_length=100)
|
|
trade_register: str | None = Field(None, max_length=100)
|
|
default_currency_id: str | None = None
|
|
default_tax_id: str | None = None
|
|
invoice_prefix: str = Field("RE-", max_length=20)
|
|
quote_prefix: str = Field("AN-", max_length=20)
|
|
payment_terms_days: int = Field(14, ge=0, le=365)
|
|
# Theme customization
|
|
theme_primary_color: str = Field("#2563eb", max_length=20)
|
|
theme_accent_color: str = Field("#d946ef", max_length=20)
|
|
theme_font_family: str = Field("Inter", max_length=100)
|
|
theme_border_radius: str = Field("0.5rem", max_length=20)
|
|
|
|
|
|
class SystemSettingsResponse(BaseModel):
|
|
id: str
|
|
company_name: str
|
|
company_legal_form: str | None = None
|
|
company_street: str
|
|
company_city: str
|
|
company_zip: str
|
|
company_country: str
|
|
tax_number: str | None = None
|
|
vat_id: str | None = None
|
|
iban: str | None = None
|
|
bic: str | None = None
|
|
bank_name: str | None = None
|
|
ceo: str | None = None
|
|
trade_register: str | None = None
|
|
default_currency_id: str | None = None
|
|
default_tax_id: str | None = None
|
|
invoice_prefix: str = "RE-"
|
|
quote_prefix: str = "AN-"
|
|
payment_terms_days: int = 14
|
|
# Theme customization
|
|
theme_primary_color: str = "#2563eb"
|
|
theme_accent_color: str = "#d946ef"
|
|
theme_font_family: str = "Inter"
|
|
theme_border_radius: str = "0.5rem"
|
|
created_at: str | None = None
|
|
updated_at: str | None = None
|