package production

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

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

	chickins "gitlab.com/mbugroup/lti-api.git/internal/modules/production/chickins"
	projectFlockKandangs "gitlab.com/mbugroup/lti-api.git/internal/modules/production/project-flock-kandangs"
	projectflocks "gitlab.com/mbugroup/lti-api.git/internal/modules/production/project_flocks"
	recordings "gitlab.com/mbugroup/lti-api.git/internal/modules/production/recordings"
	transferLayings "gitlab.com/mbugroup/lti-api.git/internal/modules/production/transfer_layings"
	uniformitys "gitlab.com/mbugroup/lti-api.git/internal/modules/production/uniformities"
	// MODULE IMPORTS
)

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

	allModules := []modules.Module{
		projectflocks.ProjectflockModule{},
		recordings.RecordingModule{},
		chickins.ChickinModule{},
		transferLayings.TransferLayingModule{},
		projectFlockKandangs.ProjectFlockKandangModule{},
		uniformitys.UniformityModule{},
		// MODULE REGISTRY
	}

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