Newsbot.Collector/Newsbot.Collector.Domain/Interfaces/ISourcesRepository.cs
James Tombleson 799668a059
Features/pulling GitHub (#9)
* Still working though it but looking good on releases

* added the example discord message test

* updated source repo to return an existing record before a new is added

* updated the sources repo interface

* updated new routes to check for existing records

* starting to migrate the seed out of the sql migrations

* A new seed script was made to reload the db from the api

* Docker image works locally

* Adding CI to build docker image

* ... disabled swagger so I can test docker

* Added more to the github job but its not finished.  Isnt pulling sources yet.

* cleaned up formatting

* Controller updates to look for existing records when requesting a new one

* null check cleanup

* namespace fix
2023-03-11 10:43:06 -08:00

18 lines
660 B
C#

using System.Globalization;
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);
public SourceModel GetByNameAndType(string name, string type);
public List<SourceModel> List(int page, int count);
public List<SourceModel> ListBySource(string source, int limit);
public List<SourceModel> ListByType(string type, int limit = 25);
public int Disable(Guid ID);
public int Enable(Guid ID);
}