from pydantic import BaseModel class DeviceBase(BaseModel): pass class DeviceCreate(DeviceBase): id: str class DeviceUpdate(DeviceBase): pass class DeviceInDBBase(DeviceBase): id: str class Config: orm_mode = True class Device(DeviceInDBBase): pass class DeviceInDB(DeviceInDBBase): pass