package cn.novalon.gym.manage.db.dao;

import cn.novalon.gym.manage.db.entity.SysMenuEntity;
import org.springframework.data.r2dbc.repository.R2dbcRepository;
import org.springframework.stereotype.Repository;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

@Repository
public interface SysMenuDao extends R2dbcRepository<SysMenuEntity, Long> {

    Mono<SysMenuEntity> findByIdAndDeletedAtIsNull(Long id);

    Flux<SysMenuEntity> findByParentIdAndDeletedAtIsNull(Long parentId);

    Flux<SysMenuEntity> findByDeletedAtIsNull();
}
