Backend: alle Chargen auflisten + Lagerort mehrerer Chargen auf einmal setzen
GET /lots/rows liefert alle Chargen mit Artikel-Infos (Name, Menge, Einheit, Lagerort) fuer eine uebergreifende Chargenliste. POST /lots/bulk-location setzt den Lagerort vieler Chargen in einem Rutsch (reine Ortsangabe, ohne Bewegung). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -450,6 +450,30 @@ class LotUpdate(BaseModel):
|
||||
location_id: str | None = None
|
||||
|
||||
|
||||
class LotRow(BaseModel):
|
||||
"""Eine Charge mit Artikel-Infos – für die übergreifende Chargenliste."""
|
||||
id: int
|
||||
product_id: int
|
||||
product_name: str
|
||||
product_brand: str | None = None
|
||||
quantity: float # in Basiseinheiten
|
||||
base_unit: BaseUnit
|
||||
package_size: float | None = None
|
||||
package_label: str | None = None
|
||||
unit_name: str = ""
|
||||
unit_factor: float = 1.0
|
||||
best_before: date | None = None
|
||||
best_before_precision: DatePrecision = DatePrecision.day
|
||||
location_id: str | None = None
|
||||
created_at: datetime
|
||||
|
||||
|
||||
class BulkLotLocation(BaseModel):
|
||||
"""Lagerort für mehrere Chargen auf einmal setzen (oder leeren)."""
|
||||
lot_ids: list[int]
|
||||
location_id: str | None = None
|
||||
|
||||
|
||||
class CheckInResponse(BaseModel):
|
||||
lot: LotOut
|
||||
product_stock: float
|
||||
|
||||
Reference in New Issue
Block a user