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=5, nullable=false)
  38.      * @Assert\NotBlank(message="Merci de renseigner votre 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.      * @ORM\Column(type="string", nullable=true)
  58.      * @Assert\NotBlank(
  59.      *     message = "Merci de renseigner votre adresse postale pour continuer."
  60.      * )
  61.      */
  62.     protected $code
  63.     
  64.      /**
  65.      * @ORM\Column(type="string", nullable=true)
  66.      * @Assert\NotBlank(
  67.      *     message = "Merci de renseigner votre villee pour continuer."
  68.      * )
  69.      */
  70.     protected $date
  71.     
  72.    
  73.     
  74.     
  75.     
  76.     
  77.     public function getNom()
  78.     {
  79.         return $this->nom;
  80.     }
  81.     public function setNom($nom)
  82.     {
  83.         $this->nom $nom;
  84.         return $this;
  85.     }
  86.     
  87.     public function getTel()
  88.     {
  89.         return $this->tel;
  90.     }
  91.     public function setTel($tel)
  92.     {
  93.         $this->tel $tel;
  94.         return $this;
  95.     }
  96.     
  97.     public function getDpt()
  98.     {
  99.         return $this->dpt;
  100.     }
  101.     public function setDpt($dpt)
  102.     {
  103.         $this->dpt $dpt;
  104.         return $this;
  105.     }
  106.     
  107.     public function getDate()
  108.     {
  109.         return $this->date;
  110.     }
  111.     public function setDate($date)
  112.     {
  113.         $this->date $date;
  114.         return $this;
  115.     }
  116.     
  117.         public function getEmail()
  118.     {
  119.         return $this->email;
  120.     }
  121.     public function setEmail($email)
  122.     {
  123.         $this->email $email;
  124.         return $this;
  125.     }
  126.     
  127.     
  128.     public function getCode()
  129.     {
  130.         return $this->code;
  131.     }
  132.     public function setCode($code)
  133.     {
  134.         $this->code $code;
  135.         return $this;
  136.     }
  137.     
  138.     
  139.     
  140. }