package suppliers

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

	rSupplier "gitlab.com/mbugroup/lti-api.git/internal/modules/master/suppliers/repositories"
	sSupplier "gitlab.com/mbugroup/lti-api.git/internal/modules/master/suppliers/services"

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

type SupplierModule struct{}

func (SupplierModule) RegisterRoutes(router fiber.Router, db *gorm.DB, validate *validator.Validate) {
	supplierRepo := rSupplier.NewSupplierRepository(db)
	userRepo := rUser.NewUserRepository(db)

	supplierService := sSupplier.NewSupplierService(supplierRepo, validate)
	userService := sUser.NewUserService(userRepo, validate)

	SupplierRoutes(router, userService, supplierService)
}
