price-builder-backend/schemas.py

20 lines
322 B
Python
Raw Normal View History

from pydantic import BaseModel
class LaptopBase(BaseModel):
title: str
price: float
processor: str
ram: int
ssd: int
display: float
class LaptopCreate(LaptopBase):
price: float
class LaptopResponse(LaptopBase):
id: int
price: float
class Config:
2024-10-13 16:40:44 +04:00
from_attributes = True