src/Entity/Status.php line 11
<?phpnamespace App\Entity;use App\Repository\StatusRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: StatusRepository::class)]class Status{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(length: 255)]private ?string $status_name = null;#[ORM\OneToMany(mappedBy: 'order_status', targetEntity: Order::class)]private Collection $orders;public function __construct(){$this->orders = new ArrayCollection();}public function getId(): ?int{return $this->id;}public function getStatusName(): ?string{return $this->status_name;}public function setStatusName(string $status_name): self{$this->status_name = $status_name;return $this;}/*** @return Collection<int, Order>*/public function getOrders(): Collection{return $this->orders;}public function addOrder(Order $order): self{if (!$this->orders->contains($order)) {$this->orders->add($order);$order->setOrderStatus($this);}return $this;}public function removeOrder(Order $order): self{if ($this->orders->removeElement($order)) {// set the owning side to null (unless already changed)if ($order->getOrderStatus() === $this) {$order->setOrderStatus(null);}}return $this;}public function __toString(): string{return $this->getStatusName();}}