<?phpnamespace App\Entity;use App\Repository\EstadoAlumnoRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: EstadoAlumnoRepository::class)]class EstadoAlumno{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(length: 255)] private ?string $nombre = null; #[ORM\Column] private bool $visible = true; #[ORM\Column] private bool $borrado = false; #[ORM\OneToMany(mappedBy: 'estado', targetEntity: Alumno::class)] private Collection $alumnos; public function __construct() { $this->alumnos = new ArrayCollection(); } 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; } public function isVisible(): ?bool { return $this->visible; } public function setVisible(bool $visible): static { $this->visible = $visible; return $this; } public function isBorrado(): ?bool { return $this->borrado; } public function setBorrado(bool $borrado): static { $this->borrado = $borrado; return $this; } /** * @return Collection<int, Alumno> */ public function getAlumnos(): Collection { return $this->alumnos; } public function addAlumno(Alumno $alumno): static { if (!$this->alumnos->contains($alumno)) { $this->alumnos->add($alumno); $alumno->setEstado($this); } return $this; } public function removeAlumno(Alumno $alumno): static { if ($this->alumnos->removeElement($alumno)) { // set the owning side to null (unless already changed) if ($alumno->getEstado() === $this) { $alumno->setEstado(null); } } return $this; }}