package employeess

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

	rEmployees "gitlab.com/mbugroup/lti-api.git/internal/modules/master/employees/repositories"
	sEmployees "gitlab.com/mbugroup/lti-api.git/internal/modules/master/employees/services"

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

type EmployeesModule struct{}

func (EmployeesModule) RegisterRoutes(router fiber.Router, db *gorm.DB, validate *validator.Validate) {
	employeesRepo := rEmployees.NewEmployeesRepository(db)
	userRepo := rUser.NewUserRepository(db)

	employeesService := sEmployees.NewEmployeesService(employeesRepo, validate)
	userService := sUser.NewUserService(userRepo, validate)

	EmployeesRoutes(router, userService, employeesService)
}
