feat(Model): Added new table model
This commit is contained in:
1 parent
fdcc935a18
commit
bd19100eb4
1 file changed
+22
@@ -0,0 +1,22 @@
|
|||||||
|
from pydantic import BaseModel
|
||||||
|
from typing import Optional
|
||||||
|
|
||||||
|
|
||||||
|
class ProductFilter(BaseModel):
|
||||||
|
id: int
|
||||||
|
product_id: int
|
||||||
|
filter_key: str
|
||||||
|
value: str
|
||||||
|
|
||||||
|
class Config:
|
||||||
|
from_attributes = True
|
||||||
|
|
||||||
|
|
||||||
|
class ProductFilterCreate(BaseModel):
|
||||||
|
product_id: int
|
||||||
|
filter_key: str
|
||||||
|
value: str
|
||||||
|
|
||||||
|
|
||||||
|
class ProductFilterUpdate(BaseModel):
|
||||||
|
value: Optional[str] = None
|
||||||
Reference in new issue
Block a user