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

import cn.novalon.gym.manage.sys.core.domain.SysMenu;
import cn.novalon.gym.manage.sys.core.query.SysMenuQuery;
import cn.novalon.gym.manage.common.dto.PageRequest;
import cn.novalon.gym.manage.common.dto.PageResponse;
import org.springframework.data.domain.Sort;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

/**
 * 菜单仓储接口
 * 
 * @author 张翔
 * @date 2026-03-13
 */
public interface ISysMenuRepository {

    Flux<SysMenu> findByParentId(Long parentId);

    Flux<SysMenu> findByParentIdOrderBySort(Long parentId, Sort sort);

    Mono<SysMenu> findById(Long id);

    Mono<SysMenu> save(SysMenu sysMenu);

    Mono<SysMenu> update(SysMenu sysMenu);

    Mono<Void> deleteById(Long id);

    Flux<SysMenu> findAll();

    Flux<SysMenu> findAll(Sort sort);

    Mono<Long> count();

    Mono<PageResponse<SysMenu>> findByQueryWithPagination(SysMenuQuery query, PageRequest pageRequest);

    Flux<SysMenu> findByStatus(String status);
}