package app

import (
	"bindbox-game/internal/pkg/logger"
	"bindbox-game/internal/repository/mysql"
	"bindbox-game/internal/repository/mysql/dao"
	guildsvc "bindbox-game/internal/service/guild"
)

type handler struct {
	logger  logger.CustomLogger
	writeDB *dao.Query
	readDB  *dao.Query
	guild   guildsvc.Service
}

func New(logger logger.CustomLogger, db mysql.Repo) *handler {
	return &handler{logger: logger, writeDB: dao.Use(db.GetDbW()), readDB: dao.Use(db.GetDbR()), guild: guildsvc.New(logger, db)}
}
