From f2a85c6c7db4b1dcfb49a1d5dddd76420a8e79fe Mon Sep 17 00:00:00 2001 From: tim Date: Fri, 31 Dec 2021 00:18:30 +0100 Subject: [PATCH] Start on recipes --- src/Entity/AbstractProductLine.php | 52 ++++++++++++++++++++++++++++++ src/Entity/RecipeProductLine.php | 11 +++++++ 2 files changed, 63 insertions(+) create mode 100644 src/Entity/AbstractProductLine.php create mode 100644 src/Entity/RecipeProductLine.php diff --git a/src/Entity/AbstractProductLine.php b/src/Entity/AbstractProductLine.php new file mode 100644 index 0000000..6a3ab84 --- /dev/null +++ b/src/Entity/AbstractProductLine.php @@ -0,0 +1,52 @@ + 'RecipeProductLine'])] +abstract class AbstractProductLine +{ + #[ORM\Id] + #[ORM\GeneratedValue] + #[ORM\Column(type: 'integer')] + private $id; + + #[ORM\Column(type: 'integer')] + private $count; + + #[ORM\ManyToOne(targetEntity: Product::class)] + private $product; + + public function getId(): ?int + { + return $this->id; + } + + public function getCount(): ?int + { + return $this->count; + } + + public function setCount($count): self + { + $this->count = $count; + + return $this; + } + + public function getProduct(): ?Product + { + return $this->product; + } + + public function setProduct($product): self + { + $this->product = $product; + + return $this; + } +} \ No newline at end of file diff --git a/src/Entity/RecipeProductLine.php b/src/Entity/RecipeProductLine.php new file mode 100644 index 0000000..1a8415a --- /dev/null +++ b/src/Entity/RecipeProductLine.php @@ -0,0 +1,11 @@ +