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.     /**
  40.      * @var int|null
  41.      *
  42.      * @ORM\Column(name="matricula", type="integer", nullable=true)
  43.      */
  44.     private ?int $matricula null;
  45.     /**
  46.      * @var int|null
  47.      *
  48.      * @ORM\Column(name="mat_ti", type="integer", nullable=true)
  49.      */
  50.     private ?int $matTi null;
  51.     /**
  52.      * @var string
  53.      *
  54.      * @ORM\Column(name="director", type="string", length=50, nullable=false)
  55.      */
  56.     private $director;
  57.     /**
  58.      * @var string
  59.      *
  60.      * @ORM\Column(name="sexo", type="string", length=1, nullable=false)
  61.      */
  62.     private $sexo;
  63.     /**
  64.      * @var string
  65.      *
  66.      * @ORM\Column(name="telefono", type="string", length=46, nullable=false)
  67.      */
  68.     private $telefono;
  69.     /**
  70.      * @var string
  71.      *
  72.      * @ORM\Column(name="correo", type="string", length=36, nullable=false)
  73.      */
  74.     private $correo;
  75.     /**
  76.      * @var string
  77.      *
  78.      * @ORM\Column(name="calle", type="string", length=80, nullable=false)
  79.      */
  80.     private $calle;
  81.     /**
  82.      * @var string
  83.      *
  84.      * @ORM\Column(name="colonia", type="string", length=60, nullable=true)
  85.      */
  86.     private $colonia;
  87.     /**
  88.      * @var string
  89.      *
  90.      * @ORM\Column(name="municipio", type="string", length=30, nullable=false)
  91.      */
  92.     private $municipio;
  93.     /**
  94.      * @var string
  95.      *
  96.      * @ORM\Column(name="cp", type="string", length=5, nullable=false)
  97.      */
  98.     private $cp;
  99.     // Métodos getter y setter para los campos nuevos:
  100.     public function getMatricula(): ?int
  101.     {
  102.         return $this->matricula;
  103.     }
  104.     public function setMatricula(?int $matricula): self
  105.     {
  106.         $this->matricula $matricula;
  107.         return $this;
  108.     }
  109.     public function getMatTi(): ?int
  110.     {
  111.         return $this->matTi;
  112.     }
  113.     public function setMatTi(?int $matTi): self
  114.     {
  115.         $this->matTi $matTi;
  116.         return $this;
  117.     }
  118.     # ---------------------------------------------------------------------------------------------------------- MÉTODOS
  119.     public function __toString()
  120.     {
  121.         return $this->nombre;
  122.     }
  123.     # ---------------------------------------------------------------------------------------------- GETTERS AND SETTERS
  124.     public function getIdUni(): ?int
  125.     {
  126.         return $this->idUni;
  127.     }
  128.     public function getNombre(): ?string
  129.     {
  130.         return $this->nombre;
  131.     }
  132.     public function setNombre(string $nombre): self
  133.     {
  134.         $this->nombre $nombre;
  135.         return $this;
  136.     }
  137.     public function getConsecutivo(): ?int
  138.     {
  139.         return $this->consecutivo;
  140.     }
  141.     public function setConsecutivo(?int $consecutivo): self
  142.     {
  143.         $this->consecutivo $consecutivo;
  144.         return $this;
  145.     }
  146.     public function getActiva(): ?bool
  147.     {
  148.         return $this->activa;
  149.     }
  150.     public function setActiva(bool $activa): self
  151.     {
  152.         $this->activa $activa;
  153.         return $this;
  154.     }
  155.     
  156.     public function getDirector(): ?string
  157.     {
  158.         return $this->director;
  159.     }
  160.     public function setDirector(string $director): self
  161.     {
  162.         $this->director $director;
  163.         return $this;
  164.     }
  165.     public function getSexo(): ?string
  166.     {
  167.         return $this->sexo;
  168.     }
  169.     public function setSexo(string $sexo): self
  170.     {
  171.         $this->sexo $sexo;
  172.         return $this;
  173.     }
  174.     public function getTelefono(): ?string
  175.     {
  176.         return $this->telefono;
  177.     }
  178.     public function setTelefono(string $telefono): self
  179.     {
  180.         $this->telefono $telefono;
  181.         return $this;
  182.     }
  183.     public function getCorreo(): ?string
  184.     {
  185.         return $this->correo;
  186.     }
  187.     public function setCorreo(string $correo): self
  188.     {
  189.         $this->correo $correo;
  190.         return $this;
  191.     }
  192.     public function getCalle(): ?string
  193.     {
  194.         return $this->calle;
  195.     }
  196.     public function setCalle(string $calle): self
  197.     {
  198.         $this->calle $calle;
  199.         return $this;
  200.     }
  201.     public function getColonia(): ?string
  202.     {
  203.         return $this->colonia;
  204.     }
  205.     public function setColonia(string $colonia): self
  206.     {
  207.         $this->colonia $colonia;
  208.         return $this;
  209.     }
  210.     public function getMunicipio(): ?string
  211.     {
  212.         return $this->municipio;
  213.     }
  214.     public function setMunicipio(string $municipio): self
  215.     {
  216.         $this->municipio $municipio;
  217.         return $this;
  218.     }
  219.     public function getCP(): ?string
  220.     {
  221.         return $this->cp;
  222.     }
  223.     public function setCP(string $cp): self
  224.     {
  225.         $this->cp $cp;
  226.         return $this;
  227.     }
  228.  
  229. // Entidad de unidad
  230. }