Files
timemaster/backend/app/schemas/smtp.py
T
sysops 1fedd683e0 Initial commit – TimeMaster Zeiterfassung & HR-Tool
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>
2026-05-23 20:03:27 +02:00

35 lines
966 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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)