<?php
namespace App\Entity;
use App\Repository\CentreTypeRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=CentreTypeRepository::class)
*/
class CentreType
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=10)
*/
private $ct_denomination;
/**
* @ORM\Column(type="string", length=50)
*/
private $ct_libele_public;
/**
* @ORM\OneToMany(targetEntity=Rendezvous::class, mappedBy="centre_type")
*/
private $rendezvouses;
/**
* @ORM\OneToMany(targetEntity=Ligne::class, mappedBy="centre_type")
*/
private $lignes;
/**
* @ORM\OneToMany(targetEntity=TypeVehicule::class, mappedBy="tv_centre_type")
*/
private $typeVehicules;
/**
* @ORM\OneToMany(targetEntity=ClientCompte::class, mappedBy="centre_type")
*/
private $clientComptes;
/**
* @ORM\OneToMany(targetEntity=Centre::class, mappedBy="centre_type")
*/
private $centres;
public function __construct()
{
$this->rendezvouses = new ArrayCollection();
$this->lignes = new ArrayCollection();
$this->typeVehicules = new ArrayCollection();
$this->clientComptes = new ArrayCollection();
$this->centres = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getCtDenomination(): ?string
{
return $this->ct_denomination;
}
public function setCtDenomination(string $ct_denomination): self
{
$this->ct_denomination = $ct_denomination;
return $this;
}
public function getCtLibelePublic(): ?string
{
return $this->ct_libele_public;
}
public function setCtLibelePublic(string $ct_libele_public): self
{
$this->ct_libele_public = $ct_libele_public;
return $this;
}
/**
* @return Collection<int, Rendezvous>
*/
public function getRendezvouses(): Collection
{
return $this->rendezvouses;
}
public function addRendezvouse(Rendezvous $rendezvouse): self
{
if (!$this->rendezvouses->contains($rendezvouse)) {
$this->rendezvouses[] = $rendezvouse;
$rendezvouse->setCentreType($this);
}
return $this;
}
public function removeRendezvouse(Rendezvous $rendezvouse): self
{
if ($this->rendezvouses->removeElement($rendezvouse)) {
// set the owning side to null (unless already changed)
if ($rendezvouse->getCentreType() === $this) {
$rendezvouse->setCentreType(null);
}
}
return $this;
}
/**
* @return Collection<int, Ligne>
*/
public function getLignes(): Collection
{
return $this->lignes;
}
public function addLigne(Ligne $ligne): self
{
if (!$this->lignes->contains($ligne)) {
$this->lignes[] = $ligne;
$ligne->setCentreType($this);
}
return $this;
}
public function removeLigne(Ligne $ligne): self
{
if ($this->lignes->removeElement($ligne)) {
// set the owning side to null (unless already changed)
if ($ligne->getCentreType() === $this) {
$ligne->setCentreType(null);
}
}
return $this;
}
/**
* @return Collection<int, TypeVehicule>
*/
public function getTypeVehicules(): Collection
{
return $this->typeVehicules;
}
public function addTypeVehicule(TypeVehicule $typeVehicule): self
{
if (!$this->typeVehicules->contains($typeVehicule)) {
$this->typeVehicules[] = $typeVehicule;
$typeVehicule->setTvCentreType($this);
}
return $this;
}
public function removeTypeVehicule(TypeVehicule $typeVehicule): self
{
if ($this->typeVehicules->removeElement($typeVehicule)) {
// set the owning side to null (unless already changed)
if ($typeVehicule->getTvCentreType() === $this) {
$typeVehicule->setTvCentreType(null);
}
}
return $this;
}
/**
* @return Collection<int, ClientCompte>
*/
public function getClientComptes(): Collection
{
return $this->clientComptes;
}
public function addClientCompte(ClientCompte $clientCompte): self
{
if (!$this->clientComptes->contains($clientCompte)) {
$this->clientComptes[] = $clientCompte;
$clientCompte->setCentreType($this);
}
return $this;
}
public function removeClientCompte(ClientCompte $clientCompte): self
{
if ($this->clientComptes->removeElement($clientCompte)) {
// set the owning side to null (unless already changed)
if ($clientCompte->getCentreType() === $this) {
$clientCompte->setCentreType(null);
}
}
return $this;
}
/**
* @return Collection<int, Centre>
*/
public function getCentres(): Collection
{
return $this->centres;
}
public function addCentre(Centre $centre): self
{
if (!$this->centres->contains($centre)) {
$this->centres[] = $centre;
$centre->setCentreType($this);
}
return $this;
}
public function removeCentre(Centre $centre): self
{
if ($this->centres->removeElement($centre)) {
// set the owning side to null (unless already changed)
if ($centre->getCentreType() === $this) {
$centre->setCentreType(null);
}
}
return $this;
}
}