Feat(BE-36,37,38,39): finish master data management api

This commit is contained in:
Hafizh A. Y
2025-10-03 21:04:21 +07:00
parent e8905be856
commit 2d49ffe4cd
103 changed files with 6974 additions and 117 deletions
@@ -0,0 +1,26 @@
package service
import (
repository "gitlab.com/mbugroup/lti-api.git/internal/modules/constants/repositories"
"github.com/go-playground/validator/v10"
"github.com/gofiber/fiber/v2"
)
type ConstantService interface {
GetAll(ctx *fiber.Ctx) (map[string]interface{}, error)
}
type constantService struct {
Repository repository.ConstantRepository
}
func NewConstantService(repo repository.ConstantRepository, validate *validator.Validate) ConstantService {
return &constantService{
Repository: repo,
}
}
func (s constantService) GetAll(c *fiber.Ctx) (map[string]interface{}, error) {
return s.Repository.GetConstants(), nil
}