mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-23 10:49:31 +00:00
use FilterSchema for club sales.
This commit is contained in:
1 parent
433fea1855
commit
e00a64252e
4 files changed
+32
-26
No files matched your search
@@ -1,3 +1,4 @@
|
||||
from datetime import datetime
|
||||
from typing import Annotated, Self
|
||||
|
||||
from annotated_types import MinLen
|
||||
@@ -100,3 +101,10 @@ class ProductFilterSchema(FilterSchema):
|
||||
product_type: set[int] | None = Field(None, q="product_type__in")
|
||||
club: set[int] | None = Field(None, q="club__in")
|
||||
counter: set[int] | None = Field(None, q="counters__in")
|
||||
|
||||
|
||||
class SaleFilterSchema(FilterSchema):
|
||||
before: datetime | None = Field(None, q="date__lt")
|
||||
after: datetime | None = Field(None, q="date__gt")
|
||||
counters: set[int] | None = Field(None, q="counter__in")
|
||||
products: set[int] | None = Field(None, q="product__in")
|
||||
Reference in new issue
Block a user