mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 21:41:55 +00:00
26 lines
933 B
Go
26 lines
933 B
Go
package kandanggroups
|
|
|
|
import (
|
|
"github.com/go-playground/validator/v10"
|
|
"github.com/gofiber/fiber/v2"
|
|
"gorm.io/gorm"
|
|
|
|
rKandangGroup "gitlab.com/mbugroup/lti-api.git/internal/modules/master/kandang-groups/repositories"
|
|
sKandangGroup "gitlab.com/mbugroup/lti-api.git/internal/modules/master/kandang-groups/services"
|
|
|
|
rUser "gitlab.com/mbugroup/lti-api.git/internal/modules/users/repositories"
|
|
sUser "gitlab.com/mbugroup/lti-api.git/internal/modules/users/services"
|
|
)
|
|
|
|
type KandangGroupModule struct{}
|
|
|
|
func (KandangGroupModule) RegisterRoutes(router fiber.Router, db *gorm.DB, validate *validator.Validate) {
|
|
kandangGroupRepo := rKandangGroup.NewKandangGroupRepository(db)
|
|
userRepo := rUser.NewUserRepository(db)
|
|
|
|
kandangGroupService := sKandangGroup.NewKandangGroupService(kandangGroupRepo, validate)
|
|
userService := sUser.NewUserService(userRepo, validate)
|
|
|
|
KandangGroupRoutes(router, userService, kandangGroupService)
|
|
}
|