diff --git a/src/Entity/Recipe.php b/src/Entity/Recipe.php new file mode 100644 index 0000000..0a21200 --- /dev/null +++ b/src/Entity/Recipe.php @@ -0,0 +1,108 @@ +id; + } + + public function getCookTime(): ?string + { + return $this->cookTime; + } + + public function setCookTime(?string $cookTime): self + { + $this->cookTime = $cookTime; + + return $this; + } + + public function getCookingMethod(): ?string + { + return $this->cookingMethod; + } + + public function setCookingMethod(?string $cookingMethod): self + { + $this->cookingMethod = $cookingMethod; + + return $this; + } + + public function getRecipeCategory(): ?string + { + return $this->recipeCategory; + } + + public function setRecipeCategory(string $recipeCategory): self + { + $this->recipeCategory = $recipeCategory; + + return $this; + } + + public function getRecipeCuisine(): ?string + { + return $this->recipeCuisine; + } + + public function setRecipeCuisine(?string $recipeCuisine): self + { + $this->recipeCuisine = $recipeCuisine; + + return $this; + } + + public function getRecipeIngredient() + { + return $this->recipeIngredient; + } + + public function setRecipeIngredient($recipeIngredient): self + { + $this->recipeIngredient = $recipeIngredient; + + return $this; + } +} diff --git a/src/Repository/RecipeRepository.php b/src/Repository/RecipeRepository.php new file mode 100644 index 0000000..5c23dc0 --- /dev/null +++ b/src/Repository/RecipeRepository.php @@ -0,0 +1,50 @@ +createQueryBuilder('r') + ->andWhere('r.exampleField = :val') + ->setParameter('val', $value) + ->orderBy('r.id', 'ASC') + ->setMaxResults(10) + ->getQuery() + ->getResult() + ; + } + */ + + /* + public function findOneBySomeField($value): ?Recipe + { + return $this->createQueryBuilder('r') + ->andWhere('r.exampleField = :val') + ->setParameter('val', $value) + ->getQuery() + ->getOneOrNullResult() + ; + } + */ +}