src/Entity/Session.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\SessionRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Component\Validator\Constraints as Assert;
  8. #[ORM\Entity(repositoryClassSessionRepository::class)]
  9. class Session
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length255nullabletrue)]
  16.     #[Assert\NotBlank(message"Le champ ne peut pas ĂȘtre vide.")]
  17.     private ?string $libele null;
  18.     #[ORM\OneToMany(mappedBy'session'targetEntityEngagement::class)]
  19.     private Collection $engagements;
  20.     #[ORM\OneToMany(mappedBy'session'targetEntityInscription::class)]
  21.     private Collection $inscriptions;
  22.     #[ORM\Column(nullabletrue)]
  23.     private ?float $tarifParticulier null;
  24.     #[ORM\Column(nullabletrue)]
  25.     private ?float $tarifEntreprise null;
  26.     #[ORM\Column(nullabletrue)]
  27.     private ?float $tarifEtrange null;
  28.     #[ORM\Column(nullabletrue)]
  29.     private ?int $etat null;
  30.     #[ORM\Column(nullabletrue)]
  31.     private ?float $exchangeRate null;
  32.     #[ORM\Column(nullabletrue)]
  33.     private ?float $vatRate 19.0;
  34.     public function __construct()
  35.     {
  36.         $this->engagements = new ArrayCollection();
  37.         $this->inscriptions = new ArrayCollection();
  38.     }
  39.     public function __toString()
  40.     {
  41.         return $this->libele;
  42.     }
  43.     public function getId(): ?int
  44.     {
  45.         return $this->id;
  46.     }
  47.     public function getLibele(): ?string
  48.     {
  49.         return $this->libele;
  50.     }
  51.     public function setLibele(?string $libele): self
  52.     {
  53.         $this->libele $libele;
  54.         return $this;
  55.     }
  56.     /**
  57.      * @return Collection<int, Engagement>
  58.      */
  59.     public function getEngagements(): Collection
  60.     {
  61.         return $this->engagements;
  62.     }
  63.     public function addEngagement(Engagement $engagement): self
  64.     {
  65.         if (!$this->engagements->contains($engagement)) {
  66.             $this->engagements->add($engagement);
  67.             $engagement->setSession($this);
  68.         }
  69.         return $this;
  70.     }
  71.     public function removeEngagement(Engagement $engagement): self
  72.     {
  73.         if ($this->engagements->removeElement($engagement)) {
  74.             // set the owning side to null (unless already changed)
  75.             if ($engagement->getSession() === $this) {
  76.                 $engagement->setSession(null);
  77.             }
  78.         }
  79.         return $this;
  80.     }
  81.     /**
  82.      * @return Collection<int, Inscription>
  83.      */
  84.     public function getInscriptions(): Collection
  85.     {
  86.         return $this->inscriptions;
  87.     }
  88.     public function addInscription(Inscription $inscription): self
  89.     {
  90.         if (!$this->inscriptions->contains($inscription)) {
  91.             $this->inscriptions->add($inscription);
  92.             $inscription->setSession($this);
  93.         }
  94.         return $this;
  95.     }
  96.     public function removeInscription(Inscription $inscription): self
  97.     {
  98.         if ($this->inscriptions->removeElement($inscription)) {
  99.             // set the owning side to null (unless already changed)
  100.             if ($inscription->getSession() === $this) {
  101.                 $inscription->setSession(null);
  102.             }
  103.         }
  104.         return $this;
  105.     }
  106.     public function getTarifParticulier(): ?float
  107.     {
  108.         return $this->tarifParticulier;
  109.     }
  110.     public function setTarifParticulier(?float $tarifParticulier): static
  111.     {
  112.         $this->tarifParticulier $tarifParticulier;
  113.         return $this;
  114.     }
  115.     public function getTarifEntreprise(): ?float
  116.     {
  117.         return $this->tarifEntreprise;
  118.     }
  119.     public function setTarifEntreprise(?float $tarifEntreprise): static
  120.     {
  121.         $this->tarifEntreprise $tarifEntreprise;
  122.         return $this;
  123.     }
  124.     public function getTarifEtrange(): ?float
  125.     {
  126.         return $this->tarifEtrange;
  127.     }
  128.     public function setTarifEtrange(?float $tarifEtrange): static
  129.     {
  130.         $this->tarifEtrange $tarifEtrange;
  131.         return $this;
  132.     }
  133.     public function getEtat(): ?int
  134.     {
  135.         return $this->etat;
  136.     }
  137.     public function setEtat(?int $etat): static
  138.     {
  139.         $this->etat $etat;
  140.         return $this;
  141.     }
  142.     public function getExchangeRate(): ?float
  143.     {
  144.         return $this->exchangeRate;
  145.     }
  146.     public function setExchangeRate(?float $exchangeRate): static
  147.     {
  148.         $this->exchangeRate $exchangeRate;
  149.         return $this;
  150.     }
  151.     public function getVatRate(): ?float
  152.     {
  153.         return $this->vatRate;
  154.     }
  155.     public function setVatRate(?float $vatRate): static
  156.     {
  157.         $this->vatRate $vatRate;
  158.         return $this;
  159.     }
  160. }