<?phpnamespace App\Entity\Gos;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass="App\Repository\NoTaxTypeRepository") * @ORM\HasLifecycleCallbacks() */class NoTaxType{ /** * @ORM\Id() * @ORM\GeneratedValue() * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="boolean", nullable=true) */ private $isActive; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $name; /** * @ORM\OneToMany(targetEntity="App\Entity\Gos\Orders", mappedBy="noTaxType") */ private $orders; /** * @ORM\Column(type="datetime") */ private $createdAt; /** * @ORM\Column(type="datetime", nullable=true) */ private $updatedAt; public function __construct() { $this->orders = new ArrayCollection(); } /** @ORM\PrePersist() */ public function onPrePersist() { $this->createdAt = new \DateTime(); } /** @ORM\PreUpdate() */ public function onPreUpdate() { $this->updatedAt = new \DateTime(); } 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 getIsActive(): ?bool { return $this->isActive; } public function setIsActive(?bool $isActive): self { $this->isActive = $isActive; return $this; } public function getCreatedAt(): ?\DateTimeInterface { return $this->createdAt; } public function setCreatedAt(\DateTimeInterface $createdAt): self { $this->createdAt = $createdAt; return $this; } public function getUpdatedAt(): ?\DateTimeInterface { return $this->updatedAt; } public function setUpdatedAt(?\DateTimeInterface $updatedAt): self { $this->updatedAt = $updatedAt; return $this; } /** * @return Collection|Orders[] */ public function getOrders(): Collection { return $this->orders; } public function addOrder(Orders $order): self { if (!$this->orders->contains($order)) { $this->orders[] = $order; $order->setNoTaxType($this); } return $this; } public function removeOrder(Orders $order): self { if ($this->orders->contains($order)) { $this->orders->removeElement($order); // set the owning side to null (unless already changed) if ($order->getNoTaxType() === $this) { $order->setNoTaxType(null); } } return $this; }}