Newer
Older
<?php
namespace App\Entity;
use App\Repository\KitchenRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: KitchenRepository::class)]
class Kitchen
{
#[ORM\Id]
#[ORM\Column(type: 'uuid', unique: true)]
private ?Uuid $id = null;
#[ORM\Column(length: 255)]
private ?string $name = null;
#[ORM\ManyToOne(inversedBy: 'kitchen')]
#[ORM\JoinColumn(nullable: false)]
private ?Restaurant $restaurant = null;
{
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;
}
}