src/Entity/Client.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ClientRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=ClientRepository::class)
  9.  */
  10. class Client
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=255, nullable=true)
  20.      */
  21.     private $raisonsociale;
  22.     /**
  23.      * @ORM\Column(type="string", length=255, nullable=true)
  24.      */
  25.     private $siret;
  26.     /**
  27.      * @ORM\Column(type="string", length=255, nullable=true)
  28.      */
  29.     private $siteweb;
  30.     /**
  31.      * @ORM\Column(type="string", length=255, nullable=true)
  32.      */
  33.     private $telephone;
  34.     /**
  35.      * @ORM\Column(type="string", length=255, nullable=true)
  36.      */
  37.     private $tva;
  38.     /**
  39.      * @ORM\Column(type="string", length=255, nullable=true)
  40.      */
  41.     private $civilite;
  42.     /**
  43.      * @ORM\Column(type="string", length=255, nullable=true)
  44.      */
  45.     private $nom;
  46.     /**
  47.      * @ORM\Column(type="string", length=255, nullable=true)
  48.      */
  49.     private $prenom;
  50.     /**
  51.      * @ORM\Column(type="string", length=255, nullable=true)
  52.      */
  53.     private $telephonecontact;
  54.     /**
  55.      * @ORM\Column(type="string", length=255, nullable=true)
  56.      */
  57.     private $mail;
  58.     /**
  59.      * @ORM\Column(type="string", length=255, nullable=true)
  60.      */
  61.     private $adresse;
  62.     /**
  63.      * @ORM\Column(type="string", length=255, nullable=true)
  64.      */
  65.     private $complementadresse;
  66.     /**
  67.      * @ORM\Column(type="string", length=255, nullable=true)
  68.      */
  69.     private $ville;
  70.     /**
  71.      * @ORM\Column(type="string", length=255, nullable=true)
  72.      */
  73.     private $cp;
  74.     /**
  75.      * @ORM\Column(type="string", length=255, nullable=true)
  76.      */
  77.     private $pays;
  78.     /**
  79.      * @ORM\Column(type="string", length=255, nullable=true)
  80.      */
  81.     private $creeespaceclient;
  82.     /**
  83.      * @ORM\OneToMany(targetEntity=Devis::class, mappedBy="client")
  84.      */
  85.     private $devisclient;
  86.     /**
  87.      * @ORM\OneToMany(targetEntity=Commentaire::class, mappedBy="client")
  88.      */
  89.     private $commentaires;
  90.     /**
  91.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="clients")
  92.      */
  93.     private $user;
  94.  
  95.     /**
  96.      * @ORM\OneToMany(targetEntity=RetourClient::class, mappedBy="client")
  97.      */
  98.     private $retoursClient;
  99.     public function __construct()
  100.     {
  101.         $this->devisclient = new ArrayCollection();
  102.         $this->commentaires = new ArrayCollection();
  103.         $this->retoursClient = new ArrayCollection();
  104.     }
  105.     public function __toString()
  106.     {
  107.         if(is_null( $this->nom)) {
  108.             return 'NULL';
  109.         }
  110.        
  111.         return $this->nom;
  112.     }
  113.     
  114.     public function getId(): ?int
  115.     {
  116.         return $this->id;
  117.     }
  118.     public function getRaisonsociale(): ?string
  119.     {
  120.         return $this->raisonsociale;
  121.     }
  122.     public function setRaisonsociale(?string $raisonsociale): self
  123.     {
  124.         $this->raisonsociale = $raisonsociale;
  125.         return $this;
  126.     }
  127.     public function getSiret(): ?string
  128.     {
  129.         return $this->siret;
  130.     }
  131.     public function setSiret(?string $siret): self
  132.     {
  133.         $this->siret = $siret;
  134.         return $this;
  135.     }
  136.     public function getSiteweb(): ?string
  137.     {
  138.         return $this->siteweb;
  139.     }
  140.     public function setSiteweb(?string $siteweb): self
  141.     {
  142.         $this->siteweb = $siteweb;
  143.         return $this;
  144.     }
  145.     public function getTelephone(): ?string
  146.     {
  147.         return $this->telephone;
  148.     }
  149.     public function setTelephone(?string $telephone): self
  150.     {
  151.         $this->telephone = $telephone;
  152.         return $this;
  153.     }
  154.     public function getTva(): ?string
  155.     {
  156.         return $this->tva;
  157.     }
  158.     public function setTva(?string $tva): self
  159.     {
  160.         $this->tva = $tva;
  161.         return $this;
  162.     }
  163.     public function getCivilite(): ?string
  164.     {
  165.         return $this->civilite;
  166.     }
  167.     public function setCivilite(?string $civilite): self
  168.     {
  169.         $this->civilite = $civilite;
  170.         return $this;
  171.     }
  172.     public function getNom(): ?string
  173.     {
  174.         return $this->nom;
  175.     }
  176.     public function setNom(?string $nom): self
  177.     {
  178.         $this->nom = $nom;
  179.         return $this;
  180.     }
  181.     public function getPrenom(): ?string
  182.     {
  183.         return $this->prenom;
  184.     }
  185.     public function setPrenom(?string $prenom): self
  186.     {
  187.         $this->prenom = $prenom;
  188.         return $this;
  189.     }
  190.     public function getTelephonecontact(): ?string
  191.     {
  192.         return $this->telephonecontact;
  193.     }
  194.     public function setTelephonecontact(?string $telephonecontact): self
  195.     {
  196.         $this->telephonecontact = $telephonecontact;
  197.         return $this;
  198.     }
  199.     public function getMail(): ?string
  200.     {
  201.         return $this->mail;
  202.     }
  203.     public function setMail(?string $mail): self
  204.     {
  205.         $this->mail = $mail;
  206.         return $this;
  207.     }
  208.     public function getAdresse(): ?string
  209.     {
  210.         return $this->adresse;
  211.     }
  212.     public function setAdresse(?string $adresse): self
  213.     {
  214.         $this->adresse = $adresse;
  215.         return $this;
  216.     }
  217.     public function getComplementadresse(): ?string
  218.     {
  219.         return $this->complementadresse;
  220.     }
  221.     public function setComplementadresse(?string $complementadresse): self
  222.     {
  223.         $this->complementadresse = $complementadresse;
  224.         return $this;
  225.     }
  226.     public function getVille(): ?string
  227.     {
  228.         return $this->ville;
  229.     }
  230.     public function setVille(?string $ville): self
  231.     {
  232.         $this->ville = $ville;
  233.         return $this;
  234.     }
  235.     public function getCp(): ?string
  236.     {
  237.         return $this->cp;
  238.     }
  239.     public function setCp(?string $cp): self
  240.     {
  241.         $this->cp = $cp;
  242.         return $this;
  243.     }
  244.     public function getPays(): ?string
  245.     {
  246.         return $this->pays;
  247.     }
  248.     public function setPays(?string $pays): self
  249.     {
  250.         $this->pays = $pays;
  251.         return $this;
  252.     }
  253.     public function getCreeespaceclient(): ?string
  254.     {
  255.         return $this->creeespaceclient;
  256.     }
  257.     public function setCreeespaceclient(?string $creeespaceclient): self
  258.     {
  259.         $this->creeespaceclient = $creeespaceclient;
  260.         return $this;
  261.     }
  262.     /**
  263.      * @return Collection|Devis[]
  264.      */
  265.     public function getDevisclient(): Collection
  266.     {
  267.         return $this->devisclient;
  268.     }
  269.     public function addDevisclient(Devis $devisclient): self
  270.     {
  271.         if (!$this->devisclient->contains($devisclient)) {
  272.             $this->devisclient[] = $devisclient;
  273.             $devisclient->setClient($this);
  274.         }
  275.         return $this;
  276.     }
  277.     public function removeDevisclient(Devis $devisclient): self
  278.     {
  279.         if ($this->devisclient->removeElement($devisclient)) {
  280.             // set the owning side to null (unless already changed)
  281.             if ($devisclient->getClient() === $this) {
  282.                 $devisclient->setClient(null);
  283.             }
  284.         }
  285.         return $this;
  286.     }
  287.     /**
  288.      * @return Collection|Commentaire[]
  289.      */
  290.     public function getCommentaires(): Collection
  291.     {
  292.         return $this->commentaires;
  293.     }
  294.     public function addCommentaire(Commentaire $commentaire): self
  295.     {
  296.         if (!$this->commentaires->contains($commentaire)) {
  297.             $this->commentaires[] = $commentaire;
  298.             $commentaire->setClient($this);
  299.         }
  300.         return $this;
  301.     }
  302.     public function removeCommentaire(Commentaire $commentaire): self
  303.     {
  304.         if ($this->commentaires->removeElement($commentaire)) {
  305.             // set the owning side to null (unless already changed)
  306.             if ($commentaire->getClient() === $this) {
  307.                 $commentaire->setClient(null);
  308.             }
  309.         }
  310.         return $this;
  311.     }
  312.     public function getUser(): ?User
  313.     {
  314.         return $this->user;
  315.     }
  316.     public function setUser(?User $user): self
  317.     {
  318.         $this->user = $user;
  319.         return $this;
  320.     }
  321.     /**
  322.      * @return Collection<int, RetourClient>
  323.      */
  324.     public function getRetoursClient(): Collection
  325.     {
  326.         return $this->retoursClient;
  327.     }
  328.     public function addRetoursClient(RetourClient $retoursClient): self
  329.     {
  330.         if (!$this->retoursClient->contains($retoursClient)) {
  331.             $this->retoursClient[] = $retoursClient;
  332.             $retoursClient->setClient($this);
  333.         }
  334.         return $this;
  335.     }
  336.     public function removeRetoursClient(RetourClient $retoursClient): self
  337.     {
  338.         if ($this->retoursClient->removeElement($retoursClient)) {
  339.             // set the owning side to null (unless already changed)
  340.             if ($retoursClient->getClient() === $this) {
  341.                 $retoursClient->setClient(null);
  342.             }
  343.         }
  344.         return $this;
  345.     }
  346.     
  347.  
  348.  
  349. }