package dev.fyloz.trial.colorrecipesexplorer.repository;

import dev.fyloz.trial.colorrecipesexplorer.model.Material;
import dev.fyloz.trial.colorrecipesexplorer.model.MixType;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.Optional;

@Repository
public interface MixTypeRepository extends JpaRepository<MixType, Long> {

    boolean existsByName(String name);

    Optional<MixType> findByName(String name);

    Optional<MixType> findByMaterial(Material material);
}
