<?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;
/**
* @var int|null
*
* @ORM\Column(name="matricula", type="integer", nullable=true)
*/
private ?int $matricula = null;
/**
* @var int|null
*
* @ORM\Column(name="mat_ti", type="integer", nullable=true)
*/
private ?int $matTi = null;
/**
* @var string
*
* @ORM\Column(name="director", type="string", length=50, nullable=false)
*/
private $director;
/**
* @var string
*
* @ORM\Column(name="sexo", type="string", length=1, nullable=false)
*/
private $sexo;
/**
* @var string
*
* @ORM\Column(name="telefono", type="string", length=46, nullable=false)
*/
private $telefono;
/**
* @var string
*
* @ORM\Column(name="correo", type="string", length=36, nullable=false)
*/
private $correo;
/**
* @var string
*
* @ORM\Column(name="calle", type="string", length=80, nullable=false)
*/
private $calle;
/**
* @var string
*
* @ORM\Column(name="colonia", type="string", length=60, nullable=true)
*/
private $colonia;
/**
* @var string
*
* @ORM\Column(name="municipio", type="string", length=30, nullable=false)
*/
private $municipio;
/**
* @var string
*
* @ORM\Column(name="cp", type="string", length=5, nullable=false)
*/
private $cp;
// Métodos getter y setter para los campos nuevos:
public function getMatricula(): ?int
{
return $this->matricula;
}
public function setMatricula(?int $matricula): self
{
$this->matricula = $matricula;
return $this;
}
public function getMatTi(): ?int
{
return $this->matTi;
}
public function setMatTi(?int $matTi): self
{
$this->matTi = $matTi;
return $this;
}
# ---------------------------------------------------------------------------------------------------------- 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;
}
public function getDirector(): ?string
{
return $this->director;
}
public function setDirector(string $director): self
{
$this->director = $director;
return $this;
}
public function getSexo(): ?string
{
return $this->sexo;
}
public function setSexo(string $sexo): self
{
$this->sexo = $sexo;
return $this;
}
public function getTelefono(): ?string
{
return $this->telefono;
}
public function setTelefono(string $telefono): self
{
$this->telefono = $telefono;
return $this;
}
public function getCorreo(): ?string
{
return $this->correo;
}
public function setCorreo(string $correo): self
{
$this->correo = $correo;
return $this;
}
public function getCalle(): ?string
{
return $this->calle;
}
public function setCalle(string $calle): self
{
$this->calle = $calle;
return $this;
}
public function getColonia(): ?string
{
return $this->colonia;
}
public function setColonia(string $colonia): self
{
$this->colonia = $colonia;
return $this;
}
public function getMunicipio(): ?string
{
return $this->municipio;
}
public function setMunicipio(string $municipio): self
{
$this->municipio = $municipio;
return $this;
}
public function getCP(): ?string
{
return $this->cp;
}
public function setCP(string $cp): self
{
$this->cp = $cp;
return $this;
}
// Entidad de unidad
}