mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
49 lines
2.8 KiB
Go
49 lines
2.8 KiB
Go
package closings
|
|
|
|
import (
|
|
"github.com/go-playground/validator/v10"
|
|
"github.com/gofiber/fiber/v2"
|
|
"gorm.io/gorm"
|
|
|
|
commonRepo "gitlab.com/mbugroup/lti-api.git/internal/common/repository"
|
|
commonSvc "gitlab.com/mbugroup/lti-api.git/internal/common/service"
|
|
rClosing "gitlab.com/mbugroup/lti-api.git/internal/modules/closings/repositories"
|
|
sClosing "gitlab.com/mbugroup/lti-api.git/internal/modules/closings/services"
|
|
rExpenseRealization "gitlab.com/mbugroup/lti-api.git/internal/modules/expenses/repositories"
|
|
rMarketings "gitlab.com/mbugroup/lti-api.git/internal/modules/marketing/repositories"
|
|
rProductionStandard "gitlab.com/mbugroup/lti-api.git/internal/modules/master/production-standards/repositories"
|
|
rChickin "gitlab.com/mbugroup/lti-api.git/internal/modules/production/chickins/repositories"
|
|
rProjectFlock "gitlab.com/mbugroup/lti-api.git/internal/modules/production/project_flocks/repositories"
|
|
rRecording "gitlab.com/mbugroup/lti-api.git/internal/modules/production/recordings/repositories"
|
|
rPurchase "gitlab.com/mbugroup/lti-api.git/internal/modules/purchases/repositories"
|
|
|
|
rUser "gitlab.com/mbugroup/lti-api.git/internal/modules/users/repositories"
|
|
sUser "gitlab.com/mbugroup/lti-api.git/internal/modules/users/services"
|
|
)
|
|
|
|
type ClosingModule struct{}
|
|
|
|
func (ClosingModule) RegisterRoutes(router fiber.Router, db *gorm.DB, validate *validator.Validate) {
|
|
closingRepo := rClosing.NewClosingRepository(db)
|
|
userRepo := rUser.NewUserRepository(db)
|
|
projectFlockRepo := rProjectFlock.NewProjectflockRepository(db)
|
|
projectFlockKandangRepo := rProjectFlock.NewProjectFlockKandangRepository(db)
|
|
projectBudgetRepo := rProjectFlock.NewProjectBudgetRepository(db)
|
|
marketingRepo := rMarketings.NewMarketingRepository(db)
|
|
marketingDeliveryProductRepo := rMarketings.NewMarketingDeliveryProductRepository(db)
|
|
expenseRealizationRepo := rExpenseRealization.NewExpenseRealizationRepository(db)
|
|
chickinRepo := rChickin.NewChickinRepository(db)
|
|
recordingRepo := rRecording.NewRecordingRepository(db)
|
|
standardGrowthDetailRepo := rProductionStandard.NewStandardGrowthDetailRepository(db)
|
|
productionStandardDetailRepo := rProductionStandard.NewProductionStandardDetailRepository(db)
|
|
purchaseRepo := rPurchase.NewPurchaseRepository(db)
|
|
approvalRepo := commonRepo.NewApprovalRepository(db)
|
|
approvalService := commonSvc.NewApprovalService(approvalRepo)
|
|
|
|
closingService := sClosing.NewClosingService(closingRepo, projectFlockRepo, marketingRepo, marketingDeliveryProductRepo, approvalService, expenseRealizationRepo, projectBudgetRepo, chickinRepo, purchaseRepo, recordingRepo, standardGrowthDetailRepo, productionStandardDetailRepo, validate)
|
|
sapronakService := sClosing.NewSapronakService(closingRepo, projectFlockKandangRepo, validate)
|
|
userService := sUser.NewUserService(userRepo, validate)
|
|
|
|
ClosingRoutes(router, userService, closingService, sapronakService)
|
|
}
|