import uuid from datetime import datetime from decimal import Decimal from pydantic import BaseModel, ConfigDict from app.models.fehlbestand import FehlbestandStatus class FehlbestandRead(BaseModel): model_config = ConfigDict(from_attributes=True) id: uuid.UUID objekt_id: int material_id: int standort_id: int sollmenge: Decimal istmenge: Decimal fehlmenge: Decimal entstanden_am: datetime festgestellt_von: int kontrolle_id: uuid.UUID | None ursache: str | None verantwortlicher_id: int | None status: FehlbestandStatus erledigt_am: datetime | None class NachfuellungCreate(BaseModel): menge: Decimal class NachfuellungRead(BaseModel): model_config = ConfigDict(from_attributes=True) id: uuid.UUID fehlbestand_id: uuid.UUID | None objekt_id: int material_id: int menge: Decimal benutzer_id: int zeitpunkt: datetime class NachfuellungResponse(BaseModel): nachfuellung: NachfuellungRead fehlbestand: FehlbestandRead ueberbestand: Decimal