From 9194791cb3ea38c188c33ed358f9e81e8f51ab28 Mon Sep 17 00:00:00 2001 From: "a.shamavov" Date: Thu, 2 May 2024 13:46:14 +0500 Subject: [PATCH] =?UTF-8?q?STA-965=20|=20=D0=9F=D0=BE=D0=BF=D1=80=D0=B0?= =?UTF-8?q?=D0=B2=D0=B8=D0=BB=20=D1=81=D1=83=D1=89=D0=BD=D0=BE=D1=81=D1=82?= =?UTF-8?q?=D1=8C=20Restaurant?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Entity/Restaurant.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/Entity/Restaurant.php b/src/Entity/Restaurant.php index f3fa475..37d2318 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; + } } -- GitLab