add tysc handlers to kontor-gin

This commit is contained in:
2026-09-30 04:12:03 +02:00
parent c848758821
commit f912dcb670
100 changed files with 2420 additions and 1064 deletions
+29
View File
@@ -0,0 +1,29 @@
package handlers
import (
"kontor-api-gin/internal/repository"
"kontor-api-gin/internal/service"
"gorm.io/gorm"
)
type TyscHandler struct {
SportHandler *SportHandler
PlayerHandler *PlayerHandler
TeamHandler *TeamHandler
PositionHandler *PositionHandler
// RoosterHandler *RoosterHandler
// VendorHandler *VendorHandler
// CardSetHandler *CardSetHandler
// CardHandler *CardHandler
}
func NewTyscHandler(db *gorm.DB) *TyscHandler {
handlerMap := &TyscHandler{
SportHandler: &SportHandler{Service: service.NewSportService(repository.NewSportRepository(db))},
PlayerHandler: &PlayerHandler{Service: service.NewPlayerService(repository.NewPlayerRepository(db))},
TeamHandler: &TeamHandler{Service: service.NewTeamService(repository.NewTeamRepository(db))},
PositionHandler: &PositionHandler{Service: service.NewPositionService(repository.NewPositionRepository(db))},
}
return handlerMap
}