src/Entity/Contact.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Component\Validator\Constraints as Assert;
  5. /**
  6.  * @ORM\Entity(repositoryClass="App\Repository\ContactRepository")
  7.  */
  8. class Contact
  9. {
  10.     /**
  11.      * @ORM\Id()
  12.      * @ORM\GeneratedValue()
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\Column(type="string", length=255)
  18.      */
  19.     private $nomPrenoms;
  20.     /**
  21.      * @ORM\Column(type="string", length=255)
  22.      * @Assert\Email(message = "The email '{{ value }}' is not a valid email.",
  23.      *    )
  24.      */
  25.     private $email;
  26.     /**
  27.      * @ORM\Column(type="text")
  28.      */
  29.     private $message;
  30.     /**
  31.      * @ORM\Column(type="datetime")
  32.      */
  33.     private $createdAt;
  34.     public function getId(): ?int
  35.     {
  36.         return $this->id;
  37.     }
  38.     public function getNomPrenoms(): ?string
  39.     {
  40.         return $this->nomPrenoms;
  41.     }
  42.     public function setNomPrenoms(string $nomPrenoms): self
  43.     {
  44.         $this->nomPrenoms $nomPrenoms;
  45.         return $this;
  46.     }
  47.     public function getEmail(): ?string
  48.     {
  49.         return $this->email;
  50.     }
  51.     public function setEmail(string $email): self
  52.     {
  53.         $this->email $email;
  54.         return $this;
  55.     }
  56.     public function getMessage(): ?string
  57.     {
  58.         return $this->message;
  59.     }
  60.     public function setMessage(string $message): self
  61.     {
  62.         $this->message $message;
  63.         return $this;
  64.     }
  65.     public function getCreatedAt(): ?\DateTimeInterface
  66.     {
  67.         return $this->createdAt;
  68.     }
  69.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  70.     {
  71.         $this->createdAt $createdAt;
  72.         return $this;
  73.     }
  74. }