Backend: Product.updated_at (Zuletzt geaendert)

Neue Spalte updated_at, die bei jeder Stammdaten-Aenderung automatisch nachzieht
(onupdate). Migration legt sie nullable an und setzt Altbestaende auf created_at.
In ProductOut ausgegeben - Basis fuer eine "Zuletzt geaendert"-Spalte im Web.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Scarriffle
2026-07-28 11:12:03 +02:00
parent 9ca7291c68
commit 45031df1f4
4 changed files with 28 additions and 0 deletions

View File

@@ -355,6 +355,7 @@ class ProductOut(BaseModel):
individual: bool = False
bulk: bool = False
created_at: datetime
updated_at: datetime | None = None
# angereichert:
stock: float = 0.0
expired_count: int = 0