This commit is contained in:
2025-08-01 10:33:50 -04:00
parent 82fd1cb2da
commit 9c13118a05
24 changed files with 1160 additions and 38 deletions

View File

@@ -0,0 +1,46 @@
from fastapi import APIRouter, Depends, HTTPException
from datetime import datetime
from sqlalchemy.orm import Session
from sqlalchemy import and_, func
from app.db.database import get_db
from app.services.service_manager import ServiceManager
from app.schemas.inventory_label import InventoryLabelCreate, InventoryLabelGet, InventoryLabelUpdate, InventoryLabelDelete, InventoryLabelResponse
router = APIRouter(prefix="/inventory-labels")
service_manager = ServiceManager()
# create
@router.post("/")
async def create_inventory_label(
inventory_label: InventoryLabelCreate,
db: Session = Depends(get_db)
):
inventory_label_service = service_manager.get_service('inventory_label')
return await inventory_label_service.create_inventory_label(db, inventory_label)
# get
@router.get("/")
async def get_inventory_label(
inventory_label_get: InventoryLabelGet,
db: Session = Depends(get_db)
):
inventory_label_service = service_manager.get_service('inventory_label')
return await inventory_label_service.get_inventory_label(db, inventory_label_get)
# update
@router.post("/{inventory_label_id}")
async def update_inventory_label(
inventory_label_id: int,
inventory_label: InventoryLabelUpdate,
db: Session = Depends(get_db)
):
pass
# delete
@router.delete("/{inventory_label_id}")
async def delete_inventory_label(
inventory_label_id: int,
db: Session = Depends(get_db)
):
pass

View File

@@ -7,6 +7,8 @@ from app.routes.set_label_routes import router as set_label_router
from app.routes.order_routes import router as order_router
from app.routes.manabox_routes import router as manabox_router
from app.routes.inventory_management_routes import router as inventory_management_router
from app.routes.inventory_label_routes import router as inventory_label_router
router = APIRouter(prefix="/api")
# Include set label routes
@@ -21,6 +23,9 @@ router.include_router(manabox_router)
# Include inventory management routes
router.include_router(inventory_management_router)
# Include inventory label routes
router.include_router(inventory_label_router)
# ============================================================================
# Health Check & Root Endpoints
# ============================================================================