<?php
namespace App\Entity;
use App\Repository\TypeInscritRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=TypeInscritRepository::class)
*/
class TypeInscrit
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $wording;
/**
* @ORM\OneToMany(targetEntity=Inscrit::class, mappedBy="typeinscrit")
*/
private $inscrits;
public function __construct()
{
$this->inscrits = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getWording(): ?string
{
return $this->wording;
}
public function setWording(string $wording): self
{
$this->wording = $wording;
return $this;
}
/**
* @return Collection<int, Inscrit>
*/
public function getInscrits(): Collection
{
return $this->inscrits;
}
public function addInscrit(Inscrit $inscrit): self
{
if (!$this->inscrits->contains($inscrit)) {
$this->inscrits[] = $inscrit;
$inscrit->setTypeinscrit($this);
}
return $this;
}
public function removeInscrit(Inscrit $inscrit): self
{
if ($this->inscrits->removeElement($inscrit)) {
// set the owning side to null (unless already changed)
if ($inscrit->getTypeinscrit() === $this) {
$inscrit->setTypeinscrit(null);
}
}
return $this;
}
}