Newsbot.Collector/Newsbot.Collector.Domain/Interfaces/IDiscordNotificationRepository.cs

28 lines
1.1 KiB
C#

using Newsbot.Collector.Domain.Entities;
using Newsbot.Collector.Domain.Models;
namespace Newsbot.Collector.Domain.Interfaces;
public interface IDiscordNotificationRepository
{
DiscordNotificationEntity New(DiscordNotificationEntity model);
List<DiscordNotificationEntity> List(string userId, int page = 0, int count = 25);
List<DiscordNotificationEntity> ListBySourceId(string userId, Guid id, int page = 0, int count = 25);
/// <summary>
/// This will collect all the records based on the SourceId.
/// Background jobs can use this but user facing calls need to define UserId
/// </summary>
/// <param name="id"></param>
/// <param name="page"></param>
/// <param name="count"></param>
/// <returns></returns>
List<DiscordNotificationEntity> ListBySourceId(Guid id, int page = 0, int count = 25);
List<DiscordNotificationEntity> ListByWebhook(string userId, Guid id, int page = 0, int count = 25);
DiscordNotificationEntity GetById(string userId, Guid id);
DiscordNotificationEntity GetByWebhookAndSource(string userId, Guid webhookId, Guid sourceId);
int Delete(string userId, Guid id);
}