using System.Collections.Generic;
using System.Threading.Tasks;
using GxPress.Entity;
using GxPress.Request.ArticleGroup;
using Datory;

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

        Task<bool> IsNameExistsAsync(string name);

        Task<int> InsertAsync(ArticleGroup processGroup);

        Task<ArticleGroup> GetAsync(int id);

        Task<bool> UpdateAsync(ArticleGroup processGroup);

        Task<IEnumerable<ArticleGroup>> GetListAsync(int userId);

        /// <summary>
        /// ����
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<ArticleGroup> AddAsync(ArticleGroupAddRequest request);

        /// <summary>
        /// �޸�
        /// </summary>
        /// <param name="id"></param>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<bool> UpdateAsync(int id, ArticleGroupAddRequest request);

        /// <summary>
        /// ɾ��
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<bool> DeleteAsync(int id);
    }
}