<?php
namespace App\Entity;
use App\Repository\CentrePrestationRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=CentrePrestationRepository::class)
*/
class CentrePrestation
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="float")
*/
private $pst_tarif;
/**
* @ORM\Column(type="integer")
*/
private $pst_duree;
/**
* @ORM\Column(type="boolean")
*/
private $pst_actif;
/**
* @ORM\Column(type="boolean")
*/
private $pst_afficher;
/**
* @ORM\Column(type="string", length=6, nullable=true)
*/
private $pst_couleur;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $pst_ordre;
/**
* @ORM\ManyToOne(targetEntity=TypeVehicule::class, inversedBy="centrePrestations", fetch="EAGER")
* @ORM\JoinColumn(nullable=false)
*/
private $pst_type_vehicule;
/**
* @ORM\OneToMany(targetEntity=RendezVousInfos::class, mappedBy="centre_prestation")
*/
private $rendezVousInfos;
/**
* @ORM\ManyToOne(targetEntity=TypeVisite::class, inversedBy="centrePrestations", fetch="EAGER")
* @ORM\JoinColumn(nullable=false)
*/
private $pst_type_visite;
/**
* @ORM\ManyToOne(targetEntity=CentreGroupe::class, inversedBy="centrePrestations")
* @ORM\JoinColumn(nullable=false)
*/
private $centre_groupe;
/**
* @ORM\ManyToMany(targetEntity=CentreCouponPromotion::class, mappedBy="centre_coupon_promotion_prestation")
*/
private $centreCouponPromotions;
/**
* @ORM\ManyToMany(targetEntity=Promotion::class, inversedBy="centrePrestations")
*/
private $promotion_prestation;
/**
* @ORM\OneToMany(targetEntity=CentrePartenaire::class, mappedBy="prestation", orphanRemoval=true)
*/
private $centrePartenaires;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $id_old;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $paiementEnLigne;
/**
* @ORM\Column(type="boolean")
*/
private $messageAppelCentre = 0;
/**
* @ORM\ManyToMany(targetEntity=Ligne::class, mappedBy="prestations")
*/
private $lignes;
/**
* @ORM\ManyToMany(targetEntity=Energie::class, cascade={"remove"}, fetch="EAGER")
*/
private $energie;
public function __construct()
{
$this->rendezVousInfos = new ArrayCollection();
$this->centreCouponPromotions = new ArrayCollection();
$this->promotion_prestation = new ArrayCollection();
$this->centrePartenaires = new ArrayCollection();
$this->lignes = new ArrayCollection();
$this->energie = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getPstTarif(): ?float
{
return $this->pst_tarif;
}
public function setPstTarif(float $pst_tarif): self
{
$this->pst_tarif = $pst_tarif;
return $this;
}
public function getPstDuree(): ?int
{
return $this->pst_duree;
}
public function setPstDuree(int $pst_duree): self
{
$this->pst_duree = $pst_duree;
return $this;
}
public function isPstActif(): ?bool
{
return $this->pst_actif;
}
public function setPstActif(bool $pst_actif): self
{
$this->pst_actif = $pst_actif;
return $this;
}
public function isPstAfficher(): ?bool
{
return $this->pst_afficher;
}
public function setPstAfficher(bool $pst_afficher): self
{
$this->pst_afficher = $pst_afficher;
return $this;
}
public function getPstCouleur(): ?string
{
return $this->pst_couleur;
}
public function setPstCouleur(?string $pst_couleur): self
{
$this->pst_couleur = $pst_couleur;
return $this;
}
public function getPstOrdre(): ?int
{
return $this->pst_ordre;
}
public function setPstOrdre(?int $pst_ordre): self
{
$this->pst_ordre = $pst_ordre;
return $this;
}
public function getPstTypeVehicule(): ?TypeVehicule
{
return $this->pst_type_vehicule;
}
public function setPstTypeVehicule(?TypeVehicule $pst_type_vehicule): self
{
$this->pst_type_vehicule = $pst_type_vehicule;
return $this;
}
/**
* @return Collection<int, RendezVousInfos>
*/
public function getRendezVousInfos(): Collection
{
return $this->rendezVousInfos;
}
public function addRendezVousInfo(RendezVousInfos $rendezVousInfo): self
{
if (!$this->rendezVousInfos->contains($rendezVousInfo)) {
$this->rendezVousInfos[] = $rendezVousInfo;
$rendezVousInfo->setCentrePrestation($this);
}
return $this;
}
public function removeRendezVousInfo(RendezVousInfos $rendezVousInfo): self
{
if ($this->rendezVousInfos->removeElement($rendezVousInfo)) {
// set the owning side to null (unless already changed)
if ($rendezVousInfo->getCentrePrestation() === $this) {
$rendezVousInfo->setCentrePrestation(null);
}
}
return $this;
}
public function getPstTypeVisite(): ?TypeVisite
{
return $this->pst_type_visite;
}
public function setPstTypeVisite(?TypeVisite $pst_type_visite): self
{
$this->pst_type_visite = $pst_type_visite;
return $this;
}
public function getCentreGroupe(): ?CentreGroupe
{
return $this->centre_groupe;
}
public function setCentreGroupe(?CentreGroupe $centre_groupe): self
{
$this->centre_groupe = $centre_groupe;
return $this;
}
/**
* @return Collection<int, CentreCouponPromotion>
*/
public function getCentreCouponPromotions(): Collection
{
return $this->centreCouponPromotions;
}
public function addCentreCouponPromotion(CentreCouponPromotion $centreCouponPromotion): self
{
if (!$this->centreCouponPromotions->contains($centreCouponPromotion)) {
$this->centreCouponPromotions[] = $centreCouponPromotion;
$centreCouponPromotion->addCentreCouponPromotionPrestation($this);
}
return $this;
}
public function removeCentreCouponPromotion(CentreCouponPromotion $centreCouponPromotion): self
{
if ($this->centreCouponPromotions->removeElement($centreCouponPromotion)) {
$centreCouponPromotion->removeCentreCouponPromotionPrestation($this);
}
return $this;
}
/**
* @return Collection<int, Promotion>
*/
public function getPromotionPrestation(): Collection
{
return $this->promotion_prestation;
}
public function addPromotionPrestation(Promotion $promotionPrestation): self
{
if (!$this->promotion_prestation->contains($promotionPrestation)) {
$this->promotion_prestation[] = $promotionPrestation;
}
return $this;
}
public function removePromotionPrestation(Promotion $promotionPrestation): self
{
$this->promotion_prestation->removeElement($promotionPrestation);
return $this;
}
/**
* @return Collection<int, CentrePartenaire>
*/
public function getCentrePartenaires(): Collection
{
return $this->centrePartenaires;
}
public function addCentrePartenaire(CentrePartenaire $centrePartenaire): self
{
if (!$this->centrePartenaires->contains($centrePartenaire)) {
$this->centrePartenaires[] = $centrePartenaire;
$centrePartenaire->setPrestation($this);
}
return $this;
}
public function removeCentrePartenaire(CentrePartenaire $centrePartenaire): self
{
if ($this->centrePartenaires->removeElement($centrePartenaire)) {
// set the owning side to null (unless already changed)
if ($centrePartenaire->getPrestation() === $this) {
$centrePartenaire->setPrestation(null);
}
}
return $this;
}
public function getIdOld(): ?int
{
return $this->id_old;
}
public function setIdOld(int $idold): self
{
$this->id_old = $idold;
return $this;
}
public function isPaiementEnLigne(): ?bool
{
return $this->paiementEnLigne;
}
public function setPaiementEnLigne(?bool $paiementEnLigne): self
{
$this->paiementEnLigne = $paiementEnLigne;
return $this;
}
public function isMessageAppelCentre(): ?bool
{
return $this->messageAppelCentre;
}
public function setMessageAppelCentre(bool $messageAppelCentre): self
{
$this->messageAppelCentre = $messageAppelCentre;
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->addPrestation($this);
}
return $this;
}
public function removeLigne(Ligne $ligne): self
{
if ($this->lignes->removeElement($ligne)) {
$ligne->removePrestation($this);
}
return $this;
}
/**
* @return Collection<int, Energie>
*/
public function getEnergie(): Collection
{
return $this->energie;
}
public function addEnergie(Energie $energie): self
{
if (!$this->energie->contains($energie)) {
$this->energie[] = $energie;
}
return $this;
}
public function removeEnergie(Energie $energie): self
{
$this->energie->removeElement($energie);
return $this;
}
}