using Predictalytics.Domain.Entities;

namespace Predictalytics.Domain.Interfaces;

public interface IAlertRepository
{
    Task<IReadOnlyList<Alert>> GetRecentAsync(int count = 50, bool unreadOnly = false, CancellationToken ct = default);
    /// <summary>True if an alert of this type for this trader was created at or after <paramref name="since"/> (dedup).</summary>
    Task<bool> ExistsRecentAsync(Domain.Enums.AlertType type, int traderId, DateTime since, CancellationToken ct = default);
    Task AddAsync(Alert alert, CancellationToken ct = default);
    Task MarkAsReadAsync(int id, CancellationToken ct = default);
    Task<int> GetUnreadCountAsync(CancellationToken ct = default);
}
