Feat(BE-127): create migration for transfer to laying and inisiate module

This commit is contained in:
aguhh18
2025-10-30 09:06:21 +07:00
parent a390d1d23a
commit 31bb28f7da
13 changed files with 532 additions and 1 deletions
@@ -0,0 +1,26 @@
package transfer_layings
import (
"github.com/go-playground/validator/v10"
"github.com/gofiber/fiber/v2"
"gorm.io/gorm"
rTransferLaying "gitlab.com/mbugroup/lti-api.git/internal/modules/production/transfer_layings/repositories"
sTransferLaying "gitlab.com/mbugroup/lti-api.git/internal/modules/production/transfer_layings/services"
rUser "gitlab.com/mbugroup/lti-api.git/internal/modules/users/repositories"
sUser "gitlab.com/mbugroup/lti-api.git/internal/modules/users/services"
)
type TransferLayingModule struct{}
func (TransferLayingModule) RegisterRoutes(router fiber.Router, db *gorm.DB, validate *validator.Validate) {
transferLayingRepo := rTransferLaying.NewTransferLayingRepository(db)
userRepo := rUser.NewUserRepository(db)
transferLayingService := sTransferLaying.NewTransferLayingService(transferLayingRepo, validate)
userService := sUser.NewUserService(userRepo, validate)
TransferLayingRoutes(router, userService, transferLayingService)
}