feat(BE): approval_workflow, adjusment project_flocks, common, and migration

This commit is contained in:
Hafizh A. Y
2025-10-21 13:56:30 +07:00
parent 13c04460f0
commit 55b14f5fc7
30 changed files with 1379 additions and 159 deletions
+25
View File
@@ -0,0 +1,25 @@
package approvals
import (
"github.com/go-playground/validator/v10"
"github.com/gofiber/fiber/v2"
"gorm.io/gorm"
commonRepo "gitlab.com/mbugroup/lti-api.git/internal/common/repository"
commonSvc "gitlab.com/mbugroup/lti-api.git/internal/common/service"
rUser "gitlab.com/mbugroup/lti-api.git/internal/modules/users/repositories"
sUser "gitlab.com/mbugroup/lti-api.git/internal/modules/users/services"
)
type ApprovalModule struct{}
func (ApprovalModule) RegisterRoutes(router fiber.Router, db *gorm.DB, validate *validator.Validate) {
approvalRepo := commonRepo.NewApprovalRepository(db)
userRepo := rUser.NewUserRepository(db)
approvalService := commonSvc.NewApprovalService(approvalRepo)
userService := sUser.NewUserService(userRepo, validate)
ApprovalRoutes(router, userService, approvalService)
}