src/Entity/Impresora.php line 20

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\DBAL\Types\Types;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  6. use DateTimeInterface;
  7. /**
  8.  * Impresora
  9.  *
  10.  * @ORM\Table(name="impresora", indexes={
  11.  *     @ORM\Index(name="impresora_ubicacion_FK", columns={"ubicacion"}),
  12.  *     @ORM\Index(name="impresora_usuario_FK", columns={"usuario"})
  13.  * })
  14.  * @ORM\Entity(repositoryClass="App\Repository\ImpresoraRepository")
  15.  * @UniqueEntity(fields={"marbete"}, message="Existe un EQUIPO DE IMPRESIÓN registrado con el mismo marbete")
  16.  */
  17. class Impresora
  18. {
  19.     /**
  20.      * @var int
  21.      *
  22.      * @ORM\Column(name="id_imp", type="integer", nullable=false, options={"comment"="Identificador de la impresora"})
  23.      * @ORM\Id
  24.      * @ORM\GeneratedValue(strategy="IDENTITY")
  25.      */
  26.     private $idImp;
  27.     /**
  28.      * @var string|null
  29.      *
  30.      * @ORM\Column(name="marbete", type="string", length=50, nullable=true, options={"default"="NULL","comment"="Número de marbete asignado al equipo por el sistema de inventarios del Estado de México SICOPA."})
  31.      */
  32.     private $marbete '';
  33.     /**
  34.      * @var string|null
  35.      *
  36.      * @ORM\Column(name="descripcion", type="text", length=65535, nullable=true, options={"default"="NULL","comment"="Descripción de la impresora en turno"})
  37.      */
  38.     private $descripcion '';
  39.     /**
  40.      * @var string|null
  41.      *
  42.      * @ORM\Column(name="marca", type="string", length=50, nullable=true, options={"default"="NULL","comment"="Marca del equipo"})
  43.      */
  44.     private $marca '';
  45.     /**
  46.      * @var string|null
  47.      *
  48.      * @ORM\Column(name="modelo", type="string", length=50, nullable=true, options={"default"="NULL","comment"="Modelo del equipo"})
  49.      */
  50.     private $modelo '';
  51.     /**
  52.      * @var string|null
  53.      *
  54.      * @ORM\Column(name="serie", type="string", length=50, nullable=true, options={"default"="NULL","comment"="Número de serie del equipo"})
  55.      */
  56.     private $serie '';
  57.     /**
  58.      * @var string|null
  59.      *
  60.      * @ORM\Column(name="tipo", type="string", length=50, nullable=true, options={"default"="NULL","comment"="Láser/Matriz/Tinta/etc."})
  61.      */
  62.     private $tipo '';
  63.     /**
  64.      * @var string|null
  65.      *
  66.      * @ORM\Column(name="uso", type="string", length=20, nullable=true, options={"default"="NULL","comment"="Para describir el uso que se le da al equipo
  67. 1=Educativo
  68. 2=Docente
  69. 3=Administrativo"})
  70.      */
  71.     private $uso '';
  72.     /**
  73.      * @var string|null
  74.      *
  75.      * @ORM\Column(name="mac", type="string", length=18, nullable=true, options={"default"="NULL","comment"="Dirección MAC de la impresora"})
  76.      */
  77.     private $mac '';
  78.     /**
  79.      * @var string|null
  80.      *
  81.      * @ORM\Column(name="ip", type="string", length=16, nullable=true, options={"default"="NULL","comment"="Dirección IP de la impresora"})
  82.      */
  83.     private $ip '';
  84.     /**
  85.      * @var string|null
  86.      *
  87.      * @ORM\Column(name="estatus", type="string", length=20, nullable=true, options={"default"="NULL","comment"="Para indicar el estado en que se encuentra el equipo
  88. 1=En operación
  89. 2=Descompuesto
  90. 3=Sin instalar
  91. 4=En proceso de baja
  92. 5=Baja"})
  93.      */
  94.     private $estatus '';
  95.     /**
  96.      * @var \DateTime|null
  97.      *
  98.      * @ORM\Column(name="falta", type="datetime", nullable=true, options={"default"="CURRENT_TIMESTAMP"})
  99.      */
  100.     private $falta;
  101.     /**
  102.      * @var \DateTime|null
  103.      *
  104.      * @ORM\Column(name="factualizacion", type="datetime", nullable=true, options={"default"="CURRENT_TIMESTAMP"})
  105.      */
  106.     private $factualizacion;
  107.     /**
  108.      * @var \Ubicacion
  109.      *
  110.      * @ORM\ManyToOne(targetEntity="Ubicacion")
  111.      * @ORM\JoinColumns({
  112.      *   @ORM\JoinColumn(name="ubicacion", referencedColumnName="id_ubi")
  113.      * })
  114.      */
  115.     private $ubicacion;
  116.     /**
  117.      * @var \Usuario
  118.      *
  119.      * @ORM\ManyToOne(targetEntity="Usuario")
  120.      * @ORM\JoinColumns({
  121.      *   @ORM\JoinColumn(name="usuario", referencedColumnName="id_usu")
  122.      * })
  123.      */
  124.     private $usuario;
  125.     /**
  126.      * @var \Unidad
  127.      *
  128.      * @ORM\ManyToOne(targetEntity="Unidad")
  129.      * @ORM\JoinColumns({
  130.      *   @ORM\JoinColumn(name="unidad", referencedColumnName="id_uni")
  131.      * })
  132.      */
  133.     private $unidad;
  134.     /**
  135.      * @var int
  136.      *
  137.      * @ORM\Column(name="mantenimiento_count", type="integer", nullable=false, options={"default"=0, "comment"="Número de mantenimientos realizados"})
  138.      */
  139.     private $mantenimientoCount 0;
  140.     public function getMantenimientoCount(): ?int
  141.     {
  142.         return $this->mantenimientoCount;
  143.     }
  144.     public function setMantenimientoCount(int $mantenimientoCount): self
  145.     {
  146.         $this->mantenimientoCount $mantenimientoCount;
  147.         return $this;
  148.     }
  149.     public function incrementMantenimientoCount(): void
  150.     {
  151.         $this->mantenimientoCount++;
  152.     }
  153.     public function getIdImp(): ?int
  154.     {
  155.         return $this->idImp;
  156.     }
  157.     public function getMarbete(): ?string
  158.     {
  159.         return $this->marbete;
  160.     }
  161.     public function setMarbete(?string $marbete): self
  162.     {
  163.         $this->marbete $marbete;
  164.         return $this;
  165.     }
  166.     public function getDescripcion(): ?string
  167.     {
  168.         return $this->descripcion;
  169.     }
  170.     public function setDescripcion(?string $descripcion): self
  171.     {
  172.         $this->descripcion $descripcion;
  173.         return $this;
  174.     }
  175.     public function getMarca(): ?string
  176.     {
  177.         return $this->marca;
  178.     }
  179.     public function setMarca(?string $marca): self
  180.     {
  181.         $this->marca $marca;
  182.         return $this;
  183.     }
  184.     public function getModelo(): ?string
  185.     {
  186.         return $this->modelo;
  187.     }
  188.     public function setModelo(?string $modelo): self
  189.     {
  190.         $this->modelo $modelo;
  191.         return $this;
  192.     }
  193.     public function getSerie(): ?string
  194.     {
  195.         return $this->serie;
  196.     }
  197.     public function setSerie(?string $serie): self
  198.     {
  199.         $this->serie $serie;
  200.         return $this;
  201.     }
  202.     public function getTipo(): ?string
  203.     {
  204.         return $this->tipo;
  205.     }
  206.     public function setTipo(?string $tipo): self
  207.     {
  208.         $this->tipo $tipo;
  209.         return $this;
  210.     }
  211.     public function getUso(): ?string
  212.     {
  213.         return $this->uso;
  214.     }
  215.     public function setUso(?string $uso): self
  216.     {
  217.         $this->uso $uso;
  218.         return $this;
  219.     }
  220.     public function getMac(): ?string
  221.     {
  222.         return $this->mac;
  223.     }
  224.     public function setMac(?string $mac): self
  225.     {
  226.         $this->mac $mac;
  227.         return $this;
  228.     }
  229.     public function getIp(): ?string
  230.     {
  231.         return $this->ip;
  232.     }
  233.     public function setIp(?string $ip): self
  234.     {
  235.         $this->ip $ip;
  236.         return $this;
  237.     }
  238.     public function getEstatus(): ?string
  239.     {
  240.         return $this->estatus;
  241.     }
  242.     public function setEstatus(?string $estatus): self
  243.     {
  244.         $this->estatus $estatus;
  245.         return $this;
  246.     }
  247.     public function getFalta(): ?\DateTimeInterface
  248.     {
  249.         return $this->falta;
  250.     }
  251.     public function setFalta(?\DateTimeInterface $falta): self
  252.     {
  253.         $this->falta $falta;
  254.         return $this;
  255.     }
  256.     public function getFactualizacion(): ?\DateTimeInterface
  257.     {
  258.         return $this->factualizacion;
  259.     }
  260.     public function setFactualizacion(?\DateTimeInterface $factualizacion): self
  261.     {
  262.         $this->factualizacion $factualizacion;
  263.         return $this;
  264.     }
  265.     public function getUbicacion(): ?Ubicacion
  266.     {
  267.         return $this->ubicacion;
  268.     }
  269.     public function setUbicacion(?Ubicacion $ubicacion): self
  270.     {
  271.         $this->ubicacion $ubicacion;
  272.         return $this;
  273.     }
  274.     public function getUsuario(): ?Usuario
  275.     {
  276.         return $this->usuario;
  277.     }
  278.     public function setUsuario(?Usuario $usuario): self
  279.     {
  280.         $this->usuario $usuario;
  281.         return $this;
  282.     }
  283.     public function getUnidad(): ?Unidad
  284.     {
  285.         return $this->unidad;
  286.     }
  287.     public function setUnidad(?Unidad $unidad): self
  288.     {
  289.         $this->unidad $unidad;
  290.         return $this;
  291.     }
  292.     public function __toString(){
  293.         return $this->nombre;
  294.     }
  295.     // Entidad de impresora
  296. }