src/Entity/Marque.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\MarqueRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=MarqueRepository::class)
  9.  */
  10. class Marque
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=30)
  20.      */
  21.     private $marque_libele;
  22.     /**
  23.      * @ORM\OneToMany(targetEntity=Modele::class, mappedBy="code_marque")
  24.      */
  25.     private $modeles;
  26.     /**
  27.      * @ORM\OneToMany(targetEntity=RendezVousVehicule::class, mappedBy="marque")
  28.      */
  29.     private $rendezVousVehicules;
  30.     /**
  31.      * @ORM\Column(type="string", length=255)
  32.      */
  33.     private $id_old;
  34.     /**
  35.      * @ORM\Column(type="integer", nullable=true)
  36.      */
  37.     private $ordre;
  38.     public function __construct()
  39.     {
  40.         $this->modeles = new ArrayCollection();
  41.         $this->rendezVousVehicules = new ArrayCollection();
  42.     }
  43.     public function getId(): ?int
  44.     {
  45.         return $this->id;
  46.     }
  47.     public function getMarqueLibele(): ?string
  48.     {
  49.         return $this->marque_libele;
  50.     }
  51.     public function setMarqueLibele(string $marque_libele): self
  52.     {
  53.         $this->marque_libele $marque_libele;
  54.         return $this;
  55.     }
  56.     /**
  57.      * @return Collection<int, Modele>
  58.      */
  59.     public function getModeles(): Collection
  60.     {
  61.         return $this->modeles;
  62.     }
  63.     public function addModele(Modele $modele): self
  64.     {
  65.         if (!$this->modeles->contains($modele)) {
  66.             $this->modeles[] = $modele;
  67.             $modele->setCodeMarque($this);
  68.         }
  69.         return $this;
  70.     }
  71.     public function removeModele(Modele $modele): self
  72.     {
  73.         if ($this->modeles->removeElement($modele)) {
  74.             // set the owning side to null (unless already changed)
  75.             if ($modele->getCodeMarque() === $this) {
  76.                 $modele->setCodeMarque(null);
  77.             }
  78.         }
  79.         return $this;
  80.     }
  81.     /**
  82.      * @return Collection<int, RendezVousVehicule>
  83.      */
  84.     public function getRendezVousVehicules(): Collection
  85.     {
  86.         return $this->rendezVousVehicules;
  87.     }
  88.     public function addRendezVousVehicule(RendezVousVehicule $rendezVousVehicule): self
  89.     {
  90.         if (!$this->rendezVousVehicules->contains($rendezVousVehicule)) {
  91.             $this->rendezVousVehicules[] = $rendezVousVehicule;
  92.             $rendezVousVehicule->setMarque($this);
  93.         }
  94.         return $this;
  95.     }
  96.     public function removeRendezVousVehicule(RendezVousVehicule $rendezVousVehicule): self
  97.     {
  98.         if ($this->rendezVousVehicules->removeElement($rendezVousVehicule)) {
  99.             // set the owning side to null (unless already changed)
  100.             if ($rendezVousVehicule->getMarque() === $this) {
  101.                 $rendezVousVehicule->setMarque(null);
  102.             }
  103.         }
  104.         return $this;
  105.     }
  106.     public function getIdOld(): ?string
  107.     {
  108.         return $this->id_old;
  109.     }
  110.     public function setIdOld(string $id_old): self
  111.     {
  112.         $this->id_old $id_old;
  113.         return $this;
  114.     }
  115.     public function getOrdre(): ?int
  116.     {
  117.         return $this->ordre;
  118.     }
  119.     public function setOrdre(?int $ordre): self
  120.     {
  121.         $this->ordre $ordre;
  122.         return $this;
  123.     }
  124. }