<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Unidad
*
* @ORM\Table(name="unidad")
* @ORM\Entity
*/
class Unidad
{
# -------------------------------------------------------------------------------------------------------- VARIABLES
/**
* @var int
*
* @ORM\Column(name="id_uni", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $idUni;
/**
* @var string
*
* @ORM\Column(name="nombre", type="string", length=50, nullable=false)
*/
private $nombre;
/**
* @var int|null
*
* @ORM\Column(name="consecutivo", type="integer", nullable=true)
*/
private $consecutivo;
/**
* @var bool
*
* @ORM\Column(name="activa", type="boolean", options={"default" : true})
*/
private $activa;
# ---------------------------------------------------------------------------------------------------------- MÉTODOS
public function __toString()
{
return $this->nombre;
}
# ---------------------------------------------------------------------------------------------- GETTERS AND SETTERS
public function getIdUni(): ?int
{
return $this->idUni;
}
public function getNombre(): ?string
{
return $this->nombre;
}
public function setNombre(string $nombre): self
{
$this->nombre = $nombre;
return $this;
}
public function getConsecutivo(): ?int
{
return $this->consecutivo;
}
public function setConsecutivo(?int $consecutivo): self
{
$this->consecutivo = $consecutivo;
return $this;
}
public function getActiva(): ?bool
{
return $this->activa;
}
public function setActiva(bool $activa): self
{
$this->activa = $activa;
return $this;
}
// Entidad de unidad
}