using YBEE.EQM.Core;

namespace YBEE.EQM.Application
{
    /// <summary>
    /// 角色组
    /// </summary>
    [ApiDescriptionSettings(Name = "sys-role-group")]
    [Route("sys/role/group")]
    [AppAuthorize]
    public class SysRoleGroupAppService : IDynamicApiController
    {
        private readonly ISysRoleGroupService _roleGroupService;
        public SysRoleGroupAppService(ISysRoleGroupService roleGroupService)
        {
            _roleGroupService = roleGroupService;
        }

        /// <summary>
        /// 添加角色组
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public async Task<int> Add(AddSysRoleGroupInput input)
        {
            return await _roleGroupService.Add(input);
        }
        /// <summary>
        /// 修改角色组
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public async Task Update(UpdateSysRoleGroupInput input)
        {
            await _roleGroupService.Update(input);
        }
        /// <summary>
        /// 删除角色组
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public async Task Del(DeleteSysRoleGroupInput input)
        {
            await _roleGroupService.Del(input);
        }
        /// <summary>
        /// 获取所有角色组
        /// </summary>
        /// <returns></returns>
        [DisableOpLog]
        public async Task<List<SysRoleGroupOutput>> GetAllList()
        {
            return await _roleGroupService.GetAllList();
        }
    }
}