using System.Collections.Generic;
using System.Threading.Tasks;
using GxPress.Common.Page;
using GxPress.Entity;
using GxPress.Request.Admin.Article;
using GxPress.Request.Article;
using GxPress.Result.Article;
using Datory;

namespace GxPress.Repository.Interface
{
    public interface IArticleRepository : IRepository
    {
        Task<bool> ExistsAsync(int id);

        Task<PagedList<ArticleResult>> GetListAsync(string keyword, PageParameter parameter);

        Task<PagedList<ArticleResult>> GetUserListAsync(ArticleSearchRequest request, IEnumerable<BlacklistArticle> blacklistArticles);
        Task<Article> GetAsync(int id);
        Task<bool> DeleteAsync(int id);
        Task<bool> CloneArticleAsync(CloneArticleRequest request);

        Task<Article> GetArticleAsync(int id);

        Task<IEnumerable<Article>> GetAllAsync();

        Task<bool> UpdateAsync(Article article);

        Task<int?> MaxAsync(string sort);

        Task<int> InsertAsync(Entity.Article article);
    }
}