src/Entity/CentreCouponPromotion.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CentreCouponPromotionRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. /**
  9.  * @ORM\Entity(repositoryClass=CentreCouponPromotionRepository::class)
  10.  */
  11. class CentreCouponPromotion
  12. {
  13.     /**
  14.      * @ORM\Id
  15.      * @ORM\GeneratedValue
  16.      * @ORM\Column(type="integer")
  17.      */
  18.     private $id;
  19.     /**
  20.      * @ORM\Column(type="string", length=100)
  21.      */
  22.     private $cpn_prm_libelle;
  23.     /**
  24.      * @ORM\Column(type="integer")
  25.      */
  26.     private $cpn_prm_montant_remise;
  27.     /**
  28.      * @ORM\Column(type="integer", nullable=true)
  29.      */
  30.     private $cpn_prm_nbr_utilisation;
  31.     /**
  32.      * @ORM\Column(type="date", nullable=true)
  33.      */
  34.     private $cpn_prm_date_limite;
  35.     /**
  36.      * @ORM\Column(type="boolean")
  37.      */
  38.     private $cpn_prm_illimite;
  39.     /**
  40.      * @ORM\ManyToOne(targetEntity=CentreGroupe::class, inversedBy="centreCouponPromotions")
  41.      * @ORM\JoinColumn(nullable=false)
  42.      */
  43.     private $centre_groupe;
  44.     /**
  45.      * @ORM\ManyToMany(targetEntity=CentrePrestation::class, inversedBy="centreCouponPromotions", fetch="EAGER")
  46.      */
  47.     private $centre_coupon_promotion_prestation;
  48.     /**
  49.      * @ORM\Column(type="integer", nullable=true)
  50.      */
  51.     private $id_old;
  52.     /**
  53.      * @ORM\Column(type="boolean")
  54.      */
  55.     private $cpn_type_reduction;
  56.     /**
  57.      * @ORM\OneToMany(targetEntity=Rendezvous::class, mappedBy="couponPromotion")
  58.      */
  59.     private $rendezvouses;
  60.     public function __construct()
  61.     {
  62.         $this->centre_coupon_promotion_prestation = new ArrayCollection();
  63.         $this->rendezvouses = new ArrayCollection();
  64.     }
  65.     public function getId(): ?int
  66.     {
  67.         return $this->id;
  68.     }
  69.     public function getCpnPrmLibelle(): ?string
  70.     {
  71.         return $this->cpn_prm_libelle;
  72.     }
  73.     public function setCpnPrmLibelle(string $cpn_prm_libelle): self
  74.     {
  75.         $this->cpn_prm_libelle $cpn_prm_libelle;
  76.         return $this;
  77.     }
  78.     public function getCpnPrmMontantRemise(): ?int
  79.     {
  80.         return $this->cpn_prm_montant_remise;
  81.     }
  82.     public function setCpnPrmMontantRemise(int $cpn_prm_montant_remise): self
  83.     {
  84.         $this->cpn_prm_montant_remise $cpn_prm_montant_remise;
  85.         return $this;
  86.     }
  87.     public function getCpnPrmNbrUtilisation(): ?int
  88.     {
  89.         return $this->cpn_prm_nbr_utilisation;
  90.     }
  91.     public function setCpnPrmNbrUtilisation(?int $cpn_prm_nbr_utilisation): self
  92.     {
  93.         $this->cpn_prm_nbr_utilisation $cpn_prm_nbr_utilisation;
  94.         return $this;
  95.     }
  96.     public function getCpnPrmDateLimite(): ?\DateTimeInterface
  97.     {
  98.         return $this->cpn_prm_date_limite;
  99.     }
  100.     public function setCpnPrmDateLimite(?\DateTimeInterface $cpn_prm_date_limite): self
  101.     {
  102.         $this->cpn_prm_date_limite $cpn_prm_date_limite;
  103.         return $this;
  104.     }
  105.     public function isCpnPrmIllimite(): ?bool
  106.     {
  107.         return $this->cpn_prm_illimite;
  108.     }
  109.     public function setCpnPrmIllimite(bool $cpn_prm_illimite): self
  110.     {
  111.         $this->cpn_prm_illimite $cpn_prm_illimite;
  112.         return $this;
  113.     }
  114.     public function getCentreGroupe(): ?CentreGroupe
  115.     {
  116.         return $this->centre_groupe;
  117.     }
  118.     public function setCentreGroupe(?CentreGroupe $centre_groupe): self
  119.     {
  120.         $this->centre_groupe $centre_groupe;
  121.         return $this;
  122.     }
  123.     /**
  124.      * @return Collection<int, CentrePrestation>
  125.      */
  126.     public function getCentreCouponPromotionPrestation(): Collection
  127.     {
  128.         return $this->centre_coupon_promotion_prestation;
  129.     }
  130.     public function addCentreCouponPromotionPrestation(CentrePrestation $centreCouponPromotionPrestation): self
  131.     {
  132.         if (!$this->centre_coupon_promotion_prestation->contains($centreCouponPromotionPrestation)) {
  133.             $this->centre_coupon_promotion_prestation[] = $centreCouponPromotionPrestation;
  134.         }
  135.         return $this;
  136.     }
  137.     public function removeCentreCouponPromotionPrestation(CentrePrestation $centreCouponPromotionPrestation): self
  138.     {
  139.         $this->centre_coupon_promotion_prestation->removeElement($centreCouponPromotionPrestation);
  140.         return $this;
  141.     }
  142.     public function getIdOld(): ?int
  143.     {
  144.         return $this->id_old;
  145.     }
  146.     public function setIdOld(int $id_old): self
  147.     {
  148.         $this->id_old $id_old;
  149.         return $this;
  150.     }
  151.     public function isCpnTypeReduction(): ?bool
  152.     {
  153.         return $this->cpn_type_reduction;
  154.     }
  155.     public function setCpnTypeReduction(bool $cpn_type_reduction): self
  156.     {
  157.         $this->cpn_type_reduction $cpn_type_reduction;
  158.         return $this;
  159.     }
  160.     /**
  161.      * @return Collection<int, Rendezvous>
  162.      */
  163.     public function getRendezvouses(): Collection
  164.     {
  165.         return $this->rendezvouses;
  166.     }
  167.     public function addRendezvouse(Rendezvous $rendezvouse): self
  168.     {
  169.         if (!$this->rendezvouses->contains($rendezvouse)) {
  170.             $this->rendezvouses[] = $rendezvouse;
  171.             $rendezvouse->setCouponPromotion($this);
  172.         }
  173.         return $this;
  174.     }
  175.     public function removeRendezvouse(Rendezvous $rendezvouse): self
  176.     {
  177.         if ($this->rendezvouses->removeElement($rendezvouse)) {
  178.             // set the owning side to null (unless already changed)
  179.             if ($rendezvouse->getCouponPromotion() === $this) {
  180.                 $rendezvouse->setCouponPromotion(null);
  181.             }
  182.         }
  183.         return $this;
  184.     }
  185. }