src/Entity/Promotions.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity(repositoryClass="App\Repository\PromotionsRepository")
  8.  */
  9. class Promotions
  10. {
  11.     /**
  12.      * @ORM\Id()
  13.      * @ORM\GeneratedValue()
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="string", length=255, nullable=true)
  19.      */
  20.     private $code;
  21.     /**
  22.      * @ORM\Column(type="datetime", nullable=true)
  23.      */
  24.     private $dateCreation;
  25.     /**
  26.      * @ORM\Column(type="datetime", nullable=true)
  27.      */
  28.     private $dateDebut;
  29.     /**
  30.      * @ORM\Column(type="datetime", nullable=true)
  31.      */
  32.     private $dateFin;
  33.     /**
  34.      * @ORM\Column(type="integer", nullable=true)
  35.      */
  36.     private $nbreMaxGeneral;
  37.     /**
  38.      * @ORM\Column(type="integer", nullable=true)
  39.      */
  40.     private $nbreMaxParUser;
  41.     /**
  42.      * @ORM\Column(type="string", length=255, nullable=true)
  43.      */
  44.     private $type;
  45.     /**
  46.      * @ORM\Column(type="boolean", nullable=true)
  47.      */
  48.     private $etat;
  49.     /**
  50.      * @ORM\ManyToOne(targetEntity="App\Entity\Ref", inversedBy="promotions")
  51.      */
  52.     private $statut;
  53.     /**
  54.      * @ORM\OneToMany(targetEntity="App\Entity\LogPromotions", mappedBy="idPromotion")
  55.      */
  56.     private $logPromotions;
  57.     /**
  58.      * @ORM\Column(type="integer", nullable=true)
  59.      */
  60.     private $pourcentage;
  61.     /**
  62.      * @ORM\OneToMany(targetEntity="App\Entity\Commande", mappedBy="idPromotion")
  63.      */
  64.     private $commandes;
  65.     /**
  66.      * @ORM\OneToMany(targetEntity="App\Entity\PromoSejour", mappedBy="promotion")
  67.      */
  68.     private $promoSejours;
  69.     /**
  70.      * @ORM\OneToMany(targetEntity="App\Entity\PromoParents", mappedBy="promotion")
  71.      */
  72.     private $promoParents;
  73.     /**
  74.      * @ORM\Column(type="string", length=255, nullable=true)
  75.      */
  76.     private $strategie;
  77.     /**
  78.      * @ORM\Column(type="integer", nullable=true)
  79.      */
  80.     private $nbreApplicable;
  81.     public function __construct()
  82.     {
  83.         $this->logPromotions = new ArrayCollection();
  84.         $this->commandes = new ArrayCollection();
  85.         $this->promoSejours = new ArrayCollection();
  86.         $this->promoParents = new ArrayCollection();
  87.     }
  88.     public function getId(): ?int
  89.     {
  90.         return $this->id;
  91.     }
  92.     public function getCode(): ?string
  93.     {
  94.         return $this->code;
  95.     }
  96.     public function setCode(?string $code): self
  97.     {
  98.         $this->code $code;
  99.         return $this;
  100.     }
  101.     public function getDateCreation(): ?\DateTimeInterface
  102.     {
  103.         return $this->dateCreation;
  104.     }
  105.     public function setDateCreation(?\DateTimeInterface $dateCreation): self
  106.     {
  107.         $this->dateCreation $dateCreation;
  108.         return $this;
  109.     }
  110.     public function getDateDebut(): ?\DateTimeInterface
  111.     {
  112.         return $this->dateDebut;
  113.     }
  114.     public function setDateDebut(?\DateTimeInterface $dateDebut): self
  115.     {
  116.         $this->dateDebut $dateDebut;
  117.         return $this;
  118.     }
  119.     public function getDateFin(): ?\DateTimeInterface
  120.     {
  121.         return $this->dateFin;
  122.     }
  123.     public function setDateFin(?\DateTimeInterface $dateFin): self
  124.     {
  125.         $this->dateFin $dateFin;
  126.         return $this;
  127.     }
  128.     public function getNbreMaxGeneral(): ?int
  129.     {
  130.         return $this->nbreMaxGeneral;
  131.     }
  132.     public function setNbreMaxGeneral(?int $nbreMaxGeneral): self
  133.     {
  134.         $this->nbreMaxGeneral $nbreMaxGeneral;
  135.         return $this;
  136.     }
  137.     public function getNbreMaxParUser(): ?int
  138.     {
  139.         return $this->nbreMaxParUser;
  140.     }
  141.     public function setNbreMaxParUser(?int $nbreMaxParUser): self
  142.     {
  143.         $this->nbreMaxParUser $nbreMaxParUser;
  144.         return $this;
  145.     }
  146.     public function getType(): ?string
  147.     {
  148.         return $this->type;
  149.     }
  150.     public function setType(?string $type): self
  151.     {
  152.         $this->type $type;
  153.         return $this;
  154.     }
  155.     public function getEtat(): ?bool
  156.     {
  157.         return $this->etat;
  158.     }
  159.     public function setEtat(?bool $etat): self
  160.     {
  161.         $this->etat $etat;
  162.         return $this;
  163.     }
  164.     public function getStatut(): ?Ref
  165.     {
  166.         return $this->statut;
  167.     }
  168.     public function setStatut(?Ref $statut): self
  169.     {
  170.         $this->statut $statut;
  171.         return $this;
  172.     }
  173.     /**
  174.      * @return Collection|LogPromotions[]
  175.      */
  176.     public function getLogPromotions(): Collection
  177.     {
  178.         return $this->logPromotions;
  179.     }
  180.     public function addLogPromotion(LogPromotions $logPromotion): self
  181.     {
  182.         if (!$this->logPromotions->contains($logPromotion)) {
  183.             $this->logPromotions[] = $logPromotion;
  184.             $logPromotion->setIdPromotion($this);
  185.         }
  186.         return $this;
  187.     }
  188.     public function removeLogPromotion(LogPromotions $logPromotion): self
  189.     {
  190.         if ($this->logPromotions->contains($logPromotion)) {
  191.             $this->logPromotions->removeElement($logPromotion);
  192.             // set the owning side to null (unless already changed)
  193.             if ($logPromotion->getIdPromotion() === $this) {
  194.                 $logPromotion->setIdPromotion(null);
  195.             }
  196.         }
  197.         return $this;
  198.     }
  199.     public function getPourcentage(): ?int
  200.     {
  201.         return $this->pourcentage;
  202.     }
  203.     public function setPourcentage(?int $pourcentage): self
  204.     {
  205.         $this->pourcentage $pourcentage;
  206.         return $this;
  207.     }
  208.     /**
  209.      * @return Collection|Commande[]
  210.      */
  211.     public function getCommandes(): Collection
  212.     {
  213.         return $this->commandes;
  214.     }
  215.     public function addCommande(Commande $commande): self
  216.     {
  217.         if (!$this->commandes->contains($commande)) {
  218.             $this->commandes[] = $commande;
  219.             $commande->setIdPromotion($this);
  220.         }
  221.         return $this;
  222.     }
  223.     public function removeCommande(Commande $commande): self
  224.     {
  225.         if ($this->commandes->contains($commande)) {
  226.             $this->commandes->removeElement($commande);
  227.             // set the owning side to null (unless already changed)
  228.             if ($commande->getIdPromotion() === $this) {
  229.                 $commande->setIdPromotion(null);
  230.             }
  231.         }
  232.         return $this;
  233.     }
  234.     /**
  235.      * @return Collection|PromoSejour[]
  236.      */
  237.     public function getPromoSejours(): Collection
  238.     {
  239.         return $this->promoSejours;
  240.     }
  241.     public function addPromoSejour(PromoSejour $promoSejour): self
  242.     {
  243.         if (!$this->promoSejours->contains($promoSejour)) {
  244.             $this->promoSejours[] = $promoSejour;
  245.             $promoSejour->setPromotion($this);
  246.         }
  247.         return $this;
  248.     }
  249.     public function removePromoSejour(PromoSejour $promoSejour): self
  250.     {
  251.         if ($this->promoSejours->contains($promoSejour)) {
  252.             $this->promoSejours->removeElement($promoSejour);
  253.             // set the owning side to null (unless already changed)
  254.             if ($promoSejour->getPromotion() === $this) {
  255.                 $promoSejour->setPromotion(null);
  256.             }
  257.         }
  258.         return $this;
  259.     }
  260.     /**
  261.      * @return Collection|PromoParents[]
  262.      */
  263.     public function getPromoParents(): Collection
  264.     {
  265.         return $this->promoParents;
  266.     }
  267.     public function addPromoParent(PromoParents $promoParent): self
  268.     {
  269.         if (!$this->promoParents->contains($promoParent)) {
  270.             $this->promoParents[] = $promoParent;
  271.             $promoParent->setPromotion($this);
  272.         }
  273.         return $this;
  274.     }
  275.     public function removePromoParent(PromoParents $promoParent): self
  276.     {
  277.         if ($this->promoParents->contains($promoParent)) {
  278.             $this->promoParents->removeElement($promoParent);
  279.             // set the owning side to null (unless already changed)
  280.             if ($promoParent->getPromotion() === $this) {
  281.                 $promoParent->setPromotion(null);
  282.             }
  283.         }
  284.         return $this;
  285.     }
  286.     public function getStrategie(): ?string
  287.     {
  288.         return $this->strategie;
  289.     }
  290.     public function setStrategie(?string $strategie): self
  291.     {
  292.         $this->strategie $strategie;
  293.         return $this;
  294.     }
  295.     public function getNbreApplicable(): ?int
  296.     {
  297.         return $this->nbreApplicable;
  298.     }
  299.     public function setNbreApplicable(?int $nbreApplicable): self
  300.     {
  301.         $this->nbreApplicable $nbreApplicable;
  302.         return $this;
  303.     }
  304. }