package cloud.nstart.terravault.ordinis.domain.definition;

import cloud.nstart.terravault.ordinis.domain.DataScope;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;
import java.util.Optional;
import java.util.UUID;

public interface DictionaryDefinitionRepository extends JpaRepository<DictionaryDefinition, UUID> {

  Optional<DictionaryDefinition> findByName(String name);

  List<DictionaryDefinition> findByBundle(String bundle);

  List<DictionaryDefinition> findByScope(DataScope scope);

  boolean existsByName(String name);
}
