src/Entity/Prospect.php line 12

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
  7.  * @ORM\Table(name="prospect")
  8.  */
  9. class Prospect
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\Column(type="integer")
  14.      * @ORM\GeneratedValue(strategy="AUTO")
  15.      */
  16.     protected $id;
  17.     /**
  18.      * @ORM\Column(type="string", nullable=false)
  19.      * @Assert\NotBlank(message="Merci de renseigner votre nom et prénom pour continuer.")
  20.      */
  21.     protected $nom;
  22.     
  23.     /**
  24.      * @ORM\Column(type="string", length=10, nullable=false)
  25.      * @Assert\NotBlank(message="Merci de renseigner un numéro de téléphone à 10 chiffres pour continuer.")
  26.      * @Assert\Length(
  27.      *      min=10,
  28.      *      max=10,
  29.      *      exactMessage="Votre numéro de téléphone doit faire au moins {{ limit }} chiffres",
  30.      *      )
  31.      * 
  32.      */
  33.         
  34.     protected $tel;
  35.     
  36.     /**
  37.      * @ORM\Column(type="string", length=2, nullable=false)
  38.      * @Assert\NotBlank(message="Merci de renseigner uvotre code postal pour continuer.")
  39.      * @Assert\Length(
  40.      *      min=2,
  41.      *      max=2,
  42.      *      exactMessage="Votre code postal doit être composé de {{ limit }} chiffres",
  43.      *      )
  44.      */
  45.     protected $dpt;
  46.     
  47.     /**
  48.      * @ORM\Column(type="string", nullable=true)
  49.      * @Assert\Email(
  50.      *     message = "Veuillez rentrer une adresse email valide pour continuer."
  51.      * )
  52.      */
  53.     protected $email;  
  54.     
  55.    
  56.     
  57.     
  58.     
  59.     
  60.     public function getNom()
  61.     {
  62.         return $this->nom;
  63.     }
  64.     public function setNom($nom)
  65.     {
  66.         $this->nom $nom;
  67.         return $this;
  68.     }
  69.     
  70.     public function getTel()
  71.     {
  72.         return $this->tel;
  73.     }
  74.     public function setTel($tel)
  75.     {
  76.         $this->tel $tel;
  77.         return $this;
  78.     }
  79.     
  80.     public function getDpt()
  81.     {
  82.         return $this->dpt;
  83.     }
  84.     public function setDpt($dpt)
  85.     {
  86.         $this->dpt $dpt;
  87.         return $this;
  88.     }
  89.     
  90.     /*public function getDate()
  91.     {
  92.         return $this->date;
  93.     }
  94.     public function setDate($date)
  95.     {
  96.         $this->date = $date;
  97.         return $this;
  98.     }*/
  99.     
  100.         public function getEmail()
  101.     {
  102.         return $this->email;
  103.     }
  104.     public function setEmail($email)
  105.     {
  106.         $this->email $email;
  107.         return $this;
  108.     }
  109.     
  110.     
  111.    /* public function getCode()
  112.     {
  113.         return $this->code;
  114.     }
  115.     public function setCode($code)
  116.     {
  117.         $this->code = $code;
  118.         return $this;
  119.     }*/
  120.     
  121.     
  122.     
  123. }