<?phpnamespace App\Entity\Gos;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;use Doctrine\Common\Collections\ArrayCollection;/** * OrderType * * @ORM\Table() * @ORM\Entity(repositoryClass="App\Repository\OrderTypeRepository") * @ORM\HasLifecycleCallbacks */class OrderType{ /** * @var int * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") */ private $id; /** * @var bool * * @ORM\Column(name="isActive", type="boolean", nullable=true) */ private $isActive; /** * @var string * * @ORM\Column(name="name", type="string", length=255) */ private $name; /** * @ORM\OneToMany(targetEntity="Orders", mappedBy="orderType") */ private $orders; /** * @ORM\OneToMany(targetEntity="PortalSettings", mappedBy="orderType") */ private $portalSettings; /** * @ORM\Column(type="datetime") */ private $createdAt; /** * @ORM\Column(type="datetime", nullable=true) */ private $updatedAt; /** @ORM\PrePersist() */ public function prePersist() { $this->createdAt = new \DateTime(); } /** @ORM\PreUpdate() */ public function preUpdate() { $this->updatedAt = new \DateTime(); } public function __toString() { return (string)$this->name; } /** * Get id * * @return int */ public function getId() { return $this->id; } /** * Set name * * @param string $name * * @return OrderType */ public function setName($name) { $this->name = $name; return $this; } /** * Get name * * @return string */ public function getName() { return $this->name; } /** * Constructor */ public function __construct() { $this->orders = new \Doctrine\Common\Collections\ArrayCollection(); $this->portalSettings = new \Doctrine\Common\Collections\ArrayCollection(); } /** * Set createdAt * * @param \DateTime $createdAt * * @return OrderType */ public function setCreatedAt($createdAt) { $this->createdAt = $createdAt; return $this; } /** * Get createdAt * * @return \DateTime */ public function getCreatedAt() { return $this->createdAt; } /** * Set updatedAt * * @param \DateTime $updatedAt * * @return OrderType */ public function setUpdatedAt($updatedAt) { $this->updatedAt = $updatedAt; return $this; } /** * Get updatedAt * * @return \DateTime */ public function getUpdatedAt() { return $this->updatedAt; } /** * Add order * * @param \App\Entity\Gos\Orders $order * * @return OrderType */ public function addOrder(\App\Entity\Gos\Orders $order) { $this->orders[] = $order; return $this; } /** * Remove order * * @param \App\Entity\Gos\Orders $order */ public function removeOrder(\App\Entity\Gos\Orders $order) { $this->orders->removeElement($order); } /** * Get orders * * @return \Doctrine\Common\Collections\Collection */ public function getOrders() { return $this->orders; } /** * Set isActive * * @param boolean $isActive * * @return OrderType */ public function setIsActive($isActive) { $this->isActive = $isActive; return $this; } /** * Get isActive * * @return boolean */ public function getIsActive() { return $this->isActive; } /** * Add portalSetting * * @param \App\Entity\Gos\PortalSettings $portalSetting * * @return OrderType */ public function addPortalSetting(\App\Entity\Gos\PortalSettings $portalSetting) { $this->portalSettings[] = $portalSetting; return $this; } /** * Remove portalSetting * * @param \App\Entity\Gos\PortalSettings $portalSetting */ public function removePortalSetting(\App\Entity\Gos\PortalSettings $portalSetting) { $this->portalSettings->removeElement($portalSetting); } /** * Get portalSettings * * @return \Doctrine\Common\Collections\Collection */ public function getPortalSettings() { return $this->portalSettings; }}