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

import cn.novalon.gym.manage.sys.core.domain.Dictionary;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

/**
 * 字典仓储接口
 * 
 * @author 张翔
 * @date 2026-03-13
 */
public interface IDictionaryRepository {

    Flux<Dictionary> findAll();

    Flux<Dictionary> findByDeletedAtIsNullOrderBySortAsc();

    Mono<Dictionary> findById(Long id);

    Flux<Dictionary> findByType(String type);

    Mono<Dictionary> findByTypeAndCode(String type, String code);

    Mono<Boolean> existsByTypeAndCode(String type, String code);

    Mono<Dictionary> save(Dictionary dictionary);

    Mono<Void> deleteById(Long id);

    Mono<Void> deleteByIdAndDeletedAtIsNull(Long id);
}