src/Entity/CRM/Shipping.php line 11
<?phpnamespace App\Entity\CRM;use App\Repository\ShippingRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: ShippingRepository::class)]class Shipping{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(length: 255)]private ?string $name = null;#[ORM\Column]private ?bool $isActive = null;#[ORM\OneToMany(mappedBy: 'shipping', targetEntity: Order::class)]private Collection $orders;public function __construct(){$this->orders = new ArrayCollection();}public function __toString(): string{return $this->getName();}public function getId(): ?int{return $this->id;}public function getName(): ?string{return $this->name;}public function setName(string $name): self{$this->name = $name;return $this;}public function isIsActive(): ?bool{return $this->isActive;}public function setIsActive(bool $isActive): self{$this->isActive = $isActive;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->setShipping($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->getShipping() === $this) {$order->setShipping(null);}}return $this;}}