<?php
namespace App\Entity;
use ApiPlatform\Core\Annotation\ApiResource;
use App\Repository\InscritSessionRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: InscritSessionRepository::class)]
#[ApiResource]
class InscritSession
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $nom = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $prenom = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $email = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $phone = null;
#[ORM\ManyToOne(inversedBy: 'inscritSessions')]
private ?Evenement $session = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $mode = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $adresse = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $date = null;
#[ORM\OneToMany(mappedBy: 'inscrit', targetEntity: Reglement::class,cascade: ['remove'])]
private Collection $reglements;
#[ORM\Column(nullable: true)]
private ?bool $isValid = null;
#[ORM\ManyToOne(inversedBy: 'inscritSessions')]
private ?User $stagiaire = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $totalmontant = null;
#[ORM\Column(nullable: true)]
private ?bool $isAffected = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $certif = null;
#[ORM\Column(nullable: true)]
private ?bool $vue = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $message = null;
#[ORM\OneToMany(mappedBy: 'inscrit', targetEntity: Trace::class,cascade: ['remove'])]
private Collection $traces;
#[ORM\OneToMany(mappedBy: 'inscrit', targetEntity: Signature::class)]
private Collection $signatures;
#[ORM\Column(nullable: true)]
private ?int $count = null;
#[ORM\OneToMany(mappedBy: 'user', targetEntity: SuspensionInscrit::class,cascade: ['remove'])]
private Collection $suspensionInscrits;
#[ORM\Column(nullable: true)]
private ?bool $isActive = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $disponibilte = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $whatsapp = null;
#[ORM\OneToMany(mappedBy: 'inscrit', targetEntity: Coupon::class,cascade: ['remove'])]
private Collection $coupons;
public function __construct()
{
$this->reglements = new ArrayCollection();
$this->traces = new ArrayCollection();
$this->signatures = new ArrayCollection();
$this->suspensionInscrits = new ArrayCollection();
$this->coupons = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getNom(): ?string
{
return $this->nom;
}
public function setNom(?string $nom): self
{
$this->nom = $nom;
return $this;
}
public function getPrenom(): ?string
{
return $this->prenom;
}
public function setPrenom(?string $prenom): self
{
$this->prenom = $prenom;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(?string $email): self
{
$this->email = $email;
return $this;
}
public function getPhone(): ?string
{
return $this->phone;
}
public function setPhone(?string $phone): self
{
$this->phone = $phone;
return $this;
}
public function getSession(): ?Evenement
{
return $this->session;
}
public function setSession(?Evenement $session): self
{
$this->session = $session;
return $this;
}
public function getMode(): ?string
{
return $this->mode;
}
public function setMode(?string $mode): self
{
$this->mode = $mode;
return $this;
}
public function getAdresse(): ?string
{
return $this->adresse;
}
public function setAdresse(?string $adresse): self
{
$this->adresse = $adresse;
return $this;
}
public function getDate(): ?\DateTimeInterface
{
return $this->date;
}
public function setDate(?\DateTimeInterface $date): self
{
$this->date = $date;
return $this;
}
/**
* @return Collection<int, Reglement>
*/
public function getReglements(): Collection
{
return $this->reglements;
}
public function addReglement(Reglement $reglement): self
{
if (!$this->reglements->contains($reglement)) {
$this->reglements->add($reglement);
$reglement->setInscrit($this);
}
return $this;
}
public function removeReglement(Reglement $reglement): self
{
if ($this->reglements->removeElement($reglement)) {
// set the owning side to null (unless already changed)
if ($reglement->getInscrit() === $this) {
$reglement->setInscrit(null);
}
}
return $this;
}
public function isIsValid(): ?bool
{
return $this->isValid;
}
public function setIsValid(?bool $isValid): self
{
$this->isValid = $isValid;
return $this;
}
public function getStagiaire(): ?User
{
return $this->stagiaire;
}
public function setStagiaire(?User $stagiaire): self
{
$this->stagiaire = $stagiaire;
return $this;
}
public function getTotalmontant(): ?string
{
return $this->totalmontant;
}
public function setTotalmontant(?string $totalmontant): self
{
$this->totalmontant = $totalmontant;
return $this;
}
public function isIsAffected(): ?bool
{
return $this->isAffected;
}
public function setIsAffected(?bool $isAffected): self
{
$this->isAffected = $isAffected;
return $this;
}
public function getCertif(): ?string
{
return $this->certif;
}
public function setCertif(?string $certif): self
{
$this->certif = $certif;
return $this;
}
public function isVue(): ?bool
{
return $this->vue;
}
public function setVue(?bool $vue): self
{
$this->vue = $vue;
return $this;
}
public function getMessage(): ?string
{
return $this->message;
}
public function setMessage(?string $message): self
{
$this->message = $message;
return $this;
}
/**
* @return Collection<int, Trace>
*/
public function getTraces(): Collection
{
return $this->traces;
}
public function addTrace(Trace $trace): self
{
if (!$this->traces->contains($trace)) {
$this->traces->add($trace);
$trace->setInscrit($this);
}
return $this;
}
public function removeTrace(Trace $trace): self
{
if ($this->traces->removeElement($trace)) {
// set the owning side to null (unless already changed)
if ($trace->getInscrit() === $this) {
$trace->setInscrit(null);
}
}
return $this;
}
/**
* @return Collection<int, Signature>
*/
public function getSignatures(): Collection
{
return $this->signatures;
}
public function addSignature(Signature $signature): self
{
if (!$this->signatures->contains($signature)) {
$this->signatures->add($signature);
$signature->setInscrit($this);
}
return $this;
}
public function removeSignature(Signature $signature): self
{
if ($this->signatures->removeElement($signature)) {
// set the owning side to null (unless already changed)
if ($signature->getInscrit() === $this) {
$signature->setInscrit(null);
}
}
return $this;
}
public function getCount(): ?int
{
return $this->count;
}
public function setCount(?int $count): self
{
$this->count = $count;
return $this;
}
/**
* @return Collection<int, SuspensionInscrit>
*/
public function getSuspensionInscrits(): Collection
{
return $this->suspensionInscrits;
}
public function addSuspensionInscrit(SuspensionInscrit $suspensionInscrit): self
{
if (!$this->suspensionInscrits->contains($suspensionInscrit)) {
$this->suspensionInscrits->add($suspensionInscrit);
$suspensionInscrit->setUser($this);
}
return $this;
}
public function removeSuspensionInscrit(SuspensionInscrit $suspensionInscrit): self
{
if ($this->suspensionInscrits->removeElement($suspensionInscrit)) {
// set the owning side to null (unless already changed)
if ($suspensionInscrit->getUser() === $this) {
$suspensionInscrit->setUser(null);
}
}
return $this;
}
public function isIsActive(): ?bool
{
return $this->isActive;
}
public function setIsActive(?bool $isActive): self
{
$this->isActive = $isActive;
return $this;
}
public function getDisponibilte(): ?string
{
return $this->disponibilte;
}
public function setDisponibilte(?string $disponibilte): self
{
$this->disponibilte = $disponibilte;
return $this;
}
public function getWhatsapp(): ?string
{
return $this->whatsapp;
}
public function setWhatsapp(?string $whatsapp): self
{
$this->whatsapp = $whatsapp;
return $this;
}
/**
* @return Collection<int, Coupon>
*/
public function getCoupons(): Collection
{
return $this->coupons;
}
public function addCoupon(Coupon $coupon): self
{
if (!$this->coupons->contains($coupon)) {
$this->coupons->add($coupon);
$coupon->setInscrit($this);
}
return $this;
}
public function removeCoupon(Coupon $coupon): self
{
if ($this->coupons->removeElement($coupon)) {
// set the owning side to null (unless already changed)
if ($coupon->getInscrit() === $this) {
$coupon->setInscrit(null);
}
}
return $this;
}
}