<?php
namespace App\Entity\Main;
use App\Repository\ActivityOptionsRepository;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\ArrayCollection;
/**
* @ORM\Entity(repositoryClass=ActivityOptionsRepository::class)
*/
class ActivityOptions
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $designation;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $mention;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $code;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $price_ttc;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $taux_tva;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $obligatoire;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $priority;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $participant;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Main\PromosOptions", mappedBy="activityoption")
*/
private $promos;
/**
* @ORM\ManyToMany(targetEntity="App\Entity\Main\Forfait")
* @ORM\JoinTable(name="forfaits_options")
*/
private $forfait;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Main\GroupTarifs", inversedBy="prices")
*/
private $groupby;
public function __construct()
{
$this->promos = new ArrayCollection();
$this->forfait = new ArrayCollection();
}
public function __toString()
{
return (string) $this->designation;
}
public function getId(): ?int
{
return $this->id;
}
public function getDesignation(): ?string
{
return $this->designation;
}
public function setDesignation(?string $designation): self
{
$this->designation = $designation;
return $this;
}
public function getMention(): ?string
{
return $this->mention;
}
public function setMention(?string $mention): self
{
$this->mention = $mention;
return $this;
}
public function getCode(): ?string
{
return $this->code;
}
public function setCode(?string $code): self
{
$this->code = $code;
return $this;
}
public function getPriceTtc(): ?float
{
return $this->price_ttc;
}
public function setPriceTtc(?float $price_ttc): self
{
$this->price_ttc = $price_ttc;
return $this;
}
public function getTauxTva(): ?float
{
return $this->taux_tva;
}
public function setTauxTva(?float $taux_tva): self
{
$this->taux_tva = $taux_tva;
return $this;
}
public function getObligatoire(): ?bool
{
return $this->obligatoire;
}
public function setObligatoire(?bool $obligatoire): self
{
$this->obligatoire = $obligatoire;
return $this;
}
public function getPriority(): ?int
{
return $this->priority;
}
public function setPriority(?int $priority): self
{
$this->priority = $priority;
return $this;
}
public function getParticipant(): ?bool
{
return $this->participant;
}
public function setParticipant(?bool $participant): self
{
$this->participant = $participant;
return $this;
}
/**
* @return Collection|Promos[]
*/
public function getPromos(): Collection
{
return $this->promos;
}
public function addPromo(Promos $promo): self
{
if (!$this->promos->contains($promo)) {
$this->promos[] = $promo;
$promo->setActivityOptions($this);
}
return $this;
}
public function removePromo(Promos $promo): self
{
if ($this->promos->contains($promo)) {
$this->promos->removeElement($promo);
// set the owning side to null (unless already changed)
if ($promo->getActivityOptions() === $this) {
$promo->setActivityOptions(null);
}
}
return $this;
}
public function getForfait(): Collection
{
return $this->forfait;
}
public function addForfait(Forfait $forfait): self
{
if (!$this->forfait->contains($forfait)) {
$this->forfait[] = $forfait;
}
return $this;
}
public function removeForfait(Forfait $forfait): self
{
if ($this->forfait->contains($forfait)) {
$this->forfait->removeElement($forfait);
}
return $this;
}
public function getGroupby(): ?GroupTarifs
{
return $this->groupby;
}
public function setGroupby(?GroupTarifs $groupby): self
{
$this->groupby = $groupby;
return $this;
}
}