mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 21:41:55 +00:00
29 lines
1.2 KiB
Go
29 lines
1.2 KiB
Go
package transfer_layings
|
|
|
|
import (
|
|
"github.com/go-playground/validator/v10"
|
|
"github.com/gofiber/fiber/v2"
|
|
"gorm.io/gorm"
|
|
|
|
rProjectFlock "gitlab.com/mbugroup/lti-api.git/internal/modules/production/project_flocks/repositories"
|
|
rTransferLaying "gitlab.com/mbugroup/lti-api.git/internal/modules/production/transfer_layings/repositories"
|
|
sTransferLaying "gitlab.com/mbugroup/lti-api.git/internal/modules/production/transfer_layings/services"
|
|
|
|
rUser "gitlab.com/mbugroup/lti-api.git/internal/modules/users/repositories"
|
|
sUser "gitlab.com/mbugroup/lti-api.git/internal/modules/users/services"
|
|
)
|
|
|
|
type TransferLayingModule struct{}
|
|
|
|
func (TransferLayingModule) RegisterRoutes(router fiber.Router, db *gorm.DB, validate *validator.Validate) {
|
|
transferLayingRepo := rTransferLaying.NewTransferLayingRepository(db)
|
|
userRepo := rUser.NewUserRepository(db)
|
|
projectFlockRepo := rProjectFlock.NewProjectflockRepository(db)
|
|
projectFlockKandangRepo := rProjectFlock.NewProjectFlockKandangRepository(db)
|
|
|
|
transferLayingService := sTransferLaying.NewTransferLayingService(transferLayingRepo, projectFlockRepo, projectFlockKandangRepo, validate)
|
|
userService := sUser.NewUserService(userRepo, validate)
|
|
|
|
TransferLayingRoutes(router, userService, transferLayingService)
|
|
}
|