src/Entity/Contact.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ContactRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=ContactRepository::class)
  9.  */
  10. class Contact
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=100)
  20.      */
  21.     private $nom;
  22.     /**
  23.      * @ORM\Column(type="string", length=100, nullable=true)
  24.      */
  25.     private $prenom;
  26.     /**
  27.      * @ORM\Column(type="string", length=180, nullable=true)
  28.      */
  29.     private $email;
  30.     /**
  31.      * @ORM\Column(type="string", length=100, nullable=true)
  32.      */
  33.     private $telephone;
  34.     
  35.     /**
  36.      * @ORM\Column(type="string", length=10, nullable=true)
  37.      */
  38.     private $mobile;
  39.     /**
  40.      * @ORM\ManyToOne(targetEntity=Financeurs::class, inversedBy="contacts")
  41.      */
  42.     private $financeurs;
  43.         public function __construct()
  44.     {
  45.         $this->financeur = new ArrayCollection();
  46.     }
  47.     
  48.     public function __toString()
  49.     {
  50.         return (string) $this->getId();
  51.     }
  52.     public function getId(): ?int
  53.     {
  54.         return $this->id;
  55.     }
  56.     public function getNom(): ?string
  57.     {
  58.         return $this->nom;
  59.     }
  60.     public function setNom(string $nom): self
  61.     {
  62.         $this->nom $nom;
  63.         return $this;
  64.     }
  65.     public function getPrenom(): ?string
  66.     {
  67.         return $this->prenom;
  68.     }
  69.     public function setPrenom(?string $prenom): self
  70.     {
  71.         $this->prenom $prenom;
  72.         return $this;
  73.     }
  74.     public function getEmail(): ?string
  75.     {
  76.         return $this->email;
  77.     }
  78.     public function setEmail(?string $email): self
  79.     {
  80.         $this->email $email;
  81.         return $this;
  82.     }
  83.     public function getTelephone(): ?string
  84.     {
  85.         return $this->telephone;
  86.     }
  87.     public function setTelephone(?string $telephone): self
  88.     {
  89.         $this->telephone $telephone;
  90.         return $this;
  91.     }
  92.     public function getMobile(): ?string
  93.     {
  94.         return $this->mobile;
  95.     }
  96.     public function setMobile(?string $mobile): self
  97.     {
  98.         $this->mobile $mobile;
  99.         return $this;
  100.     }
  101.     public function getFinanceurs(): ?Financeurs
  102.     {
  103.         return $this->financeurs;
  104.     }
  105.     public function setFinanceurs(?Financeurs $financeurs): self
  106.     {
  107.         $this->financeurs $financeurs;
  108.         return $this;
  109.     }
  110. }