PIbd-42_Kashin_M.I_FinalQua.../fastapi-app/schemas.py

20 lines
308 B
Python
Raw Normal View History

2024-12-17 00:31:14 +04:00
from typing import Optional
from pydantic import BaseModel, ConfigDict
class STaskAdd(BaseModel):
name: str
description: Optional[str] = None
class STask(STaskAdd):
id: int
model_config = ConfigDict(from_attributes=True)
class STaskId(BaseModel):
ok: bool = True
task_id: int