<?php
namespace App\Entity;
use App\Repository\ParMotivoRevisionRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: ParMotivoRevisionRepository::class)]
class ParMotivoRevision
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 100)]
private ?string $nombre = null;
#[ORM\OneToMany(mappedBy: 'motivo', targetEntity: RFFUID::class)]
private Collection $FUIDMotivoRevision;
public function __construct()
{
$this->FUIDMotivoRevision = new ArrayCollection();
}
public function __toString() {
return $this->getNombre();
}
public function getId(): ?int
{
return $this->id;
}
public function getNombre(): ?string
{
return $this->nombre;
}
public function setNombre(string $nombre): static
{
$this->nombre = $nombre;
return $this;
}
/**
* @return Collection<int, RFFUID>
*/
public function getFUIDMotivoRevision(): Collection
{
return $this->FUIDMotivoRevision;
}
public function addFUIDMotivoRevision(RFFUID $fUIDMotivoRevision): static
{
if (!$this->FUIDMotivoRevision->contains($fUIDMotivoRevision)) {
$this->FUIDMotivoRevision->add($fUIDMotivoRevision);
$fUIDMotivoRevision->setMotivo($this);
}
return $this;
}
public function removeFUIDMotivoRevision(RFFUID $fUIDMotivoRevision): static
{
if ($this->FUIDMotivoRevision->removeElement($fUIDMotivoRevision)) {
// set the owning side to null (unless already changed)
if ($fUIDMotivoRevision->getMotivo() === $this) {
$fUIDMotivoRevision->setMotivo(null);
}
}
return $this;
}
}