Feat[BE]: refactored Chickin createone and implement approvals and add more needed constant

This commit is contained in:
aguhh18
2025-10-31 15:33:31 +07:00
parent c91d84b652
commit 219a6a39ed
17 changed files with 485 additions and 415 deletions
@@ -5,6 +5,7 @@ import (
"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"
@@ -17,10 +18,11 @@ 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, validate)
transferLayingService := sTransferLaying.NewTransferLayingService(transferLayingRepo, projectFlockRepo, projectFlockKandangRepo, validate)
userService := sUser.NewUserService(userRepo, validate)
TransferLayingRoutes(router, userService, transferLayingService)
}