diff --git a/src/Entity/Restaurant.php b/src/Entity/Restaurant.php index 149fe6bbecd33977b86e21b4c285571c3d617bf3..7c51073515fbd1c5265b42b52d42ca47d7f5b608 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; + } }