package cn.novalon.gym.manage.sys.core.service;

import cn.novalon.gym.manage.sys.core.domain.SysRole;
import cn.novalon.gym.manage.common.dto.PageRequest;
import cn.novalon.gym.manage.common.dto.PageResponse;
import cn.novalon.gym.manage.sys.core.command.CreateRoleCommand;
import cn.novalon.gym.manage.sys.core.command.UpdateRoleCommand;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

/**
 * 角色服务接口
 * 
 * @author 张翔
 * @date 2026-03-13
 */
public interface ISysRoleService {
    Mono<SysRole> findById(Long id);
    Flux<SysRole> findAll();
    Mono<PageResponse<SysRole>> findRolesByPage(PageRequest pageRequest);
    Mono<Long> count();
    Mono<SysRole> createRole(SysRole role);
    Mono<SysRole> createRole(CreateRoleCommand command);
    Mono<SysRole> updateRole(SysRole role);
    Mono<SysRole> updateRole(UpdateRoleCommand command);
    Mono<Void> deleteRole(Long id);
    Mono<SysRole> findByRoleName(String roleName);
    Mono<Boolean> existsByRoleName(String roleName);
    Mono<SysRole> logicalDeleteRole(Long id);
    Mono<SysRole> restoreRole(Long id);
}
