Add app/schemas/stock_movement.py

This commit is contained in:
2026-04-11 03:58:37 +00:00
parent a040a9cc7f
commit 5ada145692

View File

@@ -0,0 +1,29 @@
from datetime import datetime
from pydantic import BaseModel
class StockMoveRequest(BaseModel):
product_id: str
type: str # IN, OUT, ADJUST
quantity: int
reason: str | None = None
class StockMovementResponse(BaseModel):
id: str
product_id: str
type: str
quantity: int
reason: str | None
created_at: datetime
class Config:
from_attributes = True
class StockSummary(BaseModel):
product_id: str
product_name: str
current_stock: int
min_stock: int
is_low_stock: bool