1fedd683e0
Stand: agent-06 (Audit-Log), agent-05 (Krankmeldung), agent-07 Phase 1 (Personalnummer), Busylight-Pull-Integration, TOTP/2FA, Abwesenheiten, Zeiterfassung, Kiosk-Grundgerüst. Migrations 0001–0023 deployed auf 192.168.1.137 + .164. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
35 lines
966 B
Python
35 lines
966 B
Python
import uuid
|
||
from pydantic import BaseModel, Field
|
||
|
||
|
||
class SmtpConfigOut(BaseModel):
|
||
model_config = {"from_attributes": True}
|
||
|
||
id: uuid.UUID
|
||
company_id: uuid.UUID
|
||
host: str
|
||
port: int
|
||
use_tls: bool
|
||
use_starttls: bool
|
||
username: str | None
|
||
from_email: str
|
||
from_name: str
|
||
is_enabled: bool
|
||
# password_encrypted wird nie zurückgegeben
|
||
|
||
|
||
class SmtpConfigSave(BaseModel):
|
||
host: str = Field(min_length=1, max_length=255)
|
||
port: int = Field(default=587, ge=1, le=65535)
|
||
use_tls: bool = False
|
||
use_starttls: bool = True
|
||
username: str | None = Field(None, max_length=255)
|
||
password: str | None = None # Klartext – wird serverseitig verschlüsselt
|
||
from_email: str = Field(min_length=5, max_length=255)
|
||
from_name: str = Field(default="TimeMaster", min_length=1, max_length=255)
|
||
is_enabled: bool = True
|
||
|
||
|
||
class SmtpTestRequest(BaseModel):
|
||
to: str = Field(min_length=5, max_length=255)
|