initial commit

This commit is contained in:
2026-05-25 11:52:26 +05:30
commit 0d42ac84e1
53 changed files with 11222 additions and 0 deletions

52
services/utilsService.go Normal file
View File

@@ -0,0 +1,52 @@
package services
import (
"nearle/models"
"nearle/repositories"
)
type UtilsService interface {
GetApptypes(tag string) ([]models.Apptypes, error)
SendNotification(token string, notification models.FcmNotification, data map[string]string) error
GetSubcategories(moduleid int, categoryid int) ([]models.Appsubcategories, error)
GetApplocations(aid int) ([]models.Applocations, error)
GetApplocationConfig(aid int) ([]models.Applocations, error)
GetAppConfig(configID int) (models.Appconfig, error)
GetAppCategory() ([]models.AppCategory, error)
}
type utilsService struct {
repo repositories.UtilsRepository
}
func NewUtilsService(repo repositories.UtilsRepository) UtilsService {
return &utilsService{repo: repo}
}
func (s *utilsService) GetApptypes(tag string) ([]models.Apptypes, error) {
return s.repo.GetApptypes(tag)
}
func (s *utilsService) SendNotification(token string, notification models.FcmNotification, data map[string]string) error {
return s.repo.SendNotification(token, notification, data)
}
func (s *utilsService) GetSubcategories(moduleid int, categoryid int) ([]models.Appsubcategories, error) {
return s.repo.GetSubcategories(moduleid, categoryid)
}
func (s *utilsService) GetApplocations(aid int) ([]models.Applocations, error) {
return s.repo.GetApplocations(aid)
}
func (s *utilsService) GetApplocationConfig(aid int) ([]models.Applocations, error) {
return s.repo.GetApplocationConfig(aid)
}
func (s *utilsService) GetAppConfig(configID int) (models.Appconfig, error) {
return s.repo.GetAppConfig(configID)
}
func (s *utilsService) GetAppCategory() ([]models.AppCategory, error) {
return s.repo.GetAppCategory()
}