<?phpnamespace App\Entity;use Doctrine\ORM\Mapping as ORM;use Doctrine\Common\Collections\ArrayCollection;/** * @ORM\Entity * @ORM\Table(name="event_form_entity") * @ORM\HasLifecycleCallbacks() */class EventFormEntity{ /** * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") * @ORM\Column(type="integer") */ private $id; /** * @ORM\ManyToOne(targetEntity="App\Entity\MobileAppEvent", inversedBy="eventFormEntities") * @ORM\JoinColumn(name="eid", referencedColumnName="eid") */ private $event; /** * @ORM\Column(type="json") */ private $dataForm; /** * @ORM\Column(type="json") */ private $terms; /** * @ORM\Column(type="datetime") */ private $createDate; /** * @ORM\Column(type="datetime") */ private $updateDate; public function getId() { return $this->id; } public function getEvent() { return $this->event; } public function setEvent($event) { $this->event = $event; return $this; } public function getDataForm() { return $this->dataForm; } public function setDataForm($dataForm) { $this->dataForm = $dataForm; return $this; } public function getTerms() { return $this->terms; } public function setTerms($terms) { $this->terms = $terms; return $this; } public function getCreateDate() { return $this->createDate; } public function setCreateDate($createDate) { $this->createDate = $createDate; return $this; } public function getUpdateDate() { return $this->updateDate; } public function setUpdateDate($updateDate) { $this->updateDate = $updateDate; return $this; } /** * @ORM\PrePersist */ public function prePersist() { if (!$this->getCreateDate()) { $this->setCreateDate(new \DateTime()); } $this->setUpdateDate(new \DateTime()); } /** * @ORM\PreUpdate */ public function preUpdate() { $this->setUpdateDate(new \DateTime()); }}