!20 add username to order and item
This commit is contained in:
parent
9d81464fd8
commit
511f12f10f
12 changed files with 147 additions and 24 deletions
|
@ -34,6 +34,11 @@ class FoodOrder
|
|||
#[ORM\OneToMany(targetEntity: OrderItem::class, mappedBy: 'foodOrder', orphanRemoval: true)]
|
||||
private Collection $orderItems;
|
||||
|
||||
#[ORM\Column(length: 255, options: [
|
||||
'default' => 'nobody',
|
||||
])]
|
||||
private string|null $createdBy = 'nobody';
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->orderItems = new ArrayCollection;
|
||||
|
@ -117,4 +122,16 @@ class FoodOrder
|
|||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getCreatedBy(): string|null
|
||||
{
|
||||
return $this->createdBy;
|
||||
}
|
||||
|
||||
public function setCreatedBy(string $createdBy): static
|
||||
{
|
||||
$this->createdBy = $createdBy;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue