diff options
Diffstat (limited to 'inventory-service/app/api/v1/endpoints/stock_movements.py')
| -rw-r--r-- | inventory-service/app/api/v1/endpoints/stock_movements.py | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/inventory-service/app/api/v1/endpoints/stock_movements.py b/inventory-service/app/api/v1/endpoints/stock_movements.py new file mode 100644 index 0000000..f70396f --- /dev/null +++ b/inventory-service/app/api/v1/endpoints/stock_movements.py @@ -0,0 +1,47 @@ +from fastapi import APIRouter, Depends, status +from sqlalchemy.orm import Session +from typing import List + +from app.api import deps +from app.schemas.inventory import StockMovementOut + + +router = APIRouter() + + [email protected]("/", response_model=List[StockMovementOut]) +def list_stock_movements( + skip: int = 0, + limit: int = 100, + db: Session = Depends(deps.get_db), +): + """ + Return a paginated list of all stock movements across all products. + Useful for auditing the full history of reservations and releases. + """ + pass # TODO: implement + + [email protected]("/product/{product_id}", response_model=List[StockMovementOut]) +def list_movements_for_product( + product_id: int, + skip: int = 0, + limit: int = 100, + db: Session = Depends(deps.get_db), +): + """ + Return all stock movements for a specific product. + """ + pass # TODO: implement + + [email protected]("/order/{order_id}", response_model=List[StockMovementOut]) +def list_movements_for_order( + order_id: int, + db: Session = Depends(deps.get_db), +): + """ + Return all stock movements associated with a specific order. + Lets you see exactly what was reserved/released for a given order. + """ + pass # TODO: implement |
