<?phpnamespace App\Entity;use App\Repository\JustificatifRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=JustificatifRepository::class) */class Justificatif{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="text") */ private $wording; /** * @ORM\Column(type="boolean", nullable=true) */ private $state; /** * @ORM\OneToMany(targetEntity=JustifForm::class, mappedBy="justificatif") */ private $justifForms; /** * @ORM\Column(type="string", length=1, nullable=true) */ private $uniquePiece; public function __construct() { $this->justifForms = 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; } public function isState(): ?bool { return $this->state; } public function setState(?bool $state): self { $this->state = $state; return $this; } /** * @return Collection<int, JustifForm> */ public function getJustifForms(): Collection { return $this->justifForms; } public function addJustifForm(JustifForm $justifForm): self { if (!$this->justifForms->contains($justifForm)) { $this->justifForms[] = $justifForm; $justifForm->setJustificatif($this); } return $this; } public function removeJustifForm(JustifForm $justifForm): self { if ($this->justifForms->removeElement($justifForm)) { // set the owning side to null (unless already changed) if ($justifForm->getJustificatif() === $this) { $justifForm->setJustificatif(null); } } return $this; } public function getUniquePiece(): ?string { return $this->uniquePiece; } public function setUniquePiece(string $uniquePiece): self { $this->uniquePiece = $uniquePiece; return $this; }}