src/Entity/Unidad.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * Unidad
  6.  *
  7.  * @ORM\Table(name="unidad")
  8.  * @ORM\Entity
  9.  */
  10. class Unidad
  11. {
  12.     # -------------------------------------------------------------------------------------------------------- VARIABLES
  13.     /**
  14.      * @var int
  15.      *
  16.      * @ORM\Column(name="id_uni", type="integer", nullable=false)
  17.      * @ORM\Id
  18.      * @ORM\GeneratedValue(strategy="IDENTITY")
  19.      */
  20.     private $idUni;
  21.     /**
  22.      * @var string
  23.      *
  24.      * @ORM\Column(name="nombre", type="string", length=50, nullable=false)
  25.      */
  26.     private $nombre;
  27.     /**
  28.      * @var int|null
  29.      *
  30.      * @ORM\Column(name="consecutivo", type="integer", nullable=true)
  31.      */
  32.     private $consecutivo;
  33.     /**
  34.      * @var bool
  35.      *
  36.      * @ORM\Column(name="activa", type="boolean", options={"default" : true})
  37.      */
  38.     private $activa;
  39.     # ---------------------------------------------------------------------------------------------------------- MÉTODOS
  40.     public function __toString()
  41.     {
  42.         return $this->nombre;
  43.     }
  44.     # ---------------------------------------------------------------------------------------------- GETTERS AND SETTERS
  45.     public function getIdUni(): ?int
  46.     {
  47.         return $this->idUni;
  48.     }
  49.     public function getNombre(): ?string
  50.     {
  51.         return $this->nombre;
  52.     }
  53.     public function setNombre(string $nombre): self
  54.     {
  55.         $this->nombre $nombre;
  56.         return $this;
  57.     }
  58.     public function getConsecutivo(): ?int
  59.     {
  60.         return $this->consecutivo;
  61.     }
  62.     public function setConsecutivo(?int $consecutivo): self
  63.     {
  64.         $this->consecutivo $consecutivo;
  65.         return $this;
  66.     }
  67.     public function getActiva(): ?bool
  68.     {
  69.         return $this->activa;
  70.     }
  71.     public function setActiva(bool $activa): self
  72.     {
  73.         $this->activa $activa;
  74.         return $this;
  75.     }
  76. // Entidad de unidad
  77. }