<?php namespace App\Entity; use App\Repository\KitchenRepository; use Doctrine\ORM\Mapping as ORM; use Symfony\Bridge\Doctrine\Types\UuidType; use Symfony\Component\Uid\Uuid; #[ORM\Entity(repositoryClass: KitchenRepository::class)] class Kitchen { #[ORM\Id] #[ORM\Column(type: UuidType::NAME, unique: true)] #[ORM\GeneratedValue(strategy: 'CUSTOM')] #[ORM\CustomIdGenerator(class: 'doctrine.uuid_generator')] private ?Uuid $id = null; #[ORM\Column(length: 255)] private ?string $name = null; #[ORM\ManyToOne(inversedBy: 'kitchen')] #[ORM\JoinColumn(nullable: false)] private ?Restaurant $restaurant = null; public function getId(): ?Uuid { return $this->id; } public function getName(): ?string { return $this->name; } public function setName(string $name): static { $this->name = $name; return $this; } public function getRestaurant(): ?Restaurant { return $this->restaurant; } public function setRestaurant(?Restaurant $restaurant): static { $this->restaurant = $restaurant; return $this; } }