package uoms

import (
	"github.com/go-playground/validator/v10"
	"github.com/gofiber/fiber/v2"
	"gorm.io/gorm"

	rUom "gitlab.com/mbugroup/lti-api.git/internal/modules/master/uoms/repositories"
	sUom "gitlab.com/mbugroup/lti-api.git/internal/modules/master/uoms/services"

	rUser "gitlab.com/mbugroup/lti-api.git/internal/modules/users/repositories"
	sUser "gitlab.com/mbugroup/lti-api.git/internal/modules/users/services"
)

type UomModule struct{}

func (UomModule) RegisterRoutes(router fiber.Router, db *gorm.DB, validate *validator.Validate) {
	uomRepo := rUom.NewUomRepository(db)
	userRepo := rUser.NewUserRepository(db)

	uomService := sUom.NewUomService(uomRepo, validate)
	userService := sUser.NewUserService(userRepo, validate)

	UomRoutes(router, userService, uomService)
}
