<?php
namespace App\Entity\Gos\Uniqskills;
use Doctrine\ORM\Mapping as ORM;
use EWZ\Bundle\RecaptchaBundle\Validator\Constraints as Recaptcha;
/**
* @ORM\Entity(repositoryClass="App\Repository\Gos\Uniqskills\MessageRepository")
* @ORM\HasLifecycleCallbacks()
*/
class ContactMessage
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $topic;
/**
* @ORM\Column(type="string", length=255)
*/
private $name;
/**
* @ORM\Column(type="string", length=255)
*/
private $sender;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $phone;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $courseName;
/**
* @ORM\Column(type="text")
*/
private $body;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default":0})
*/
private $receiveAdvertising;
/**
* @ORM\Column(type="boolean", nullable=true, options={"default":0})
*/
private $acceptanceRegulations;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $createdAt;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $updatedAt;
/**
* @Recaptcha\IsTrue
*/
public $recaptcha;
/** @ORM\PrePersist() */
public function prePersist()
{
$this->createdAt = new \DateTime();
}
/** @ORM\PreUpdate() */
public function preUpdate()
{
$this->updatedAt = new \DateTime();
}
public function __toString()
{
return $this->topic;
}
public function getId(): ?int
{
return $this->id;
}
public function getTopic(): ?string
{
return $this->topic;
}
public function setTopic(string $topic): self
{
$this->topic = $topic;
return $this;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getSender(): ?string
{
return $this->sender;
}
public function setSender(string $sender): self
{
$this->sender = $sender;
return $this;
}
public function getPhone(): ?string
{
return $this->phone;
}
public function setPhone(string $phone): self
{
$this->phone = $phone;
return $this;
}
public function getCourseName(): ?string
{
return $this->courseName;
}
public function setCourseName(string $courseName): self
{
$this->courseName = $courseName;
return $this;
}
public function getBody(): ?string
{
return $this->body;
}
public function setBody(string $body): self
{
$this->body = $body;
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;
}
public function getReceiveAdvertising(): ?bool
{
return $this->receiveAdvertising;
}
public function setReceiveAdvertising(?bool $receiveAdvertising): self
{
$this->receiveAdvertising = $receiveAdvertising;
return $this;
}
public function getAcceptanceRegulations(): ?bool
{
return $this->acceptanceRegulations;
}
public function setAcceptanceRegulations(?bool $acceptanceRegulations): self
{
$this->acceptanceRegulations = $acceptanceRegulations;
return $this;
}
}