Source code for app.schemas.job

from typing import Optional

from pydantic import BaseModel


# Shared properties
[docs]class JobBase(BaseModel): name: Optional[str] = None output: Optional[str] = None
# Properties to receive on item creation
[docs]class JobCreate(JobBase): pass
# Properties to receive on item update
[docs]class JobUpdate(JobBase): pass
# Properties shared by models stored in DB
[docs]class JobInDBBase(JobBase): id: int name: str owner_id: int
[docs] class Config: orm_mode = True
# Properties to return to client
[docs]class Job(JobInDBBase): pass
# Properties properties stored in DB
[docs]class JobInDB(JobInDBBase): pass

Last update: Mar 10, 2024