Adding arhitecture
This commit is contained in:
parent
f294a3d33d
commit
847bb0694e
0
controllers/controller.py
Normal file
0
controllers/controller.py
Normal file
0
requirements.txt
Normal file
0
requirements.txt
Normal file
19
schemas.py
19
schemas.py
@ -1,19 +0,0 @@
|
|||||||
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:
|
|
||||||
orm_mode = True
|
|
22
schemas/schemas.py
Normal file
22
schemas/schemas.py
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
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
|
0
services/service.py
Normal file
0
services/service.py
Normal file
Loading…
Reference in New Issue
Block a user