src/Entity/Main/PromosOptions.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Main;
  3. use App\Repository\PromosOptionsRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=PromosOptionsRepository::class)
  7.  */
  8. class PromosOptions
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\Column(type="string", length=128)
  18.      */
  19.     private $designation;
  20.     /**
  21.      * @ORM\Column(type="string", length=128, nullable=true)
  22.      */
  23.     private $information;
  24.     /**
  25.      * @ORM\Column(type="time", nullable=true)
  26.      */
  27.     private $heure_debut;
  28.     /**
  29.      * @ORM\Column(type="time", nullable=true)
  30.      */
  31.     private $heure_fin;
  32.     /**
  33.      * @ORM\Column(type="array", nullable=true)
  34.      */
  35.     private $jours = [];
  36.     /**
  37.      * @ORM\Column(type="integer")
  38.      */
  39.     private $nbre_parties;
  40.     /**
  41.      * @ORM\Column(type="datetime", nullable=true)
  42.      */
  43.     private $date_debut;
  44.     /**
  45.      * @ORM\Column(type="datetime", nullable=true)
  46.      */
  47.     private $date_fin;
  48.     /**
  49.      * @ORM\Column(type="string", length=64)
  50.      */
  51.     private $type_reduction;
  52.     /**
  53.      * @ORM\Column(type="float", nullable=true)
  54.      */
  55.     private $price_ttc;
  56.     /**
  57.      * @ORM\Column(type="float", nullable=true)
  58.      */
  59.     private $percent;
  60.     /**
  61.      * @ORM\Column(type="integer")
  62.      */
  63.     private $priority;
  64.     
  65.     private $reduction;
  66.     /**
  67.      * @ORM\ManyToOne(targetEntity="App\Entity\Main\Forfait", inversedBy="promosOptions")
  68.      */
  69.     private $forfait;
  70.     /**
  71.      * @ORM\ManyToOne(targetEntity="App\Entity\Main\GroupTarifs", inversedBy="prices")
  72.      */
  73.     private $groupby;
  74.     /**
  75.      * @ORM\ManyToOne(targetEntity="App\Entity\Main\ActivityOptions", inversedBy="promos")
  76.      * @ORM\JoinColumn(nullable=false)
  77.      */
  78.     private $activityoption;
  79.     public function getId(): ?int
  80.     {
  81.         return $this->id;
  82.     }
  83.     public function getDesignation(): ?string
  84.     {
  85.         return $this->designation;
  86.     }
  87.     public function setDesignation(string $designation): self
  88.     {
  89.         $this->designation $designation;
  90.         return $this;
  91.     }
  92.     public function getInformation(): ?string
  93.     {
  94.         return $this->information;
  95.     }
  96.     public function setInformation(?string $information): self
  97.     {
  98.         $this->information $information;
  99.         return $this;
  100.     }
  101.     public function getHeureDebut(): ?\DateTimeInterface
  102.     {
  103.         return $this->heure_debut;
  104.     }
  105.     public function setHeureDebut(?\DateTimeInterface $heure_debut): self
  106.     {
  107.         $this->heure_debut $heure_debut;
  108.         return $this;
  109.     }
  110.     public function getHeureFin(): ?\DateTimeInterface
  111.     {
  112.         return $this->heure_fin;
  113.     }
  114.     public function setHeureFin(?\DateTimeInterface $heure_fin): self
  115.     {
  116.         $this->heure_fin $heure_fin;
  117.         return $this;
  118.     }
  119.     public function getJours(): ?array
  120.     {
  121.         return $this->jours;
  122.     }
  123.     public function setJours(?array $jours): self
  124.     {
  125.         $this->jours $jours;
  126.         return $this;
  127.     }
  128.     public function getNbreParties(): ?int
  129.     {
  130.         return $this->nbre_parties;
  131.     }
  132.     public function setNbreParties(int $nbre_parties): self
  133.     {
  134.         $this->nbre_parties $nbre_parties;
  135.         return $this;
  136.     }
  137.     public function getDateDebut(): ?\DateTimeInterface
  138.     {
  139.         return $this->date_debut;
  140.     }
  141.     public function setDateDebut(?\DateTimeInterface $date_debut): self
  142.     {
  143.         $this->date_debut $date_debut;
  144.         return $this;
  145.     }
  146.     public function getDateFin(): ?\DateTimeInterface
  147.     {
  148.         return $this->date_fin;
  149.     }
  150.     public function setDateFin(?\DateTimeInterface $date_fin): self
  151.     {
  152.         $this->date_fin $date_fin;
  153.         return $this;
  154.     }
  155.     public function getTypeReduction(): ?string
  156.     {
  157.         return $this->type_reduction;
  158.     }
  159.     public function setTypeReduction(string $type_reduction): self
  160.     {
  161.         $this->type_reduction $type_reduction;
  162.         return $this;
  163.     }
  164.     public function getPriceTtc(): ?float
  165.     {
  166.         return $this->price_ttc;
  167.     }
  168.     public function setPriceTtc(?float $price_ttc): self
  169.     {
  170.         $this->price_ttc $price_ttc;
  171.         return $this;
  172.     }
  173.     public function getPercent(): ?float
  174.     {
  175.         return $this->percent;
  176.     }
  177.     public function setPercent(?float $percent): self
  178.     {
  179.         $this->percent $percent;
  180.         return $this;
  181.     }
  182.     public function getPriority(): ?int
  183.     {
  184.         return $this->priority;
  185.     }
  186.     public function setPriority(int $priority): self
  187.     {
  188.         $this->priority $priority;
  189.         return $this;
  190.     }
  191.     public function getReduction(): ?string
  192.     {
  193.         if($this->type_reduction == 'montant')
  194.             $this->reduction number_format($this->price_ttc2'.'' ') . ' €';
  195.         elseif ($this->type_reduction == 'percentage')
  196.             $this->reduction number_format($this->percent 1000'.'' ') . ' %';
  197.         elseif ($this->type_reduction == 'gratuit')
  198.             $this->reduction 'Gratuit';
  199.         return $this->reduction;
  200.     }
  201.     public function getForfait(): ?Forfait
  202.     {
  203.         return $this->forfait;
  204.     }
  205.     public function setForfait(?Forfait $forfait): self
  206.     {
  207.         $this->forfait $forfait;
  208.         return $this;
  209.     }
  210.     public function getGroupby(): ?GroupTarifs
  211.     {
  212.         return $this->groupby;
  213.     }
  214.     public function setGroupby(?GroupTarifs $groupby): self
  215.     {
  216.         $this->groupby $groupby;
  217.         return $this;
  218.     }
  219.     public function getActivityOption(): ?ActivityOptions
  220.     {
  221.         return $this->activityoption;
  222.     }
  223.     public function setActivityOption(?ActivityOptions $activityoption): self
  224.     {
  225.         $this->activityoption $activityoption;
  226.         return $this;
  227.     }
  228. }