feat: add full/empty weight fields to Product and last_weighed_at to ProductInventory

Adds full_weight_g and empty_weight_g to ProductBase (inherited by Product
and response models) so per-product package weight specs are captured.
Adds last_weighed_at to ProductInventory to record when a package was last
weighed. Wires up all fields through API schemas, frontend types, forms, and
the product detail page (add/edit/display).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Piotr Oleszczyk 2026-02-27 16:35:08 +01:00
parent 2b73dc63ac
commit 43fcba4de6
8 changed files with 255 additions and 16 deletions

View file

@ -101,6 +101,7 @@ class InventoryCreate(SQLModel):
finished_at: Optional[date] = None
expiry_date: Optional[date] = None
current_weight_g: Optional[float] = None
last_weighed_at: Optional[date] = None
notes: Optional[str] = None
@ -110,6 +111,7 @@ class InventoryUpdate(SQLModel):
finished_at: Optional[date] = None
expiry_date: Optional[date] = None
current_weight_g: Optional[float] = None
last_weighed_at: Optional[date] = None
notes: Optional[str] = None