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

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

        Task<bool> IsNameExistsAsync(string name);

        Task<int> InsertAsync(ProcessGroup processGroup);

        Task<ProcessGroup> GetAsync(int id);

        Task<bool> UpdateAsync(ProcessGroup processGroup);

        Task<IEnumerable<ProcessGroup>> GetListAsync();

        /// <summary>
        /// ����
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        Task<ProcessGroup> 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);
    }
}