src/Entity/Modele.php line 13

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