<?php
namespace App\Entity;
use App\Repository\GrupoEdadUsuarioRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: GrupoEdadUsuarioRepository::class)]
class GrupoEdadUsuario
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'string', length: 255)]
private ?string $nombre = null;
#[ORM\Column(type: 'boolean')]
private bool $visible = true;
#[ORM\Column(type: 'boolean')]
private bool $borrado = false;
#[ORM\Column(type: 'integer')]
private ?int $min = null;
#[ORM\Column(type: 'integer')]
private ?int $max = null;
#[ORM\OneToMany(targetEntity: SOLICITUD::class, mappedBy: 'grupoEdad')]
private Collection $solicitudes;
public function __construct()
{
$this->solicitudes = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getNombre(): ?string
{
return $this->nombre;
}
public function setNombre(string $nombre): self
{
$this->nombre = $nombre;
return $this;
}
public function isVisible(): ?bool
{
return $this->visible;
}
public function setVisible(bool $visible): self
{
$this->visible = $visible;
return $this;
}
public function isBorrado(): ?bool
{
return $this->borrado;
}
public function setBorrado(bool $borrado): self
{
$this->borrado = $borrado;
return $this;
}
public function getMin(): ?int
{
return $this->min;
}
public function setMin(int $min): self
{
$this->min = $min;
return $this;
}
public function getMax(): ?int
{
return $this->max;
}
public function setMax(int $max): self
{
$this->max = $max;
return $this;
}
/**
* @return Collection<int, SOLICITUD>
*/
public function getSolicitudes(): Collection
{
return $this->solicitudes;
}
public function addSolicitude(SOLICITUD $solicitude): self
{
if (!$this->solicitudes->contains($solicitude)) {
$this->solicitudes[] = $solicitude;
$solicitude->setGrupoEdad($this);
}
return $this;
}
public function removeSolicitude(SOLICITUD $solicitude): self
{
// set the owning side to null (unless already changed)
if ($this->solicitudes->removeElement($solicitude) && $solicitude->getGrupoEdad() === $this) {
$solicitude->setGrupoEdad(null);
}
return $this;
}
}