src/Entity/TypeVehicule.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\TypeVehiculeRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=TypeVehiculeRepository::class)
  9.  */
  10. class TypeVehicule
  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)
  20.      */
  21.     private $tv_libelle;
  22.     /**
  23.      * @ORM\Column(type="boolean")
  24.      */
  25.     private $tv_moteur;
  26.     /**
  27.      * @ORM\Column(type="boolean")
  28.      */
  29.     private $tv_md;
  30.     /**
  31.      * @ORM\Column(type="boolean")
  32.      */
  33.     private $tv_ensemble;
  34.     /**
  35.      * @ORM\Column(type="boolean")
  36.      */
  37.     private $tv_valide;
  38.     /**
  39.      * @ORM\ManyToOne(targetEntity=CentreType::class, inversedBy="typeVehicules", fetch="EAGER")
  40.      * @ORM\JoinColumn(nullable=false)
  41.      */
  42.     private $tv_centre_type;
  43.     /**
  44.      * @ORM\OneToMany(targetEntity=CentrePrestation::class, mappedBy="pst_type_vehicule", fetch="EAGER")
  45.      */
  46.     private $centrePrestations;
  47.     /**
  48.      * @ORM\OneToMany(targetEntity=RendezVousVehicule::class, mappedBy="type_vehicule")
  49.      */
  50.     private $rendezVousVehicules;
  51.     /**
  52.      * @ORM\ManyToOne(targetEntity=CentreGroupe::class, inversedBy="typeVehicules")
  53.      * @ORM\JoinColumn(nullable=false)
  54.      */
  55.     private $centre_groupe;
  56.     /**
  57.      * @ORM\Column(type="integer" , nullable=true)
  58.      */
  59.     private $id_old;
  60.     public function __construct()
  61.     {
  62.         $this->centrePrestations = new ArrayCollection();
  63.         $this->rendezVousVehicules = new ArrayCollection();
  64.     }
  65.     public function getId(): ?int
  66.     {
  67.         return $this->id;
  68.     }
  69.     public function getTvLibelle(): ?string
  70.     {
  71.         return $this->tv_libelle;
  72.     }
  73.     public function setTvLibelle(string $tv_libelle): self
  74.     {
  75.         $this->tv_libelle $tv_libelle;
  76.         return $this;
  77.     }
  78.     public function isTvMoteur(): ?bool
  79.     {
  80.         return $this->tv_moteur;
  81.     }
  82.     public function setTvMoteur(bool $tv_moteur): self
  83.     {
  84.         $this->tv_moteur $tv_moteur;
  85.         return $this;
  86.     }
  87.     public function isTvMd(): ?bool
  88.     {
  89.         return $this->tv_md;
  90.     }
  91.     public function setTvMd(bool $tv_md): self
  92.     {
  93.         $this->tv_md $tv_md;
  94.         return $this;
  95.     }
  96.     public function isTvEnsemble(): ?bool
  97.     {
  98.         return $this->tv_ensemble;
  99.     }
  100.     public function setTvEnsemble(bool $tv_ensemble): self
  101.     {
  102.         $this->tv_ensemble $tv_ensemble;
  103.         return $this;
  104.     }
  105.     public function isTvValide(): ?bool
  106.     {
  107.         return $this->tv_valide;
  108.     }
  109.     public function setTvValide(bool $tv_valide): self
  110.     {
  111.         $this->tv_valide $tv_valide;
  112.         return $this;
  113.     }
  114.     public function getTvCentreType(): ?CentreType
  115.     {
  116.         return $this->tv_centre_type;
  117.     }
  118.     public function setTvCentreType(?CentreType $tv_centre_type): self
  119.     {
  120.         $this->tv_centre_type $tv_centre_type;
  121.         return $this;
  122.     }
  123.     /**
  124.      * @return Collection<int, CentrePrestation>
  125.      */
  126.     public function getCentrePrestations(): Collection
  127.     {
  128.         return $this->centrePrestations;
  129.     }
  130.     public function addCentrePrestation(CentrePrestation $centrePrestation): self
  131.     {
  132.         if (!$this->centrePrestations->contains($centrePrestation)) {
  133.             $this->centrePrestations[] = $centrePrestation;
  134.             $centrePrestation->setPstTypeVehicule($this);
  135.         }
  136.         return $this;
  137.     }
  138.     public function removeCentrePrestation(CentrePrestation $centrePrestation): self
  139.     {
  140.         if ($this->centrePrestations->removeElement($centrePrestation)) {
  141.             // set the owning side to null (unless already changed)
  142.             if ($centrePrestation->getPstTypeVehicule() === $this) {
  143.                 $centrePrestation->setPstTypeVehicule(null);
  144.             }
  145.         }
  146.         return $this;
  147.     }
  148.     /**
  149.      * @return Collection<int, RendezVousVehicule>
  150.      */
  151.     public function getRendezVousVehicules(): Collection
  152.     {
  153.         return $this->rendezVousVehicules;
  154.     }
  155.     public function addRendezVousVehicule(RendezVousVehicule $rendezVousVehicule): self
  156.     {
  157.         if (!$this->rendezVousVehicules->contains($rendezVousVehicule)) {
  158.             $this->rendezVousVehicules[] = $rendezVousVehicule;
  159.             $rendezVousVehicule->setTypeVehicule($this);
  160.         }
  161.         return $this;
  162.     }
  163.     public function removeRendezVousVehicule(RendezVousVehicule $rendezVousVehicule): self
  164.     {
  165.         if ($this->rendezVousVehicules->removeElement($rendezVousVehicule)) {
  166.             // set the owning side to null (unless already changed)
  167.             if ($rendezVousVehicule->getTypeVehicule() === $this) {
  168.                 $rendezVousVehicule->setTypeVehicule(null);
  169.             }
  170.         }
  171.         return $this;
  172.     }
  173.     public function getCentreGroupe(): ?CentreGroupe
  174.     {
  175.         return $this->centre_groupe;
  176.     }
  177.     public function setCentreGroupe(?CentreGroupe $centre_groupe): self
  178.     {
  179.         $this->centre_groupe $centre_groupe;
  180.         return $this;
  181.     }
  182.     public function getIdOld(): ?int
  183.     {
  184.         return $this->id_old;
  185.     }
  186.     public function setIdOld(int $id_old): self
  187.     {
  188.         $this->id_old $id_old;
  189.         return $this;
  190.     }
  191. }