Files
SIG-CM/src/SIGCM.Domain/Interfaces/ICategoryRepository.cs

18 lines
680 B
C#
Raw Normal View History

using SIGCM.Domain.Entities;
2025-12-23 15:12:57 -03:00
namespace SIGCM.Domain.Interfaces;
public interface ICategoryRepository
{
Task<IEnumerable<Category>> GetAllAsync();
Task<Category?> GetByIdAsync(int id);
Task<int> AddAsync(Category category);
Task UpdateAsync(Category category);
Task DeleteAsync(int id);
Task<IEnumerable<Category>> GetSubCategoriesAsync(int parentId);
Task<IEnumerable<Operation>> GetOperationsAsync(int categoryId);
Task AddOperationAsync(int categoryId, int operationId);
Task RemoveOperationAsync(int categoryId, int operationId);
2025-12-23 15:12:57 -03:00
Task MergeCategoriesAsync(int sourceId, int targetId);
Task<bool> HasChildrenAsync(int categoryId);
}