<?phpnamespace App\Entity;use App\Repository\SessionRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\Validator\Constraints as Assert;#[ORM\Entity(repositoryClass: SessionRepository::class)]class Session{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(length: 255, nullable: true)] #[Assert\NotBlank(message: "Le champ ne peut pas ĂȘtre vide.")] private ?string $libele = null; #[ORM\OneToMany(mappedBy: 'session', targetEntity: Engagement::class)] private Collection $engagements; #[ORM\OneToMany(mappedBy: 'session', targetEntity: Inscription::class)] private Collection $inscriptions; #[ORM\Column(nullable: true)] private ?float $tarifParticulier = null; #[ORM\Column(nullable: true)] private ?float $tarifEntreprise = null; #[ORM\Column(nullable: true)] private ?float $tarifEtrange = null; #[ORM\Column(nullable: true)] private ?int $etat = null; #[ORM\Column(nullable: true)] private ?float $exchangeRate = null; #[ORM\Column(nullable: true)] private ?float $vatRate = 19.0; public function __construct() { $this->engagements = new ArrayCollection(); $this->inscriptions = new ArrayCollection(); } public function __toString() { return $this->libele; } public function getId(): ?int { return $this->id; } public function getLibele(): ?string { return $this->libele; } public function setLibele(?string $libele): self { $this->libele = $libele; return $this; } /** * @return Collection<int, Engagement> */ public function getEngagements(): Collection { return $this->engagements; } public function addEngagement(Engagement $engagement): self { if (!$this->engagements->contains($engagement)) { $this->engagements->add($engagement); $engagement->setSession($this); } return $this; } public function removeEngagement(Engagement $engagement): self { if ($this->engagements->removeElement($engagement)) { // set the owning side to null (unless already changed) if ($engagement->getSession() === $this) { $engagement->setSession(null); } } return $this; } /** * @return Collection<int, Inscription> */ public function getInscriptions(): Collection { return $this->inscriptions; } public function addInscription(Inscription $inscription): self { if (!$this->inscriptions->contains($inscription)) { $this->inscriptions->add($inscription); $inscription->setSession($this); } return $this; } public function removeInscription(Inscription $inscription): self { if ($this->inscriptions->removeElement($inscription)) { // set the owning side to null (unless already changed) if ($inscription->getSession() === $this) { $inscription->setSession(null); } } return $this; } public function getTarifParticulier(): ?float { return $this->tarifParticulier; } public function setTarifParticulier(?float $tarifParticulier): static { $this->tarifParticulier = $tarifParticulier; return $this; } public function getTarifEntreprise(): ?float { return $this->tarifEntreprise; } public function setTarifEntreprise(?float $tarifEntreprise): static { $this->tarifEntreprise = $tarifEntreprise; return $this; } public function getTarifEtrange(): ?float { return $this->tarifEtrange; } public function setTarifEtrange(?float $tarifEtrange): static { $this->tarifEtrange = $tarifEtrange; return $this; } public function getEtat(): ?int { return $this->etat; } public function setEtat(?int $etat): static { $this->etat = $etat; return $this; } public function getExchangeRate(): ?float { return $this->exchangeRate; } public function setExchangeRate(?float $exchangeRate): static { $this->exchangeRate = $exchangeRate; return $this; } public function getVatRate(): ?float { return $this->vatRate; } public function setVatRate(?float $vatRate): static { $this->vatRate = $vatRate; return $this; }}