12345678910111213141516171819202122232425262728 |
- 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
|