2023-06-23 23:01:40 -07:00
|
|
|
using Newsbot.Collector.Domain.Entities;
|
2023-02-19 21:39:03 -08:00
|
|
|
using Newsbot.Collector.Domain.Models;
|
|
|
|
|
|
|
|
namespace Newsbot.Collector.Domain.Interfaces;
|
|
|
|
|
|
|
|
public interface ISourcesRepository
|
|
|
|
{
|
2023-06-23 23:01:40 -07:00
|
|
|
public SourceEntity New(SourceEntity model);
|
|
|
|
public SourceEntity GetById(Guid id);
|
|
|
|
public SourceEntity GetById(string id);
|
|
|
|
public SourceEntity GetByName(string name);
|
|
|
|
public SourceEntity GetByNameAndType(string name, string type);
|
|
|
|
SourceEntity GetByUrl(string url);
|
|
|
|
public List<SourceEntity> List(int page, int count);
|
|
|
|
public List<SourceEntity> ListBySource(string source,int page, int limit);
|
|
|
|
public List<SourceEntity> ListByType(string type,int page, 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
|
|
|
}
|