package dev.fyloz.trial.colorrecipesexplorer.repository;

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

import java.util.List;

@Repository
public interface RecipeRepository extends JpaRepository<Recipe, Long> {

    List<Recipe> findAllByCompany(Company company);

    Recipe findByName(String name);

    boolean existsByCompany(Company company);

}
