<?php
namespace App\Entity;
use App\Repository\TypeVehiculeRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=TypeVehiculeRepository::class)
*/
class TypeVehicule
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $tv_libelle;
/**
* @ORM\Column(type="boolean")
*/
private $tv_moteur;
/**
* @ORM\Column(type="boolean")
*/
private $tv_md;
/**
* @ORM\Column(type="boolean")
*/
private $tv_ensemble;
/**
* @ORM\Column(type="boolean")
*/
private $tv_valide;
/**
* @ORM\ManyToOne(targetEntity=CentreType::class, inversedBy="typeVehicules", fetch="EAGER")
* @ORM\JoinColumn(nullable=false)
*/
private $tv_centre_type;
/**
* @ORM\OneToMany(targetEntity=CentrePrestation::class, mappedBy="pst_type_vehicule", fetch="EAGER")
*/
private $centrePrestations;
/**
* @ORM\OneToMany(targetEntity=RendezVousVehicule::class, mappedBy="type_vehicule")
*/
private $rendezVousVehicules;
/**
* @ORM\ManyToOne(targetEntity=CentreGroupe::class, inversedBy="typeVehicules")
* @ORM\JoinColumn(nullable=false)
*/
private $centre_groupe;
/**
* @ORM\Column(type="integer" , nullable=true)
*/
private $id_old;
public function __construct()
{
$this->centrePrestations = new ArrayCollection();
$this->rendezVousVehicules = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getTvLibelle(): ?string
{
return $this->tv_libelle;
}
public function setTvLibelle(string $tv_libelle): self
{
$this->tv_libelle = $tv_libelle;
return $this;
}
public function isTvMoteur(): ?bool
{
return $this->tv_moteur;
}
public function setTvMoteur(bool $tv_moteur): self
{
$this->tv_moteur = $tv_moteur;
return $this;
}
public function isTvMd(): ?bool
{
return $this->tv_md;
}
public function setTvMd(bool $tv_md): self
{
$this->tv_md = $tv_md;
return $this;
}
public function isTvEnsemble(): ?bool
{
return $this->tv_ensemble;
}
public function setTvEnsemble(bool $tv_ensemble): self
{
$this->tv_ensemble = $tv_ensemble;
return $this;
}
public function isTvValide(): ?bool
{
return $this->tv_valide;
}
public function setTvValide(bool $tv_valide): self
{
$this->tv_valide = $tv_valide;
return $this;
}
public function getTvCentreType(): ?CentreType
{
return $this->tv_centre_type;
}
public function setTvCentreType(?CentreType $tv_centre_type): self
{
$this->tv_centre_type = $tv_centre_type;
return $this;
}
/**
* @return Collection<int, CentrePrestation>
*/
public function getCentrePrestations(): Collection
{
return $this->centrePrestations;
}
public function addCentrePrestation(CentrePrestation $centrePrestation): self
{
if (!$this->centrePrestations->contains($centrePrestation)) {
$this->centrePrestations[] = $centrePrestation;
$centrePrestation->setPstTypeVehicule($this);
}
return $this;
}
public function removeCentrePrestation(CentrePrestation $centrePrestation): self
{
if ($this->centrePrestations->removeElement($centrePrestation)) {
// set the owning side to null (unless already changed)
if ($centrePrestation->getPstTypeVehicule() === $this) {
$centrePrestation->setPstTypeVehicule(null);
}
}
return $this;
}
/**
* @return Collection<int, RendezVousVehicule>
*/
public function getRendezVousVehicules(): Collection
{
return $this->rendezVousVehicules;
}
public function addRendezVousVehicule(RendezVousVehicule $rendezVousVehicule): self
{
if (!$this->rendezVousVehicules->contains($rendezVousVehicule)) {
$this->rendezVousVehicules[] = $rendezVousVehicule;
$rendezVousVehicule->setTypeVehicule($this);
}
return $this;
}
public function removeRendezVousVehicule(RendezVousVehicule $rendezVousVehicule): self
{
if ($this->rendezVousVehicules->removeElement($rendezVousVehicule)) {
// set the owning side to null (unless already changed)
if ($rendezVousVehicule->getTypeVehicule() === $this) {
$rendezVousVehicule->setTypeVehicule(null);
}
}
return $this;
}
public function getCentreGroupe(): ?CentreGroupe
{
return $this->centre_groupe;
}
public function setCentreGroupe(?CentreGroupe $centre_groupe): self
{
$this->centre_groupe = $centre_groupe;
return $this;
}
public function getIdOld(): ?int
{
return $this->id_old;
}
public function setIdOld(int $id_old): self
{
$this->id_old = $id_old;
return $this;
}
}