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

24 lines
661 B
Python
Raw Normal View History

from pydantic import BaseModel
from datetime import datetime
2024-12-17 00:31:14 +04:00
from typing import Optional
# UserCreate: для создания пользователя
class UserCreate(BaseModel):
username: str
password: str
# CSVFileUpload: для загрузки CSV файла
class CSVFileUpload(BaseModel):
file_path: str
# H5ModelCreate: для добавления модели
class H5ModelCreate(BaseModel):
model_path: str
# ModelStatisticsCreate: для сохранения статистики модели
class ModelStatisticsCreate(BaseModel):
model_id: int
accuracy: float
loss: float
created_at: Optional[datetime] = None