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

namespace GxPress.Repository.Interface
{
    public interface IRoleGroupRepository : IRepository
    {
        Task<int> InsertAsync(RoleGroup roleGroup);

        Task<bool> IsNameExistsAsync(string name);

        Task<RoleGroup> GetAsync(int id);

        Task<bool> UpdateAsync(RoleGroup roleGroup);

        Task<IEnumerable<RoleGroup>> GetListAsync();

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

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

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

        /// <summary>
        /// ��ȡ�б�
        /// </summary>
        /// <returns></returns>
        Task<List<RoleGroupDetailResult>> GetDetailListAsync();
    }
}