<?phpnamespace App\Entity\Gos;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\Validator\Constraints as Assert;use Gedmo\Mapping\Annotation as Gedmo;/** * @ORM\Table() * @ORM\Entity * @ORM\HasLifecycleCallbacks */class EmailType{ /** * @var integer * * @ORM\Column(type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") */ private $id; /** * @ORM\Column(type="string") */ private $name; /** * @ORM\Column(type="boolean", nullable=true) */ private $isActive; /** * @ORM\Column(type="datetime") */ private $createdAt; /** * @ORM\Column(type="datetime", nullable=true) */ private $updatedAt; /** * @ORM\OneToMany(targetEntity="EmailBody", mappedBy="emailType") */ private $emailbody; /** @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; } /* ****************************** GETTERS & SETTERS ****************************** */ /** * Constructor */ public function __construct() { $this->emailbody = new \Doctrine\Common\Collections\ArrayCollection(); } /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Set name * * @param string $name * @return EmailType */ public function setName($name) { $this->name = $name; return $this; } /** * Get name * * @return string */ public function getName() { return $this->name; } /** * Add emailbody * * @param \App\Entity\Gos\EmailBody $emailbody * @return EmailType */ public function addEmailbody(\App\Entity\Gos\EmailBody $emailbody) { $this->emailbody[] = $emailbody; return $this; } /** * Remove emailbody * * @param \App\Entity\Gos\EmailBody $emailbody */ public function removeEmailbody(\App\Entity\Gos\EmailBody $emailbody) { $this->emailbody->removeElement($emailbody); } /** * Get emailbody * * @return \Doctrine\Common\Collections\Collection */ public function getEmailbody() { return $this->emailbody; } /** * Set createdAt * * @param \DateTime $createdAt * @return EmailType */ 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 EmailType */ public function setUpdatedAt($updatedAt) { $this->updatedAt = $updatedAt; return $this; } /** * Get updatedAt * * @return \DateTime */ public function getUpdatedAt() { return $this->updatedAt; } /** * Set isActive * * @param boolean $isActive * * @return EmailType */ public function setIsActive($isActive) { $this->isActive = $isActive; return $this; } /** * Get isActive * * @return boolean */ public function getIsActive() { return $this->isActive; }}