src/Entity/Contact.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ContactRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Validator\Constraints as Assert;
  6. /**
  7.  * @ORM\Entity(repositoryClass=ContactRepository::class)
  8.  */
  9. class Contact
  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, nullable=true)
  19.      * @Assert\Length(
  20.      *      max = 255,
  21.      *      maxMessage = "{{ limit }} caractères maximum"
  22.      * )
  23.      */
  24.     private $nom;
  25.     /**
  26.      * @ORM\Column(type="string", length=255, nullable=true)
  27.      * @Assert\Length(
  28.      *      max = 255,
  29.      *      maxMessage = "{{ limit }} caractères maximum"
  30.      * )
  31.      */
  32.     private $prenom;
  33.     /**
  34.      * @ORM\Column(type="string", length=255, nullable=true)
  35.      * @Assert\Length(
  36.      *      max = 255,
  37.      *      maxMessage = "{{ limit }} caractères maximum"
  38.      * )
  39.      */
  40.     private $civilite;
  41.     /**
  42.      * @ORM\Column(type="string", length=255, nullable=true)
  43.      * @Assert\Length(
  44.      *      max = 255,
  45.      *      maxMessage = "{{ limit }} caractères maximum"
  46.      * )
  47.      */
  48.     private $fonction;
  49.     /**
  50.      * @ORM\Column(type="string", length=255, nullable=true)
  51.      * @Assert\Length(
  52.      *      max = 255,
  53.      *      maxMessage = "{{ limit }} caractères maximum"
  54.      * )
  55.      */
  56.     private $service;
  57.     /**
  58.      * @ORM\Column(type="string", length=25, nullable=true)
  59.      * @Assert\Length(
  60.      *      min = 10,
  61.      *      max = 20,
  62.      *      minMessage = "Le téléphone doit comporter au moins {{ limit }} caractères",
  63.      *      maxMessage = "Le téléphone ne doit pas comporter plus de {{ limit }} caractères"
  64.      * )
  65.      */
  66.     private $telephoneFixe;
  67.     /**
  68.      * @ORM\Column(type="string", length=25, nullable=true)
  69.      * @Assert\Length(
  70.      *      min = 10,
  71.      *      max = 20,
  72.      *      minMessage = "Le téléphone doit comporter au moins {{ limit }} caractères",
  73.      *      maxMessage = "Le téléphone ne doit pas comporter plus de {{ limit }} caractères"
  74.      * )
  75.      */
  76.     private $telephoneMobile;
  77.     /**
  78.      * @ORM\Column(type="string", length=255, nullable=true)
  79.      */
  80.     private $mail;
  81.     /**
  82.      * @ORM\Column(type="string", length=255, nullable=true)
  83.      * @Assert\Length(
  84.      *      max = 255,
  85.      *      maxMessage = "{{ limit }} caractères maximum"
  86.      * )
  87.      */
  88.     private $adresse;
  89.     /**
  90.      * @ORM\Column(type="string", length=10, nullable=true)
  91.      * @Assert\Length(
  92.      *      min = 5,
  93.      *      max = 5,
  94.      *      minMessage = "Le code postal doit comporter au moins {{ limit }} caractères",
  95.      *      maxMessage = "Le code postal ne doit pas comporter plus de {{ limit }} caractères",
  96.      *      exactMessage = "Le code postal doit comporter {{ limit }} caractères"
  97.      * )
  98.      */
  99.     private $codePostal;
  100.     /**
  101.      * @ORM\Column(type="string", length=255, nullable=true)
  102.      * @Assert\Length(
  103.      *      max = 255,
  104.      *      maxMessage = "{{ limit }} caractères maximum"
  105.      * )
  106.      */
  107.     private $ville;
  108.     /**
  109.      * @ORM\Column(type="string", length=255, nullable=true)
  110.      * @Assert\Length(
  111.      *      max = 255,
  112.      *      maxMessage = "{{ limit }} caractères maximum"
  113.      * )
  114.      */
  115.     private $statut;
  116.     /**
  117.      * @ORM\Column(type="boolean", nullable=true)
  118.      */
  119.     private $referent;
  120.     /**
  121.      * @ORM\ManyToOne(targetEntity="App\Entity\Structure", inversedBy="contacts")
  122.      * @ORM\JoinColumn(nullable=false)
  123.      */
  124.     private $structure;
  125.     public function getId(): ?int
  126.     {
  127.         return $this->id;
  128.     }
  129.     public function getNom(): ?string
  130.     {
  131.         return $this->nom;
  132.     }
  133.     public function setNom(?string $nom): self
  134.     {
  135.         $this->nom $nom;
  136.         return $this;
  137.     }
  138.     public function getPrenom(): ?string
  139.     {
  140.         return $this->prenom;
  141.     }
  142.     public function setPrenom(?string $prenom): self
  143.     {
  144.         $this->prenom $prenom;
  145.         return $this;
  146.     }
  147.     public function getCivilite(): ?string
  148.     {
  149.         return $this->civilite;
  150.     }
  151.     public function setCivilite(?string $civilite): self
  152.     {
  153.         $this->civilite $civilite;
  154.         return $this;
  155.     }
  156.     public function getFonction(): ?string
  157.     {
  158.         return $this->fonction;
  159.     }
  160.     public function setFonction(?string $fonction): self
  161.     {
  162.         $this->fonction $fonction;
  163.         return $this;
  164.     }
  165.     public function getService(): ?string
  166.     {
  167.         return $this->service;
  168.     }
  169.     public function setService(?string $service): self
  170.     {
  171.         $this->service $service;
  172.         return $this;
  173.     }
  174.     public function getTelephoneFixe(): ?string
  175.     {
  176.         return $this->telephoneFixe;
  177.     }
  178.     public function setTelephoneFixe(?string $telephoneFixe): self
  179.     {
  180.         $this->telephoneFixe $telephoneFixe;
  181.         return $this;
  182.     }
  183.     public function getTelephoneMobile(): ?string
  184.     {
  185.         return $this->telephoneMobile;
  186.     }
  187.     public function setTelephoneMobile(?string $telephoneMobile): self
  188.     {
  189.         $this->telephoneMobile $telephoneMobile;
  190.         return $this;
  191.     }
  192.     public function getMail(): ?string
  193.     {
  194.         return $this->mail;
  195.     }
  196.     public function setMail(?string $mail): self
  197.     {
  198.         $this->mail $mail;
  199.         return $this;
  200.     }
  201.     public function getAdresse(): ?string
  202.     {
  203.         return $this->adresse;
  204.     }
  205.     public function setAdresse(?string $adresse): self
  206.     {
  207.         $this->adresse $adresse;
  208.         return $this;
  209.     }
  210.     public function getCodePostal(): ?string
  211.     {
  212.         return $this->codePostal;
  213.     }
  214.     public function setCodePostal(?string $codePostal): self
  215.     {
  216.         $this->codePostal $codePostal;
  217.         return $this;
  218.     }
  219.     public function getVille(): ?string
  220.     {
  221.         return $this->ville;
  222.     }
  223.     public function setVille(?string $ville): self
  224.     {
  225.         $this->ville $ville;
  226.         return $this;
  227.     }
  228.     public function getStatut(): ?string
  229.     {
  230.         return $this->statut;
  231.     }
  232.     public function setStatut(?string $statut): self
  233.     {
  234.         $this->statut $statut;
  235.         return $this;
  236.     }
  237.     public function getReferent(): ?bool
  238.     {
  239.         return $this->referent;
  240.     }
  241.     public function setReferent(?bool $referent): self
  242.     {
  243.         $this->referent $referent;
  244.         return $this;
  245.     }
  246.     public function getStructure(): ?Structure
  247.     {
  248.         return $this->structure;
  249.     }
  250.     public function setStructure(?Structure $structure): self
  251.     {
  252.         $this->structure $structure;
  253.         return $this;
  254.     }
  255. }