price-builder-backend/schemas/schemas.py

23 lines
371 B
Python
Raw Permalink Normal View History

2024-10-13 16:38:23 +04:00
from pydantic import BaseModel
class LaptopCreate(BaseModel):
processor: str
ram: int
os: str
ssd: int
display: float
class LaptopResponse(BaseModel):
id: int
processor: str
ram: int
os: str
ssd: int
display: float
class Config:
orm_mode = True
class PredictPriceResponse(BaseModel):
predicted_price: float