Add per-product flag to skip Date and Next Control

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-14 12:06:12 +03:30
parent 6bbb8568c6
commit f9c6f3bc14
14 changed files with 145 additions and 27 deletions

View File

@@ -8,19 +8,21 @@ class ProductOut(Schema):
code: str
description: str
default_net_weight: float
requires_dates: bool
class ProductIn(Schema):
code: str
description: str
default_net_weight: float = 5.0
requires_dates: bool = True
class OrderIn(Schema):
product_id: int
batch_number: str
production_date: date
next_control_date: date
production_date: Optional[date] = None
next_control_date: Optional[date] = None
total_weight: float
canister_weight: float
canisters_per_box: int
@@ -32,8 +34,8 @@ class OrderOut(Schema):
product_code: str
product_description: str
batch_number: str
production_date: date
next_control_date: date
production_date: Optional[date] = None
next_control_date: Optional[date] = None
total_weight: float
canister_weight: float
canisters_per_box: int