<?php namespace App\Entity; use App\Repository\GalleryRepository; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; use Symfony\Bridge\Doctrine\Types\UuidType; use Symfony\Component\Uid\Uuid; #[ORM\Entity(repositoryClass: GalleryRepository::class)] class Gallery { #[ORM\Id] #[ORM\Column(type: UuidType::NAME, unique: true)] #[ORM\GeneratedValue(strategy: 'CUSTOM')] #[ORM\CustomIdGenerator(class: 'doctrine.uuid_generator')] private ?Uuid $id = null; #[ORM\OneToOne(cascade: ['persist', 'remove'])] #[ORM\JoinColumn(nullable: false)] private ?Restaurant $restaurant = null; #[ORM\OneToOne(cascade: ['persist', 'remove'])] #[ORM\JoinColumn(nullable: false)] private ?File $file = null; public function getId(): ?Uuid { return $this->id; } public function getRestaurant(): ?Restaurant { return $this->restaurant; } public function setRestaurant(Restaurant $restaurant): static { $this->restaurant = $restaurant; return $this; } public function getFile(): ?File { return $this->file; } public function setFile(File $file): static { $this->file = $file; return $this; } }