using System.Collections.Generic;
using System.Threading.Tasks;
using Datory;
using GxPress.Result.App.ArticleLabel;

namespace GxPress.Repository.Interface.ArticleLabel
{
    public interface IArticleLabelRepository : IRepository
    {
        Task<int> InsertAsync(Entity.ArticleLabel.ArticleLabel articleLabel);

        Task<Entity.ArticleLabel.ArticleLabel> GetAsync(int id);

        Task<bool> UpdateAsync(Entity.ArticleLabel.ArticleLabel articleLabel);

        Task<bool> DeleteAsync(SqlKata.Query query);

        Task<bool> UpdateAsync(SqlKata.Query query);

        Task<IEnumerable<Entity.ArticleLabel.ArticleLabel>> GetAllAsync(SqlKata.Query query);
        /// <summary>
        /// 根据文章ID获取文章标签
        /// </summary>
        /// <param name="articleId"></param>
        /// <returns></returns>
        Task<IEnumerable<ArticleInnerLabelResult>> GetArticleLabelsAsync(int articleId);

        Task<Entity.ArticleLabel.ArticleLabel> GetAsync(SqlKata.Query query);
    }
}