package banks

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

	rBank "gitlab.com/mbugroup/lti-api.git/internal/modules/master/banks/repositories"
	sBank "gitlab.com/mbugroup/lti-api.git/internal/modules/master/banks/services"

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

type BankModule struct{}

func (BankModule) RegisterRoutes(router fiber.Router, db *gorm.DB, validate *validator.Validate) {
	bankRepo := rBank.NewBankRepository(db)
	userRepo := rUser.NewUserRepository(db)

	bankService := sBank.NewBankService(bankRepo, validate)
	userService := sUser.NewUserService(userRepo, validate)

	BankRoutes(router, userService, bankService)
}
