<?php
namespace App\Entity;
use App\Repository\CentreCouponPromotionRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=CentreCouponPromotionRepository::class)
*/
class CentreCouponPromotion
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=100)
*/
private $cpn_prm_libelle;
/**
* @ORM\Column(type="integer")
*/
private $cpn_prm_montant_remise;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $cpn_prm_nbr_utilisation;
/**
* @ORM\Column(type="date", nullable=true)
*/
private $cpn_prm_date_limite;
/**
* @ORM\Column(type="boolean")
*/
private $cpn_prm_illimite;
/**
* @ORM\ManyToOne(targetEntity=CentreGroupe::class, inversedBy="centreCouponPromotions")
* @ORM\JoinColumn(nullable=false)
*/
private $centre_groupe;
/**
* @ORM\ManyToMany(targetEntity=CentrePrestation::class, inversedBy="centreCouponPromotions", fetch="EAGER")
*/
private $centre_coupon_promotion_prestation;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $id_old;
/**
* @ORM\Column(type="boolean")
*/
private $cpn_type_reduction;
/**
* @ORM\OneToMany(targetEntity=Rendezvous::class, mappedBy="couponPromotion")
*/
private $rendezvouses;
public function __construct()
{
$this->centre_coupon_promotion_prestation = new ArrayCollection();
$this->rendezvouses = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getCpnPrmLibelle(): ?string
{
return $this->cpn_prm_libelle;
}
public function setCpnPrmLibelle(string $cpn_prm_libelle): self
{
$this->cpn_prm_libelle = $cpn_prm_libelle;
return $this;
}
public function getCpnPrmMontantRemise(): ?int
{
return $this->cpn_prm_montant_remise;
}
public function setCpnPrmMontantRemise(int $cpn_prm_montant_remise): self
{
$this->cpn_prm_montant_remise = $cpn_prm_montant_remise;
return $this;
}
public function getCpnPrmNbrUtilisation(): ?int
{
return $this->cpn_prm_nbr_utilisation;
}
public function setCpnPrmNbrUtilisation(?int $cpn_prm_nbr_utilisation): self
{
$this->cpn_prm_nbr_utilisation = $cpn_prm_nbr_utilisation;
return $this;
}
public function getCpnPrmDateLimite(): ?\DateTimeInterface
{
return $this->cpn_prm_date_limite;
}
public function setCpnPrmDateLimite(?\DateTimeInterface $cpn_prm_date_limite): self
{
$this->cpn_prm_date_limite = $cpn_prm_date_limite;
return $this;
}
public function isCpnPrmIllimite(): ?bool
{
return $this->cpn_prm_illimite;
}
public function setCpnPrmIllimite(bool $cpn_prm_illimite): self
{
$this->cpn_prm_illimite = $cpn_prm_illimite;
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, CentrePrestation>
*/
public function getCentreCouponPromotionPrestation(): Collection
{
return $this->centre_coupon_promotion_prestation;
}
public function addCentreCouponPromotionPrestation(CentrePrestation $centreCouponPromotionPrestation): self
{
if (!$this->centre_coupon_promotion_prestation->contains($centreCouponPromotionPrestation)) {
$this->centre_coupon_promotion_prestation[] = $centreCouponPromotionPrestation;
}
return $this;
}
public function removeCentreCouponPromotionPrestation(CentrePrestation $centreCouponPromotionPrestation): self
{
$this->centre_coupon_promotion_prestation->removeElement($centreCouponPromotionPrestation);
return $this;
}
public function getIdOld(): ?int
{
return $this->id_old;
}
public function setIdOld(int $id_old): self
{
$this->id_old = $id_old;
return $this;
}
public function isCpnTypeReduction(): ?bool
{
return $this->cpn_type_reduction;
}
public function setCpnTypeReduction(bool $cpn_type_reduction): self
{
$this->cpn_type_reduction = $cpn_type_reduction;
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->setCouponPromotion($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->getCouponPromotion() === $this) {
$rendezvouse->setCouponPromotion(null);
}
}
return $this;
}
}