src/Entity/Gos/Uniqskills/ContactMessage.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gos\Uniqskills;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use EWZ\Bundle\RecaptchaBundle\Validator\Constraints as Recaptcha;
  5. /**
  6.  * @ORM\Entity(repositoryClass="App\Repository\Gos\Uniqskills\MessageRepository")
  7.  * @ORM\HasLifecycleCallbacks()
  8.  */
  9. class ContactMessage
  10. {
  11.     /**
  12.      * @ORM\Id()
  13.      * @ORM\GeneratedValue()
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="string", length=255)
  19.      */
  20.     private $topic;
  21.     /**
  22.      * @ORM\Column(type="string", length=255)
  23.      */
  24.     private $name;
  25.     /**
  26.      * @ORM\Column(type="string", length=255)
  27.      */
  28.     private $sender;
  29.     /**
  30.      * @ORM\Column(type="string", length=255, nullable=true)
  31.      */
  32.     private $phone;
  33.     /**
  34.      * @ORM\Column(type="string", length=255, nullable=true)
  35.      */
  36.     private $courseName;
  37.     /**
  38.      * @ORM\Column(type="text")
  39.      */
  40.     private $body;
  41.     /**
  42.      * @ORM\Column(type="boolean", nullable=true, options={"default":0})
  43.      */
  44.     private $receiveAdvertising;
  45.     /**
  46.      * @ORM\Column(type="boolean", nullable=true, options={"default":0})
  47.      */
  48.     private $acceptanceRegulations;
  49.     /**
  50.      * @ORM\Column(type="datetime", nullable=true)
  51.      */
  52.     private $createdAt;
  53.     /**
  54.      * @ORM\Column(type="datetime", nullable=true)
  55.      */
  56.     private $updatedAt;
  57.     /**
  58.      * @Recaptcha\IsTrue
  59.      */
  60.     public $recaptcha;
  61.     /** @ORM\PrePersist() */
  62.     public function prePersist()
  63.     {
  64.         $this->createdAt = new \DateTime();
  65.     }
  66.     /** @ORM\PreUpdate() */
  67.     public function preUpdate()
  68.     {
  69.         $this->updatedAt = new \DateTime();
  70.     }
  71.     public function __toString()
  72.     {
  73.         return $this->topic;
  74.     }
  75.     public function getId(): ?int
  76.     {
  77.         return $this->id;
  78.     }
  79.     public function getTopic(): ?string
  80.     {
  81.         return $this->topic;
  82.     }
  83.     public function setTopic(string $topic): self
  84.     {
  85.         $this->topic $topic;
  86.         return $this;
  87.     }
  88.     public function getName(): ?string
  89.     {
  90.         return $this->name;
  91.     }
  92.     public function setName(string $name): self
  93.     {
  94.         $this->name $name;
  95.         return $this;
  96.     }
  97.     public function getSender(): ?string
  98.     {
  99.         return $this->sender;
  100.     }
  101.     public function setSender(string $sender): self
  102.     {
  103.         $this->sender $sender;
  104.         return $this;
  105.     }
  106.     public function getPhone(): ?string
  107.     {
  108.         return $this->phone;
  109.     }
  110.     public function setPhone(string $phone): self
  111.     {
  112.         $this->phone $phone;
  113.         return $this;
  114.     }
  115.     public function getCourseName(): ?string
  116.     {
  117.         return $this->courseName;
  118.     }
  119.     public function setCourseName(string $courseName): self
  120.     {
  121.         $this->courseName $courseName;
  122.         return $this;
  123.     }
  124.     public function getBody(): ?string
  125.     {
  126.         return $this->body;
  127.     }
  128.     public function setBody(string $body): self
  129.     {
  130.         $this->body $body;
  131.         return $this;
  132.     }
  133.     public function getCreatedAt(): ?\DateTimeInterface
  134.     {
  135.         return $this->createdAt;
  136.     }
  137.     public function setCreatedAt(?\DateTimeInterface $createdAt): self
  138.     {
  139.         $this->createdAt $createdAt;
  140.         return $this;
  141.     }
  142.     public function getUpdatedAt(): ?\DateTimeInterface
  143.     {
  144.         return $this->updatedAt;
  145.     }
  146.     public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
  147.     {
  148.         $this->updatedAt $updatedAt;
  149.         return $this;
  150.     }
  151.     public function getReceiveAdvertising(): ?bool
  152.     {
  153.         return $this->receiveAdvertising;
  154.     }
  155.     public function setReceiveAdvertising(?bool $receiveAdvertising): self
  156.     {
  157.         $this->receiveAdvertising $receiveAdvertising;
  158.         return $this;
  159.     }
  160.     public function getAcceptanceRegulations(): ?bool
  161.     {
  162.         return $this->acceptanceRegulations;
  163.     }
  164.     public function setAcceptanceRegulations(?bool $acceptanceRegulations): self
  165.     {
  166.         $this->acceptanceRegulations $acceptanceRegulations;
  167.         return $this;
  168.     }
  169. }