from pydantic import BaseModel, ConfigDict class BerechtigungRead(BaseModel): model_config = ConfigDict(from_attributes=True) id: int schluessel: str beschreibung: str class RolleCreate(BaseModel): name: str beschreibung: str | None = None class RolleUpdate(BaseModel): name: str | None = None beschreibung: str | None = None class RolleRead(BaseModel): model_config = ConfigDict(from_attributes=True) id: int name: str beschreibung: str | None berechtigung_ids: list[int] = []