2023-02-19 21:39:03 -08:00
|
|
|
using Newsbot.Collector.Domain.Models;
|
|
|
|
|
|
|
|
namespace Newsbot.Collector.Domain.Interfaces;
|
|
|
|
|
|
|
|
public interface ISourcesRepository
|
|
|
|
{
|
|
|
|
public SourceModel New(SourceModel model);
|
|
|
|
public SourceModel GetByID(Guid ID);
|
|
|
|
public SourceModel GetByID(string ID);
|
|
|
|
public SourceModel GetByName(string name);
|
2023-03-11 10:43:06 -08:00
|
|
|
public SourceModel GetByNameAndType(string name, string type);
|
2023-03-31 22:49:39 -07:00
|
|
|
SourceModel GetByUrl(string url);
|
2023-02-26 09:40:04 -08:00
|
|
|
public List<SourceModel> List(int page, int count);
|
2023-02-19 21:39:03 -08:00
|
|
|
public List<SourceModel> ListBySource(string source, int limit);
|
|
|
|
public List<SourceModel> ListByType(string type, int limit = 25);
|
2023-03-31 22:49:39 -07:00
|
|
|
public int Disable(Guid id);
|
|
|
|
public int Enable(Guid id);
|
2023-04-10 22:59:13 -07:00
|
|
|
public void Delete(Guid id);
|
2023-03-31 22:49:39 -07:00
|
|
|
public int UpdateYoutubeId(Guid id, string youtubeId);
|
2023-02-19 21:39:03 -08:00
|
|
|
}
|