Skip to content

Commit

Permalink
feat: add product filter on price_count (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn authored Jan 11, 2024
1 parent fe14346 commit 3f687d2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions app/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ class ProductBase(ProductCreate):
examples=[15],
default=0,
)
price_count: int = Field(
description="number of prices for this product.", examples=[15], default=0
)
created: datetime.datetime = Field(description="datetime of the creation.")
updated: datetime.datetime | None = Field(
description="datetime of the last update."
)
price_count: int = Field(
description="number of prices for this product.", examples=[15], default=0
)


class LocationCreate(BaseModel):
Expand Down Expand Up @@ -355,6 +355,9 @@ class ProductFilter(Filter):
product_name__like: Optional[str] | None = None
brands__like: Optional[str] | None = None
unique_scans_n__gte: Optional[int] | None = None
price_count: Optional[int] | None = None
price_count__gte: Optional[int] | None = None
price_count__lte: Optional[int] | None = None

order_by: Optional[list[str]] | None = None

Expand Down

0 comments on commit 3f687d2

Please sign in to comment.