package service

import (
	"context"
	"go-server/internal/models"
	"go-server/internal/repository"
)

type CategoryService struct {
	categoryRepo *repository.CategoryRepository
}

func NewCategoryService(categoryRepo *repository.CategoryRepository) *CategoryService {
	return &CategoryService{categoryRepo: categoryRepo}
}

func (s *CategoryService) GetAll(ctx context.Context) ([]models.Category, error) {
	return s.categoryRepo.GetAll(ctx)
}
