src/Entity/Main/ActivityOptions.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Main;
  3. use App\Repository\ActivityOptionsRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\Common\Collections\ArrayCollection;
  7. /**
  8.  * @ORM\Entity(repositoryClass=ActivityOptionsRepository::class)
  9.  */
  10. class ActivityOptions
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=255, nullable=true)
  20.      */
  21.     private $designation;
  22.     /**
  23.      * @ORM\Column(type="string", length=255, nullable=true)
  24.      */
  25.     private $mention;
  26.     /**
  27.      * @ORM\Column(type="string", length=255, nullable=true)
  28.      */
  29.     private $code;
  30.     /**
  31.      * @ORM\Column(type="float", nullable=true)
  32.      */
  33.     private $price_ttc;
  34.     /**
  35.      * @ORM\Column(type="float", nullable=true)
  36.      */
  37.     private $taux_tva;
  38.     /**
  39.      * @ORM\Column(type="boolean", nullable=true)
  40.      */
  41.     private $obligatoire;
  42.     /**
  43.      * @ORM\Column(type="integer", nullable=true)
  44.      */
  45.     private $priority;
  46.     /**
  47.      * @ORM\Column(type="boolean", nullable=true)
  48.      */
  49.     private $participant;
  50.     /**
  51.      * @ORM\OneToMany(targetEntity="App\Entity\Main\PromosOptions", mappedBy="activityoption")
  52.      */
  53.     private $promos;
  54.     
  55.     /**
  56.      * @ORM\ManyToMany(targetEntity="App\Entity\Main\Forfait")
  57.      * @ORM\JoinTable(name="forfaits_options")
  58.      */
  59.     private $forfait;
  60.     /**
  61.      * @ORM\ManyToOne(targetEntity="App\Entity\Main\GroupTarifs", inversedBy="prices")
  62.      */
  63.     private $groupby;
  64.     public function __construct()
  65.     {
  66.         $this->promos = new ArrayCollection();
  67.         $this->forfait = new ArrayCollection();
  68.     }   
  69.     
  70.     public function __toString()
  71.     {
  72.         return (string) $this->designation;
  73.     }
  74.     public function getId(): ?int
  75.     {
  76.         return $this->id;
  77.     }
  78.     public function getDesignation(): ?string
  79.     {
  80.         return $this->designation;
  81.     }
  82.     public function setDesignation(?string $designation): self
  83.     {
  84.         $this->designation $designation;
  85.         return $this;
  86.     }
  87.     public function getMention(): ?string
  88.     {
  89.         return $this->mention;
  90.     }
  91.     public function setMention(?string $mention): self
  92.     {
  93.         $this->mention $mention;
  94.         return $this;
  95.     }
  96.     public function getCode(): ?string
  97.     {
  98.         return $this->code;
  99.     }
  100.     public function setCode(?string $code): self
  101.     {
  102.         $this->code $code;
  103.         return $this;
  104.     }
  105.     public function getPriceTtc(): ?float
  106.     {
  107.         return $this->price_ttc;
  108.     }
  109.     public function setPriceTtc(?float $price_ttc): self
  110.     {
  111.         $this->price_ttc $price_ttc;
  112.         return $this;
  113.     }
  114.     public function getTauxTva(): ?float
  115.     {
  116.         return $this->taux_tva;
  117.     }
  118.     public function setTauxTva(?float $taux_tva): self
  119.     {
  120.         $this->taux_tva $taux_tva;
  121.         return $this;
  122.     }
  123.     public function getObligatoire(): ?bool
  124.     {
  125.         return $this->obligatoire;
  126.     }
  127.     public function setObligatoire(?bool $obligatoire): self
  128.     {
  129.         $this->obligatoire $obligatoire;
  130.         return $this;
  131.     }
  132.     public function getPriority(): ?int
  133.     {
  134.         return $this->priority;
  135.     }
  136.     public function setPriority(?int $priority): self
  137.     {
  138.         $this->priority $priority;
  139.         return $this;
  140.     }
  141.     public function getParticipant(): ?bool
  142.     {
  143.         return $this->participant;
  144.     }
  145.     public function setParticipant(?bool $participant): self
  146.     {
  147.         $this->participant $participant;
  148.         return $this;
  149.     }
  150.     
  151.     /**
  152.      * @return Collection|Promos[]
  153.      */
  154.     public function getPromos(): Collection
  155.     {
  156.         return $this->promos;
  157.     }
  158.     public function addPromo(Promos $promo): self
  159.     {
  160.         if (!$this->promos->contains($promo)) {
  161.             $this->promos[] = $promo;
  162.             $promo->setActivityOptions($this);
  163.         }
  164.         return $this;
  165.     }
  166.     public function removePromo(Promos $promo): self
  167.     {
  168.         if ($this->promos->contains($promo)) {
  169.             $this->promos->removeElement($promo);
  170.             // set the owning side to null (unless already changed)
  171.             if ($promo->getActivityOptions() === $this) {
  172.                 $promo->setActivityOptions(null);
  173.             }
  174.         }
  175.         return $this;
  176.     }
  177.     
  178.     public function getForfait(): Collection
  179.     {
  180.         return $this->forfait;
  181.     }
  182.     public function addForfait(Forfait $forfait): self
  183.     {
  184.         if (!$this->forfait->contains($forfait)) {
  185.             $this->forfait[] = $forfait;
  186.         }
  187.         return $this;
  188.     }
  189.     public function removeForfait(Forfait $forfait): self
  190.     {
  191.         if ($this->forfait->contains($forfait)) {
  192.             $this->forfait->removeElement($forfait);
  193.         }
  194.         return $this;
  195.     }   
  196.     
  197.     public function getGroupby(): ?GroupTarifs
  198.     {
  199.         return $this->groupby;
  200.     }
  201.     public function setGroupby(?GroupTarifs $groupby): self
  202.     {
  203.         $this->groupby $groupby;
  204.         return $this;
  205.     }
  206. }