mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
91b320d489
- Extend DB schema with product_warehouses and stock_logs tables - Implement stock adjustment API (increase/decrease operations) - Add comprehensive validation for all adjustment operations - Implement audit log system for each adjustment with history tracking - Include transaction handling, DTOs, seeders, and proper error handling - Add adjustment history API with pagination and filtering TODO: Integration testing pending
22 lines
763 B
Go
22 lines
763 B
Go
package adjustments
|
|
|
|
import (
|
|
// m "gitlab.com/mbugroup/lti-api.git/internal/middleware"
|
|
controller "gitlab.com/mbugroup/lti-api.git/internal/modules/inventory/adjustments/controllers"
|
|
adjustment "gitlab.com/mbugroup/lti-api.git/internal/modules/inventory/adjustments/services"
|
|
user "gitlab.com/mbugroup/lti-api.git/internal/modules/users/services"
|
|
|
|
"github.com/gofiber/fiber/v2"
|
|
)
|
|
|
|
func AdjustmentRoutes(v1 fiber.Router, u user.UserService, s adjustment.AdjustmentService) {
|
|
ctrl := controller.NewAdjustmentController(s)
|
|
|
|
route := v1.Group("/adjustments")
|
|
|
|
// Standard CRUD routes following master data pattern
|
|
route.Get("/", ctrl.AdjustmentHistory) // Get all with pagination and filters
|
|
route.Post("/", ctrl.Adjustment) // Create adjustment
|
|
|
|
}
|