49 lines
835 B
Python
Raw Permalink Normal View History

2024-10-13 16:38:23 +04:00
from pydantic import BaseModel
from typing import Optional
2024-10-13 16:38:23 +04:00
class LaptopCreate(BaseModel):
processor: str
ram: int
os: str
ssd: int
display_size: float
resolution: str
matrix_type: str
gpu: str
2024-10-13 16:38:23 +04:00
2024-12-02 21:27:11 +04:00
class TVCreate(BaseModel):
display: str
tuners: str
features: str
os: str
power_of_volume: str
2024-12-04 00:26:49 +04:00
screen_size: int
2024-12-02 21:27:11 +04:00
color: str
2024-10-13 16:38:23 +04:00
class LaptopResponse(BaseModel):
id: int
processor: str
ram: int
os: str
ssd: int
display_size: float
resolution: str
matrix_type: str
gpu: str
2024-10-13 16:38:23 +04:00
class Config:
orm_mode = True
2024-12-02 21:27:11 +04:00
class TVResponse(BaseModel):
id: int
display: str
tuners: str
features: str
os: str
power_of_volume: str
2024-12-04 00:26:49 +04:00
screen_size: int
2024-12-02 21:27:11 +04:00
color: str
2024-10-13 16:38:23 +04:00
class PredictPriceResponse(BaseModel):
predicted_price: float