add option to select previous menuitems

This commit is contained in:
lubiana 2024-06-26 20:12:27 +02:00
parent 57b4e33028
commit 45029e0a4c
No known key found for this signature in database
11 changed files with 410 additions and 94 deletions

View file

@ -24,9 +24,13 @@ class OrderItem
private string|null $extras = null;
#[ORM\ManyToOne(inversedBy: 'orderItems')]
#[ORM\JoinColumn(nullable: false)]
#[ORM\JoinColumn(nullable: true)]
private FoodOrder|null $foodOrder = null;
#[ORM\ManyToOne]
#[ORM\JoinColumn(nullable: true)]
private MenuItem|null $menuItem = null;
public function getId(): Ulid|null
{
return $this->id;
@ -67,4 +71,16 @@ class OrderItem
return $this;
}
public function getMenuItem(): MenuItem|null
{
return $this->menuItem;
}
public function setMenuItem(MenuItem|null $menuItem): static
{
$this->menuItem = $menuItem;
return $this;
}
}