using ColaFlow.Modules.IssueManagement.Domain.Entities;
using ColaFlow.Modules.IssueManagement.Domain.Enums;

namespace ColaFlow.Modules.IssueManagement.Domain.Repositories;

/// <summary>
/// Repository interface for Issue aggregate
/// </summary>
public interface IIssueRepository
{
    Task<Issue?> GetByIdAsync(Guid id, CancellationToken cancellationToken = default);
    Task<List<Issue>> GetByProjectIdAsync(Guid projectId, CancellationToken cancellationToken = default);
    Task<List<Issue>> GetByProjectIdAndStatusAsync(Guid projectId, IssueStatus status, CancellationToken cancellationToken = default);
    Task<List<Issue>> GetByAssigneeIdAsync(Guid assigneeId, CancellationToken cancellationToken = default);
    Task AddAsync(Issue issue, CancellationToken cancellationToken = default);
    Task UpdateAsync(Issue issue, CancellationToken cancellationToken = default);
    Task DeleteAsync(Issue issue, CancellationToken cancellationToken = default);
    Task<bool> ExistsAsync(Guid id, CancellationToken cancellationToken = default);
}
