Handling of total amount in shopping events

This commit is contained in:
2025-05-26 08:43:14 +02:00
parent 8b2e4408fc
commit 19a410d553
3 changed files with 74 additions and 15 deletions

View File

@@ -53,7 +53,7 @@ class Shop(ShopBase):
class GroceryInEvent(BaseModel):
grocery_id: int
amount: float = Field(..., gt=0)
price: float = Field(..., gt=0) # Price at the time of this shopping event
price: float = Field(..., ge=0) # Price at the time of this shopping event (allow free items)
class GroceryWithEventData(BaseModel):
id: int