using System.Collections.Generic; using System.Threading.Tasks; using JetBrains.Annotations; using Kyoo.Models; namespace Kyoo.Controllers { public interface IRepository { Task Get(long id); Task Get(string slug); Task> Search(string query); Task> GetAll(); Task Create([NotNull] T obj); Task CreateIfNotExists([NotNull] T obj); Task Edit([NotNull] T edited, bool resetOld); Task Delete(T obj); } public interface IShowRepository : IRepository {} public interface ISeasonRepository : IRepository { Season Get(string showSlug, long seasonNumber); } public interface IEpisodeRepository : IRepository { Episode Get(string showSlug, long seasonNumber, long episodeNumber); } public interface ITrackRepository : IRepository {} public interface ILibraryRepository : IRepository {} public interface ICollectionRepository : IRepository {} public interface IGenreRepository : IRepository {} public interface IStudioRepository : IRepository {} public interface IPeopleRepository : IRepository {} public interface IProviderRepository : IRepository {} }