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

import cn.novalon.manage.sys.core.domain.SysMenu;
import cn.novalon.manage.sys.core.command.CreateMenuCommand;
import cn.novalon.manage.sys.core.command.UpdateMenuCommand;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

/**
 * 菜单服务接口
 * 
 * @author 张翔
 * @date 2026-03-13
 */
public interface ISysMenuService {
    Mono<SysMenu> findById(Long id);
    Flux<SysMenu> findAll();
    Flux<SysMenu> findByParentId(Long parentId);
    Mono<SysMenu> createMenu(SysMenu menu);
    Mono<SysMenu> createMenu(CreateMenuCommand command);
    Mono<SysMenu> updateMenu(SysMenu menu);
    Mono<SysMenu> updateMenu(UpdateMenuCommand command);
    Mono<Void> deleteMenu(Long id);
    Flux<SysMenu> buildMenuTree(Flux<SysMenu> menus);
}
