price-builder-backend/schemas.py
2024-10-13 16:40:44 +04:00

20 lines
322 B
Python

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:
from_attributes = True