55 lines
943 B
Python

from pydantic import BaseModel
from typing import Optional
class LaptopCreate(BaseModel):
brand: str
processor: str
ram: int
os: str
ssd: int
display: float
gpu: str
weight: float
battery_size: int
release_year: int
display_type: str
class TVCreate(BaseModel):
display: str
tuners: str
features: str
os: str
power_of_volume: str
screen_sizes: int
color: str
class LaptopResponse(BaseModel):
id: int
brand: str
processor: str
ram: int
os: str
ssd: int
display: float
gpu: str
weight: float
battery_size: int
release_year: int
display_type: str
class Config:
orm_mode = True
class TVResponse(BaseModel):
id: int
display: str
tuners: str
features: str
os: str
power_of_volume: str
screen_sizes: int
color: str
class PredictPriceResponse(BaseModel):
predicted_price: float