package fcrs

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

	rFcr "gitlab.com/mbugroup/lti-api.git/internal/modules/master/fcrs/repositories"
	sFcr "gitlab.com/mbugroup/lti-api.git/internal/modules/master/fcrs/services"

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

type FcrModule struct{}

func (FcrModule) RegisterRoutes(router fiber.Router, db *gorm.DB, validate *validator.Validate) {
	fcrRepo := rFcr.NewFcrRepository(db)
	userRepo := rUser.NewUserRepository(db)

	fcrService := sFcr.NewFcrService(fcrRepo, validate)
	userService := sUser.NewUserService(userRepo, validate)

	FcrRoutes(router, userService, fcrService)
}
