2023-06-23 21:55:56 -07:00
|
|
|
using Newsbot.Collector.Domain.Entities;
|
2023-02-26 09:40:04 -08:00
|
|
|
|
|
|
|
namespace Newsbot.Collector.Domain.Interfaces;
|
|
|
|
|
|
|
|
public interface IDiscordWebHooksRepository
|
|
|
|
{
|
2023-06-23 21:55:56 -07:00
|
|
|
DiscordWebhookEntity New(DiscordWebhookEntity model);
|
2023-02-26 09:40:04 -08:00
|
|
|
|
2023-07-29 09:44:15 -07:00
|
|
|
DiscordWebhookEntity GetById(string userId, Guid id);
|
2023-06-23 21:55:56 -07:00
|
|
|
DiscordWebhookEntity GetById(Guid id);
|
2023-07-29 09:44:15 -07:00
|
|
|
|
2023-06-23 21:55:56 -07:00
|
|
|
DiscordWebhookEntity GetByUrl(string url);
|
2023-02-26 09:40:04 -08:00
|
|
|
|
2023-06-23 21:55:56 -07:00
|
|
|
List<DiscordWebhookEntity> List(int page, int count = 25);
|
2023-07-23 22:58:25 -07:00
|
|
|
List<DiscordWebhookEntity> ListByUserId(string userId, int page);
|
2023-06-23 21:55:56 -07:00
|
|
|
List<DiscordWebhookEntity> ListByServer(string server, int limit);
|
2023-07-29 09:44:15 -07:00
|
|
|
List<DiscordWebhookEntity> ListByServerAndChannel(string userId, string server, string channel, int limit);
|
2023-02-26 09:40:04 -08:00
|
|
|
|
2023-07-29 09:44:15 -07:00
|
|
|
int Disable(string userId, Guid id);
|
|
|
|
int Enable(string userId, Guid id);
|
2023-02-26 09:40:04 -08:00
|
|
|
}
|