2024-05-09 17:42:42 +03:00
|
|
|
package app
|
|
|
|
|
|
|
|
import (
|
|
|
|
"gitea.neur0tx.site/Neur0toxine/vegapokerbot/internal/db"
|
2024-05-09 20:48:59 +03:00
|
|
|
"gitea.neur0tx.site/Neur0toxine/vegapokerbot/internal/handler/iface"
|
2024-05-09 17:42:42 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
type DBWrapper struct {
|
|
|
|
r *db.Repositories
|
|
|
|
}
|
|
|
|
|
2024-05-09 20:48:59 +03:00
|
|
|
func (w *DBWrapper) ForUser() iface.UserRepository {
|
2024-05-09 17:42:42 +03:00
|
|
|
return w.r.User
|
|
|
|
}
|
|
|
|
|
2024-05-09 20:48:59 +03:00
|
|
|
func (w *DBWrapper) ForChat() iface.ChatRepository {
|
2024-05-09 17:42:42 +03:00
|
|
|
return w.r.Chat
|
|
|
|
}
|
2024-05-09 20:48:59 +03:00
|
|
|
|
|
|
|
func (w *DBWrapper) ForIntegration() iface.IntegrationRepository {
|
|
|
|
return w.r.Integration
|
|
|
|
}
|