Skip to content
Snippets Groups Projects
Gallery.php 1.06 KiB
Newer Older
use App\Repository\GalleryRepository;
use Symfony\Component\Uid\Uuid;
#[ORM\Entity(repositoryClass: GalleryRepository::class)]
class Gallery
    #[ORM\Column(type: 'uuid', unique: true)]
    private ?Uuid $id = null;
    #[ORM\ManyToOne(inversedBy: 'galleries')]
    #[ORM\JoinColumn(nullable: false)]
    private ?Restaurant $restaurant = null;

    #[ORM\OneToOne(cascade: ['persist', 'remove'])]
    #[ORM\JoinColumn(nullable: false)]
    private ?File $file = null;

    public function getRestaurant(): ?Restaurant
        return $this->restaurant;
    public function setRestaurant(?Restaurant $restaurant): static
        $this->restaurant = $restaurant;
    public function getFile(): ?File
    public function setFile(File $file): static