diff --git a/src/Entity/Restaurant.php b/src/Entity/Restaurant.php index f3fa47540ff3496cc0be941c234a8ba3d220fb97..37d2318e23452d66219d22efcc716d28264294cf 100644 --- a/src/Entity/Restaurant.php +++ b/src/Entity/Restaurant.php @@ -98,6 +98,10 @@ class Restaurant #[ORM\JoinColumn(nullable: false)] private ?Seo $seo = null; + #[ORM\OneToOne(cascade: ['persist', 'remove'])] + #[ORM\JoinColumn(nullable: false)] + private ?File $file = null; + public function __construct() { $this->kitchen = new ArrayCollection(); @@ -424,4 +428,16 @@ class Restaurant return $this; } + + public function getFile(): ?File + { + return $this->file; + } + + public function setFile(File $file): static + { + $this->file = $file; + + return $this; + } }