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>
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
import uuid
|
||||
from typing import Literal
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
|
||||
PersonnelNumberModeT = Literal["manual", "auto"]
|
||||
|
||||
|
||||
class CompanyOut(BaseModel):
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
id: uuid.UUID
|
||||
name: str
|
||||
slug: str
|
||||
plan: str
|
||||
logo_url: str | None
|
||||
country: str
|
||||
state: str | None
|
||||
settings: dict
|
||||
personnel_number_required: bool = False
|
||||
personnel_number_mode: PersonnelNumberModeT = "manual"
|
||||
personnel_number_next: int = 1
|
||||
|
||||
|
||||
class CompanyUpdate(BaseModel):
|
||||
name: str | None = Field(None, min_length=2, max_length=255)
|
||||
state: str | None = Field(None, max_length=10)
|
||||
settings: dict | None = None
|
||||
personnel_number_required: bool | None = None
|
||||
personnel_number_mode: PersonnelNumberModeT | None = None
|
||||
personnel_number_next: int | None = Field(None, ge=1)
|
||||
|
||||
|
||||
class DepartmentOut(BaseModel):
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
id: uuid.UUID
|
||||
company_id: uuid.UUID
|
||||
name: str
|
||||
manager_id: uuid.UUID | None
|
||||
|
||||
|
||||
class DepartmentCreate(BaseModel):
|
||||
name: str = Field(min_length=1, max_length=255)
|
||||
manager_id: uuid.UUID | None = None
|
||||
|
||||
|
||||
class DepartmentUpdate(BaseModel):
|
||||
name: str | None = Field(None, min_length=1, max_length=255)
|
||||
manager_id: uuid.UUID | None = None
|
||||
Reference in New Issue
Block a user