Newsbot.Collector/Newsbot.Collector.Domain/Interfaces/ISourcesRepository.cs

21 lines
831 B
C#

using Newsbot.Collector.Domain.Entities;
using Newsbot.Collector.Domain.Models;
namespace Newsbot.Collector.Domain.Interfaces;
public interface ISourcesRepository
{
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);
public int Disable(Guid id);
public int Enable(Guid id);
public void Delete(Guid id);
public int UpdateYoutubeId(Guid id, string youtubeId);
}