package finance

import (
	"gitlab.com/mbugroup/lti-api.git/internal/modules"

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

	payments "gitlab.com/mbugroup/lti-api.git/internal/modules/finance/payments"
	initials "gitlab.com/mbugroup/lti-api.git/internal/modules/finance/initials"
	injections "gitlab.com/mbugroup/lti-api.git/internal/modules/finance/injections"
	transactions "gitlab.com/mbugroup/lti-api.git/internal/modules/finance/transactions"
	// MODULE IMPORTS
)

func RegisterRoutes(router fiber.Router, db *gorm.DB, validate *validator.Validate) {
	group := router.Group("/finance")

	allModules := []modules.Module{
		payments.PaymentModule{},
		initials.InitialModule{},
		injections.InjectionModule{},
		transactions.TransactionModule{},
		// MODULE REGISTRY
	}

	for _, m := range allModules {
		m.RegisterRoutes(group, db, validate)
	}
}
