src/Entity/Vendeur.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\VendeurRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassVendeurRepository::class)]
  8. class Vendeur
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\Column(length255nullabletrue)]
  15.     private ?string $nomvendeur null;
  16.     #[ORM\Column(length255nullabletrue)]
  17.     private ?string $adresse null;
  18.     #[ORM\Column(length255nullabletrue)]
  19.     private ?string $tel1 null;
  20.     #[ORM\Column(length255nullabletrue)]
  21.     private ?string $tel2 null;
  22.     #[ORM\Column(length255nullabletrue)]
  23.     private ?string $rc null;
  24.     #[ORM\Column(length255nullabletrue)]
  25.     private ?string $mf null;
  26.     #[ORM\OneToMany(mappedBy'vendeurs'targetEntityDevis::class, cascade: ["remove"])]
  27.     private Collection $devis;
  28.     #[ORM\OneToMany(mappedBy'vendeurs'targetEntityBondesortie::class)]
  29.     private Collection $bondesorties;
  30.     public function __construct()
  31.     {
  32.         $this->devis = new ArrayCollection();
  33.         $this->bondesorties = new ArrayCollection();
  34.     }
  35.     public function __toString()
  36.     {
  37.         return $this->getNomvendeur(); // Remplacez "getName()" par la méthode ou la propriété appropriée
  38.     }
  39.     public function getId(): ?int
  40.     {
  41.         return $this->id;
  42.     }
  43.     public function getNomvendeur(): ?string
  44.     {
  45.         return $this->nomvendeur;
  46.     }
  47.     public function setNomvendeur(?string $nomvendeur): self
  48.     {
  49.         $this->nomvendeur $nomvendeur;
  50.         return $this;
  51.     }
  52.     public function getAdresse(): ?string
  53.     {
  54.         return $this->adresse;
  55.     }
  56.     public function setAdresse(?string $adresse): self
  57.     {
  58.         $this->adresse $adresse;
  59.         return $this;
  60.     }
  61.     public function getTel1(): ?string
  62.     {
  63.         return $this->tel1;
  64.     }
  65.     public function setTel1(?string $tel1): self
  66.     {
  67.         $this->tel1 $tel1;
  68.         return $this;
  69.     }
  70.     public function getTel2(): ?string
  71.     {
  72.         return $this->tel2;
  73.     }
  74.     public function setTel2(?string $tel2): self
  75.     {
  76.         $this->tel2 $tel2;
  77.         return $this;
  78.     }
  79.     public function getRc(): ?string
  80.     {
  81.         return $this->rc;
  82.     }
  83.     public function setRc(?string $rc): self
  84.     {
  85.         $this->rc $rc;
  86.         return $this;
  87.     }
  88.     public function getMf(): ?string
  89.     {
  90.         return $this->mf;
  91.     }
  92.     public function setMf(?string $mf): self
  93.     {
  94.         $this->mf $mf;
  95.         return $this;
  96.     }
  97.     /**
  98.      * @return Collection<int, Devis>
  99.      */
  100.     public function getDevis(): Collection
  101.     {
  102.         return $this->devis;
  103.     }
  104.     public function addDevi(Devis $devi): self
  105.     {
  106.         if (!$this->devis->contains($devi)) {
  107.             $this->devis->add($devi);
  108.             $devi->setVendeurs($this);
  109.         }
  110.         return $this;
  111.     }
  112.     public function removeDevi(Devis $devi): self
  113.     {
  114.         if ($this->devis->removeElement($devi)) {
  115.             // set the owning side to null (unless already changed)
  116.             if ($devi->getVendeurs() === $this) {
  117.                 $devi->setVendeurs(null);
  118.             }
  119.         }
  120.         return $this;
  121.     }
  122.     /**
  123.      * @return Collection<int, Bondesortie>
  124.      */
  125.     public function getBondesorties(): Collection
  126.     {
  127.         return $this->bondesorties;
  128.     }
  129.     public function addBondesorty(Bondesortie $bondesorty): self
  130.     {
  131.         if (!$this->bondesorties->contains($bondesorty)) {
  132.             $this->bondesorties->add($bondesorty);
  133.             $bondesorty->setVendeurs($this);
  134.         }
  135.         return $this;
  136.     }
  137.     public function removeBondesorty(Bondesortie $bondesorty): self
  138.     {
  139.         if ($this->bondesorties->removeElement($bondesorty)) {
  140.             // set the owning side to null (unless already changed)
  141.             if ($bondesorty->getVendeurs() === $this) {
  142.                 $bondesorty->setVendeurs(null);
  143.             }
  144.         }
  145.         return $this;
  146.     }
  147. }