(BE-58,,59): extend db schema & build stock transfer api

- Extend DB schema for stock transfers
- Build stock transfer API (create,)
This commit is contained in:
aguhh18
2025-10-14 22:16:50 +07:00
parent 5283aed996
commit 9b016dc30a
25 changed files with 897 additions and 0 deletions
@@ -0,0 +1,27 @@
package transfers
import (
// m "gitlab.com/mbugroup/lti-api.git/internal/middleware"
controller "gitlab.com/mbugroup/lti-api.git/internal/modules/inventory/transfers/controllers"
transfer "gitlab.com/mbugroup/lti-api.git/internal/modules/inventory/transfers/services"
user "gitlab.com/mbugroup/lti-api.git/internal/modules/users/services"
"github.com/gofiber/fiber/v2"
)
func TransferRoutes(v1 fiber.Router, u user.UserService, s transfer.TransferService) {
ctrl := controller.NewTransferController(s)
route := v1.Group("/transfers")
// route.Get("/", m.Auth(u), ctrl.GetAll)
// route.Post("/", m.Auth(u), ctrl.CreateOne)
// route.Get("/:id", m.Auth(u), ctrl.GetOne)
// route.Patch("/:id", m.Auth(u), ctrl.UpdateOne)
// route.Delete("/:id", m.Auth(u), ctrl.DeleteOne)
route.Get("/", ctrl.GetAll)
route.Post("/", ctrl.CreateOne)
route.Get("/:id", ctrl.GetOne)
}