diff options
| author | alex <[email protected]> | 2026-07-17 18:16:35 +0200 |
|---|---|---|
| committer | alex <[email protected]> | 2026-07-17 18:16:35 +0200 |
| commit | 8e796c9cfcd65f6225a6ae3ec2a4419f265b0ebc (patch) | |
| tree | 1bf90385144be2e9f350c31da553b1ac306ee60b /inventory-service/app/api/v1/endpoints/stock_movements.py | |
| parent | 5f6918db393ed78dd8f038e9e5f1ea85f811dc52 (diff) | |
| download | order-inventory-system-main.tar.xz order-inventory-system-main.zip | |
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 |
