src/Entity/CentrePrestation.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CentrePrestationRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=CentrePrestationRepository::class)
  9.  */
  10. class CentrePrestation
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="float")
  20.      */
  21.     private $pst_tarif;
  22.     /**
  23.      * @ORM\Column(type="integer")
  24.      */
  25.     private $pst_duree;
  26.     /**
  27.      * @ORM\Column(type="boolean")
  28.      */
  29.     private $pst_actif;
  30.     /**
  31.      * @ORM\Column(type="boolean")
  32.      */
  33.     private $pst_afficher;
  34.     /**
  35.      * @ORM\Column(type="string", length=6, nullable=true)
  36.      */
  37.     private $pst_couleur;
  38.     /**
  39.      * @ORM\Column(type="integer", nullable=true)
  40.      */
  41.     private $pst_ordre;
  42.     /**
  43.      * @ORM\ManyToOne(targetEntity=TypeVehicule::class, inversedBy="centrePrestations", fetch="EAGER")
  44.      * @ORM\JoinColumn(nullable=false)
  45.      */
  46.     private $pst_type_vehicule;
  47.     /**
  48.      * @ORM\OneToMany(targetEntity=RendezVousInfos::class, mappedBy="centre_prestation")
  49.      */
  50.     private $rendezVousInfos;
  51.     /**
  52.      * @ORM\ManyToOne(targetEntity=TypeVisite::class, inversedBy="centrePrestations", fetch="EAGER")
  53.      * @ORM\JoinColumn(nullable=false)
  54.      */
  55.     private $pst_type_visite;
  56.     /**
  57.      * @ORM\ManyToOne(targetEntity=CentreGroupe::class, inversedBy="centrePrestations")
  58.      * @ORM\JoinColumn(nullable=false)
  59.      */
  60.     private $centre_groupe;
  61.     /**
  62.      * @ORM\ManyToMany(targetEntity=CentreCouponPromotion::class, mappedBy="centre_coupon_promotion_prestation")
  63.      */
  64.     private $centreCouponPromotions;
  65.     /**
  66.      * @ORM\ManyToMany(targetEntity=Promotion::class, inversedBy="centrePrestations")
  67.      */
  68.     private $promotion_prestation;
  69.     /**
  70.      * @ORM\OneToMany(targetEntity=CentrePartenaire::class, mappedBy="prestation", orphanRemoval=true)
  71.      */
  72.     private $centrePartenaires;
  73.     /**
  74.      * @ORM\Column(type="integer",  nullable=true)
  75.      */
  76.     private $id_old;
  77.     /**
  78.      * @ORM\Column(type="boolean", nullable=true)
  79.      */
  80.     private $paiementEnLigne;
  81.     /**
  82.      * @ORM\Column(type="boolean")
  83.      */
  84.     private $messageAppelCentre 0;
  85.     /**
  86.      * @ORM\ManyToMany(targetEntity=Ligne::class, mappedBy="prestations")
  87.      */
  88.     private $lignes;
  89.     /**
  90.      * @ORM\ManyToMany(targetEntity=Energie::class, cascade={"remove"}, fetch="EAGER")
  91.      */
  92.     private $energie;
  93.     public function __construct()
  94.     {
  95.         $this->rendezVousInfos = new ArrayCollection();
  96.         $this->centreCouponPromotions = new ArrayCollection();
  97.         $this->promotion_prestation = new ArrayCollection();
  98.         $this->centrePartenaires = new ArrayCollection();
  99.         $this->lignes = new ArrayCollection();
  100.         $this->energie = new ArrayCollection();
  101.     }
  102.     public function getId(): ?int
  103.     {
  104.         return $this->id;
  105.     }
  106.     public function getPstTarif(): ?float
  107.     {
  108.         return $this->pst_tarif;
  109.     }
  110.     public function setPstTarif(float $pst_tarif): self
  111.     {
  112.         $this->pst_tarif $pst_tarif;
  113.         return $this;
  114.     }
  115.     public function getPstDuree(): ?int
  116.     {
  117.         return $this->pst_duree;
  118.     }
  119.     public function setPstDuree(int $pst_duree): self
  120.     {
  121.         $this->pst_duree $pst_duree;
  122.         return $this;
  123.     }
  124.     public function isPstActif(): ?bool
  125.     {
  126.         return $this->pst_actif;
  127.     }
  128.     public function setPstActif(bool $pst_actif): self
  129.     {
  130.         $this->pst_actif $pst_actif;
  131.         return $this;
  132.     }
  133.     public function isPstAfficher(): ?bool
  134.     {
  135.         return $this->pst_afficher;
  136.     }
  137.     public function setPstAfficher(bool $pst_afficher): self
  138.     {
  139.         $this->pst_afficher $pst_afficher;
  140.         return $this;
  141.     }
  142.     public function getPstCouleur(): ?string
  143.     {
  144.         return $this->pst_couleur;
  145.     }
  146.     public function setPstCouleur(?string $pst_couleur): self
  147.     {
  148.         $this->pst_couleur $pst_couleur;
  149.         return $this;
  150.     }
  151.     public function getPstOrdre(): ?int
  152.     {
  153.         return $this->pst_ordre;
  154.     }
  155.     public function setPstOrdre(?int $pst_ordre): self
  156.     {
  157.         $this->pst_ordre $pst_ordre;
  158.         return $this;
  159.     }
  160.     public function getPstTypeVehicule(): ?TypeVehicule
  161.     {
  162.         return $this->pst_type_vehicule;
  163.     }
  164.     public function setPstTypeVehicule(?TypeVehicule $pst_type_vehicule): self
  165.     {
  166.         $this->pst_type_vehicule $pst_type_vehicule;
  167.         return $this;
  168.     }
  169.     /**
  170.      * @return Collection<int, RendezVousInfos>
  171.      */
  172.     public function getRendezVousInfos(): Collection
  173.     {
  174.         return $this->rendezVousInfos;
  175.     }
  176.     public function addRendezVousInfo(RendezVousInfos $rendezVousInfo): self
  177.     {
  178.         if (!$this->rendezVousInfos->contains($rendezVousInfo)) {
  179.             $this->rendezVousInfos[] = $rendezVousInfo;
  180.             $rendezVousInfo->setCentrePrestation($this);
  181.         }
  182.         return $this;
  183.     }
  184.     public function removeRendezVousInfo(RendezVousInfos $rendezVousInfo): self
  185.     {
  186.         if ($this->rendezVousInfos->removeElement($rendezVousInfo)) {
  187.             // set the owning side to null (unless already changed)
  188.             if ($rendezVousInfo->getCentrePrestation() === $this) {
  189.                 $rendezVousInfo->setCentrePrestation(null);
  190.             }
  191.         }
  192.         return $this;
  193.     }
  194.     public function getPstTypeVisite(): ?TypeVisite
  195.     {
  196.         return $this->pst_type_visite;
  197.     }
  198.     public function setPstTypeVisite(?TypeVisite $pst_type_visite): self
  199.     {
  200.         $this->pst_type_visite $pst_type_visite;
  201.         return $this;
  202.     }
  203.     public function getCentreGroupe(): ?CentreGroupe
  204.     {
  205.         return $this->centre_groupe;
  206.     }
  207.     public function setCentreGroupe(?CentreGroupe $centre_groupe): self
  208.     {
  209.         $this->centre_groupe $centre_groupe;
  210.         return $this;
  211.     }
  212.     /**
  213.      * @return Collection<int, CentreCouponPromotion>
  214.      */
  215.     public function getCentreCouponPromotions(): Collection
  216.     {
  217.         return $this->centreCouponPromotions;
  218.     }
  219.     public function addCentreCouponPromotion(CentreCouponPromotion $centreCouponPromotion): self
  220.     {
  221.         if (!$this->centreCouponPromotions->contains($centreCouponPromotion)) {
  222.             $this->centreCouponPromotions[] = $centreCouponPromotion;
  223.             $centreCouponPromotion->addCentreCouponPromotionPrestation($this);
  224.         }
  225.         return $this;
  226.     }
  227.     public function removeCentreCouponPromotion(CentreCouponPromotion $centreCouponPromotion): self
  228.     {
  229.         if ($this->centreCouponPromotions->removeElement($centreCouponPromotion)) {
  230.             $centreCouponPromotion->removeCentreCouponPromotionPrestation($this);
  231.         }
  232.         return $this;
  233.     }
  234.     /**
  235.      * @return Collection<int, Promotion>
  236.      */
  237.     public function getPromotionPrestation(): Collection
  238.     {
  239.         return $this->promotion_prestation;
  240.     }
  241.     public function addPromotionPrestation(Promotion $promotionPrestation): self
  242.     {
  243.         if (!$this->promotion_prestation->contains($promotionPrestation)) {
  244.             $this->promotion_prestation[] = $promotionPrestation;
  245.         }
  246.         return $this;
  247.     }
  248.     public function removePromotionPrestation(Promotion $promotionPrestation): self
  249.     {
  250.         $this->promotion_prestation->removeElement($promotionPrestation);
  251.         return $this;
  252.     }
  253.     /**
  254.      * @return Collection<int, CentrePartenaire>
  255.      */
  256.     public function getCentrePartenaires(): Collection
  257.     {
  258.         return $this->centrePartenaires;
  259.     }
  260.     public function addCentrePartenaire(CentrePartenaire $centrePartenaire): self
  261.     {
  262.         if (!$this->centrePartenaires->contains($centrePartenaire)) {
  263.             $this->centrePartenaires[] = $centrePartenaire;
  264.             $centrePartenaire->setPrestation($this);
  265.         }
  266.         return $this;
  267.     }
  268.     public function removeCentrePartenaire(CentrePartenaire $centrePartenaire): self
  269.     {
  270.         if ($this->centrePartenaires->removeElement($centrePartenaire)) {
  271.             // set the owning side to null (unless already changed)
  272.             if ($centrePartenaire->getPrestation() === $this) {
  273.                 $centrePartenaire->setPrestation(null);
  274.             }
  275.         }
  276.         return $this;
  277.     }
  278.     public function getIdOld(): ?int
  279.     {
  280.         return $this->id_old;
  281.     }
  282.     public function setIdOld(int $idold): self
  283.     {
  284.         $this->id_old $idold;
  285.         return $this;
  286.     }
  287.     public function isPaiementEnLigne(): ?bool
  288.     {
  289.         return $this->paiementEnLigne;
  290.     }
  291.     public function setPaiementEnLigne(?bool $paiementEnLigne): self
  292.     {
  293.         $this->paiementEnLigne $paiementEnLigne;
  294.         return $this;
  295.     }
  296.     public function isMessageAppelCentre(): ?bool
  297.     {
  298.         return $this->messageAppelCentre;
  299.     }
  300.     public function setMessageAppelCentre(bool $messageAppelCentre): self
  301.     {
  302.         $this->messageAppelCentre $messageAppelCentre;
  303.         return $this;
  304.     }
  305.     /**
  306.      * @return Collection<int, Ligne>
  307.      */
  308.     public function getLignes(): Collection
  309.     {
  310.         return $this->lignes;
  311.     }
  312.     public function addLigne(Ligne $ligne): self
  313.     {
  314.         if (!$this->lignes->contains($ligne)) {
  315.             $this->lignes[] = $ligne;
  316.             $ligne->addPrestation($this);
  317.         }
  318.         return $this;
  319.     }
  320.     public function removeLigne(Ligne $ligne): self
  321.     {
  322.         if ($this->lignes->removeElement($ligne)) {
  323.             $ligne->removePrestation($this);
  324.         }
  325.         return $this;
  326.     }
  327.     /**
  328.      * @return Collection<int, Energie>
  329.      */
  330.     public function getEnergie(): Collection
  331.     {
  332.         return $this->energie;
  333.     }
  334.     public function addEnergie(Energie $energie): self
  335.     {
  336.         if (!$this->energie->contains($energie)) {
  337.             $this->energie[] = $energie;
  338.         }
  339.         return $this;
  340.     }
  341.     public function removeEnergie(Energie $energie): self
  342.     {
  343.         $this->energie->removeElement($energie);
  344.         return $this;
  345.     }
  346. }