Still more definition in progress

This commit is contained in:
Djyp 2019-03-04 23:29:55 +01:00
parent 46ee3fbfb1
commit 0f261718a5
2 changed files with 22 additions and 47 deletions

View File

@ -3,7 +3,7 @@
## Recipe ## Recipe
### estimatedTime ### estimatedTime
Array of different estimated times : cookTime, prepTime, performTime, totalTime, waitTime `Array` of different estimated times : cookTime, prepTime, performTime, totalTime, waitTime
cookTime cookTime
- https://schema.org/Duration - https://schema.org/Duration
@ -19,64 +19,56 @@ totalTime
- The total time required to perform instructions or a direction (including time to prepare the supplies) - The total time required to perform instructions or a direction (including time to prepare the supplies)
waitTime waitTime
- https://schema.org/Duration - https://schema.org/Duration
- The total time needed to wait between steps, in ISO 8601 duration format. - The total time needed to wait between steps, in ISO 8601 duration format
- waitTime is not in the schema... for now ! https://github.com/schemaorg/schemaorg/issues/2164 - waitTime is not in the schema : https://github.com/schemaorg/schemaorg/issues/2164
### cookingMethod ### cookingMethod
→ Maybe just not use it, or analyse the text to excerpt it
The method of cooking, such as Frying, Steaming,... The method of cooking, such as Frying, Steaming,...
TODO
Maybe have a checklist of methods ? Maybe have a checklist of methods ?
Maybe just not use it
### recipeCategory ### recipeCategory
`String (255)`
The category of the recipe—for example, appetizer, entree, etc. The category of the recipe—for example, appetizer, entree, etc.
### recipeCuisine ### recipeCuisine
`String (255)`
The cuisine of the recipe (for example, French or Ethiopian). The cuisine of the recipe (for example, French or Ethiopian).
### recipeIngredient ### recipeIngredient
`String[]`
List of ingredients in text format
A single ingredient used in the recipe, e.g. sugar, flour or garlic. A single ingredient used in the recipe, e.g. sugar, flour or garlic.
An array of ingredients in text format
### recipeInstructions ### recipeInstructions
`String[]`
A step in making the recipe, in the form of a single item (document, video, etc.) or an ordered list with HowToStep and/or HowToSection items. A step in making the recipe, in the form of a single item (document, video, etc.) or an ordered list with HowToStep and/or HowToSection items.
An array steps in text format.
The number of the step should never be the text. The number of the step should never be the text.
### recipeYield ### recipeYield
`String (50)`
The quantity produced by the recipe (for example, number of people served, number of servings, etc). The quantity produced by the recipe (for example, number of people served, number of servings, etc).
### suitableForDiet ### suitableForDiet
`Array` of selected keywords (DiabeticDiet, GlutenFreeDiet, HalalDiet, HinduDiet, KosherDiet, LowCalorieDiet, LowFatDiet, LowLactoseDiet, LowSaltDiet, VeganDiet, VegetarianDiet)
Indicates a dietary restriction or guideline for which this recipe or menu item is suitable, e.g. diabetic, halal etc. Indicates a dietary restriction or guideline for which this recipe or menu item is suitable, e.g. diabetic, halal etc.
DiabeticDiet TODO : Decide the best way to store the list... maybe in the model
GlutenFreeDiet
HalalDiet
HinduDiet
KosherDiet
LowCalorieDiet
LowFatDiet
LowLactoseDiet
LowSaltDiet
VeganDiet
VegetarianDiet
TODO : Define how to show in the views
Array of... texts ?
--- ---
### estimatedCost ? ### estimatedCost
The estimated cost of the supply or supplies consumed when performing instructions.
Not sure to use this property or not, I think people can guess the price.
### tool ### tool
`String[]`
### about ? A sub property of instrument. An object used (but not consumed) when performing instructions or a direction.
Probablement la description... ou peut-être le titre
### aggregateRating ?
### author ### author
The author, a user The author, a user
TODO : define a user TODO : define a user
Person with name, url (profile) and image.
### comment ### comment
A list of comments A list of comments

View File

@ -17,15 +17,10 @@ class Recipe
private $id; private $id;
/** /**
* @ORM\Column(type="string", length=20, nullable=true) * @ORM\Column(type="json_array", nullable=true)
*/ */
private $estimatedTime; private $estimatedTime;
/**
* @ORM\Column(type="string", length=100, nullable=true)
*/
private $cookingMethod;
/** /**
* @ORM\Column(type="string", length=25) * @ORM\Column(type="string", length=25)
*/ */
@ -37,7 +32,7 @@ class Recipe
private $recipeCuisine; private $recipeCuisine;
/** /**
* @ORM\Column(type="json_array") * @ORM\Column(type="text")
*/ */
private $recipeIngredient; private $recipeIngredient;
@ -52,7 +47,7 @@ class Recipe
private $recipeYield; private $recipeYield;
/** /**
* @ORM\Column(type="string", length=255, nullable=true) * @ORM\Column(type="json_array", length=255, nullable=true)
*/ */
private $suitableForDiet; private $suitableForDiet;
@ -73,18 +68,6 @@ class Recipe
return $this; return $this;
} }
public function getCookingMethod(): ?string
{
return $this->cookingMethod;
}
public function setCookingMethod(?string $cookingMethod): self
{
$this->cookingMethod = $cookingMethod;
return $this;
}
public function getRecipeCategory(): ?string public function getRecipeCategory(): ?string
{ {
return $this->recipeCategory; return $this->recipeCategory;