src/Entity/Equipo.php line 17

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 phpDocumentor\Reflection\Types\Integer;
  6. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  7. use DateTimeInterface;
  8. /**
  9.  * Equipo
  10.  *
  11.  * @ORM\Table(name="equipo", indexes={@ORM\Index(name="equipo_ubicacion_fk", columns={"ubicacion"}), @ORM\Index(name="equipo_usuario_fk", columns={"usuario"})})
  12.  * @ORM\Entity(repositoryClass="App\Repository\EquipoRepository")
  13.  * @UniqueEntity(fields={"marbete"}, message="Existe un EQUIPO registrado con el mismo marbete")
  14.  */
  15. class Equipo
  16. {
  17.     /**
  18.      * @var int
  19.      * @ORM\Column(name="id_equ", type="integer", nullable=false, options={"comment"="Identificador único del equipo informático."})
  20.      * @ORM\Id
  21.      * @ORM\GeneratedValue(strategy="IDENTITY")
  22.      */
  23.     private $idEqu;
  24.     /**
  25.      * @var string|null
  26.      * @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."})
  27.      */
  28.     protected $marbete;
  29.     //private $marbete = '';
  30.     /**
  31.      * @var string|null
  32.      * @ORM\Column(name="descripcion", type="text", length=65535, nullable=true, options={"default"="NULL","comment"="Descripción de la computadora en turno"})
  33.      */
  34.     private $descripcion '';
  35.     /**
  36.      * @var string|null
  37.      * @ORM\Column(name="marca", type="string", length=50, nullable=true, options={"default"="NULL","comment"="Marca del equipo."})
  38.      */
  39.     private $marca '';
  40.     /**
  41.      * @var string|null
  42.      * @ORM\Column(name="modelo", type="string", length=50, nullable=true, options={"default"="NULL","comment"="Modelo del equipo"})
  43.      */
  44.     private $modelo '';
  45.     /**
  46.      * @var string|null
  47.      *
  48.      * @ORM\Column(name="serie", type="string", length=50, nullable=true, options={"default"="NULL","comment"="Número de serie del equipo"})
  49.      */
  50.     private $serie '';
  51.     /**
  52.      * @var string|null
  53.      *
  54.      * @ORM\Column(name="procesador", type="string", length=80, nullable=true, options={"default"="NULL","comment"="Descripción completa del procesador o en su defecto la matricula del procesador."})
  55.      */
  56.     private $procesador '';
  57.     /**
  58.      * @var int|null
  59.      *
  60.      * @ORM\Column(name="nucleos", type="integer", nullable=true, options={"default"="NULL","comment"="Número de nucleos del procesador"})
  61.      */
  62.     private $nucleos 4;
  63.     /**
  64.      * @var string|null
  65.      *
  66.      * @ORM\Column(name="cpu_velocidad", type="string", length=40, nullable=true, options={"default"="NULL","comment"="Velocidad del procesador en GHz"})
  67.      */
  68.     private $cpuVelocidad 3.2;
  69.     /**
  70.      * @var string|null
  71.      *
  72.      * @ORM\Column(name="ram", type="string", length=40, nullable=true, options={"default"="NULL","comment"="Cantidad de memoria RAM de la computadora en GB"})
  73.      */
  74.     private $ram 4;
  75.     /**
  76.      * @var int|null
  77.      *
  78.      * @ORM\Column(name="hhd", type="integer", length=40, nullable=true, options={"default"="NULL","comment"="Capacidad del Disco Duro Mecánico de la computadora en GB"})
  79.      */
  80.     private $hhd '';
  81.     /**
  82.      * @var int|null
  83.      *
  84.      * @ORM\Column(name="ssd", type="integer", length=40, nullable=true, options={"default"="NULL","comment"="Capacidad del Disco Duro de Estado solido de la computadora en GB"})
  85.      */
  86.     private $ssd '';
  87.     /**
  88.      * @var string|null
  89.      *
  90.      * @ORM\Column(name="mac", type="string", length=18, nullable=true, options={"default"="NULL","comment"="Dirección MAC del equipo"})
  91.      */
  92.     private $mac '';
  93.     /**
  94.      * @var string|null
  95.      *
  96.      * @ORM\Column(name="ip", type="string", length=16, nullable=true, options={"default"="NULL","comment"="Dirección IP del equipo"})
  97.      */
  98.     private $ip '';
  99.     /**
  100.      * @var string|null
  101.      *
  102.      * @ORM\Column(name="monitor_marbete", type="string", length=50, nullable=true, options={"default"="NULL","comment"="Número de marbete asignado al monitor por el sistema de inventarios del estado de méxico SICOPA. Normalmente este numero es igual al marbete del equipo. Pero hay exepciones en donde puede ser diferente"})
  103.      */
  104.     private $monitorMarbete '';
  105.     /**
  106.      * @var string|null
  107.      *
  108.      * @ORM\Column(name="monitor_marca", type="string", length=50, nullable=true, options={"default"="NULL","comment"="Marca del monitor"})
  109.      */
  110.     private $monitorMarca '';
  111.     /**
  112.      * @var string|null
  113.      *
  114.      * @ORM\Column(name="monitor_modelo", type="string", length=50, nullable=true, options={"default"="NULL","comment"="Modelo del monitor"})
  115.      */
  116.     private $monitorModelo '';
  117.     /**
  118.      * @var string|null
  119.      *
  120.      * @ORM\Column(name="monitor_serie", type="string", length=50, nullable=true, options={"default"="NULL","comment"="Número de serie del teclado"})
  121.      */
  122.     private $monitorSerie '';
  123.     /**
  124.      * @var string|null
  125.      *
  126.      * @ORM\Column(name="monitor_tipo", type="string", length=20, nullable=true, options={"default"="NULL","comment"="Solo hay cuatro opciones: ""Monocromo"", ""VGA"", ""Supere VGA"" y ""Ultra VGA"""})
  127.      */
  128.     private $monitorTipo '';
  129.     /**
  130.      * @var string|null
  131.      *
  132.      * @ORM\Column(name="monitor_pulgadas", type="string", length=20, nullable=true, options={"default"="NULL","comment"="Pulgadas diagonales del monitor"})
  133.      */
  134.     private $monitorPulgadas '';
  135.     /**
  136.      * @var string|null
  137.      *
  138.      * @ORM\Column(name="teclado_marca", type="string", length=50, nullable=true, options={"default"="NULL","comment"="Marca del teclado"})
  139.      */
  140.     private $tecladoMarca '';
  141.     /**
  142.      * @var string|null
  143.      *
  144.      * @ORM\Column(name="teclado_modelo", type="string", length=50, nullable=true, options={"default"="NULL","comment"="Modelo del teclado"})
  145.      */
  146.     private $tecladoModelo '';
  147.     /**
  148.      * @var string|null
  149.      *
  150.      * @ORM\Column(name="teclado_serie", type="string", length=50, nullable=true, options={"default"="NULL","comment"="Número de serie del teclado"})
  151.      */
  152.     private $tecladoSerie '';
  153.     /**
  154.      * @var string|null
  155.      *
  156.      * @ORM\Column(name="mouse_marca", type="string", length=50, nullable=true, options={"default"="NULL","comment"="Marca del mouse"})
  157.      */
  158.     private $mouseMarca '';
  159.     /**
  160.      * @var string|null
  161.      *
  162.      * @ORM\Column(name="mouse_modelo", type="string", length=50, nullable=true, options={"default"="NULL","comment"="Modelo del mouse"})
  163.      */
  164.     private $mouseModelo '';
  165.     /**
  166.      * @var string|null
  167.      *
  168.      * @ORM\Column(name="mouse_serie", type="string", length=50, nullable=true, options={"default"="NULL","comment"="Número de serie del mouse"})
  169.      */
  170.     private $mouseSerie '';
  171.     /**
  172.      * @var string|null
  173.      *
  174.      * @ORM\Column(name="uso", type="string", length=20, nullable=true, options={"default"="NULL","comment"="Para describir el uso que se le da al equipo
  175. 1=Educativo
  176. 2=Docente
  177. 3=Administrativo"})
  178.      */
  179.     private $uso '';
  180.     /**
  181.      * @var string|null
  182.      *
  183.      * @ORM\Column(name="funcion", type="string", length=20, nullable=true, options={"default"="NULL","comment"="función principal Servidor / ecritorio SW instalado
  184. 1=Escritorio
  185. 2=Servidor
  186. "})
  187.      */
  188.     private $funcion '';
  189.     /**
  190.      * @var string|null
  191.      *
  192.      * @ORM\Column(name="funcion_descripcion", type="text", length=65535, nullable=true, options={"default"="NULL","comment"="Para la carrera, o tipo de servidor o controlador"})
  193.      */
  194.     private $funcionDescripcion '';
  195.     /**
  196.      * @var string|null
  197.      *
  198.      * @ORM\Column(name="estatus", type="string", length=20, nullable=true, options={"default"="NULL","comment"="Para indicar el estado en que se encuentra el equipo
  199. 1=En operación
  200. 2=Descompuesto
  201. 3=Sin instalar
  202. 4=En proceso de baja
  203. 5=Baja"})
  204.      */
  205.     private $estatus '';
  206.     /**
  207.      * @var \DateTime|null
  208.      * @ORM\Column(name="falta", type="datetime", options={"default"="CURRENT_TIMESTAMP"})
  209.      */
  210.     private $falta;
  211.     /**
  212.      * @var \DateTime|null
  213.      * @ORM\Column(name="factualizacion", type="datetime", options={"default"="CURRENT_TIMESTAMP"})
  214.      */
  215.     private $factualizacion;
  216.     /**
  217.      * @var bool|null
  218.      *
  219.      * @ORM\Column(name="emhv", type="boolean", nullable=true, options={"default"="NULL","comment"="Solo hay dos opciones: ""1"" si cumple con EMHV o ""0"" si no cumple con EMHV."})
  220.      */
  221.     private $emhv;
  222.     /**
  223.      * @var Usuario
  224.      *
  225.      * @ORM\ManyToOne(targetEntity="Usuario")
  226.      * @ORM\JoinColumns({
  227.      *   @ORM\JoinColumn(name="usuario", referencedColumnName="id_usu")
  228.      * })
  229.      */
  230.     private $usuario;
  231.     /**
  232.      * @var Ubicacion
  233.      *
  234.      * @ORM\ManyToOne(targetEntity="Ubicacion")
  235.      * @ORM\JoinColumns({
  236.      *   @ORM\JoinColumn(name="ubicacion", referencedColumnName="id_ubi")
  237.      * })
  238.      */
  239.     private $ubicacion;
  240.     /**
  241.      * @var \Unidad
  242.      *
  243.      * @ORM\ManyToOne(targetEntity="Unidad")
  244.      * @ORM\JoinColumns({
  245.      *   @ORM\JoinColumn(name="unidad", referencedColumnName="id_uni")
  246.      * })
  247.      */
  248.     private $unidad;
  249.     /**
  250.      * @var int
  251.      *
  252.      * @ORM\Column(name="mantenimiento_count", type="integer", nullable=false, options={"default"=0, "comment"="Número de mantenimientos realizados"})
  253.      */
  254.     private $mantenimientoCount 0;
  255.     /**
  256.      * @var bool|null
  257.      *
  258.      * @ORM\Column(name="allinone", type="boolean", options={"default" : 0}, nullable=true)
  259.      */
  260.     private ?bool $allinone false;
  261.     /**
  262.      * @var bool|null
  263.      *
  264.      *
  265.      * @ORM\Column(name="actualizable", type="boolean", options={"default" : 1}, nullable=true)
  266.      */
  267.     private ?bool $actualizable true;
  268.     public function getAllinone(): ?bool
  269.     {
  270.         return $this->allinone;
  271.     }
  272.     public function setAllinone(?bool $allinone): self
  273.     {
  274.         $this->allinone $allinone;
  275.         return $this;
  276.     }
  277.     public function getActualizable(): ?bool
  278.     {
  279.         return $this->actualizable;
  280.     }
  281.     public function setActualizable(?bool $actualizable): self
  282.     {
  283.         $this->actualizable $actualizable;
  284.         return $this;
  285.     }
  286.     public function getMantenimientoCount(): ?int
  287.     {
  288.         return $this->mantenimientoCount;
  289.     }
  290.     public function setMantenimientoCount(int $mantenimientoCount): self
  291.     {
  292.         $this->mantenimientoCount $mantenimientoCount;
  293.         return $this;
  294.     }
  295.     public function incrementMantenimientoCount(): void
  296.     {
  297.         $this->mantenimientoCount++;
  298.     }
  299.     public function getIdEqu(): ?int
  300.     {
  301.         return $this->idEqu;
  302.     }
  303.     public function getMarbete(): ?string
  304.     {
  305.         return $this->marbete;
  306.     }
  307.     public function setMarbete(?string $marbete): self
  308.     {
  309.         $this->marbete $marbete;
  310.         return $this;
  311.     }
  312.     public function getDescripcion(): ?string
  313.     {
  314.         return $this->descripcion;
  315.     }
  316.     public function setDescripcion(?string $descripcion): self
  317.     {
  318.         $this->descripcion $descripcion;
  319.         return $this;
  320.     }
  321.     public function getMarca(): ?string
  322.     {
  323.         return $this->marca;
  324.     }
  325.     public function setMarca(?string $marca): self
  326.     {
  327.         $this->marca $marca;
  328.         return $this;
  329.     }
  330.     public function getModelo(): ?string
  331.     {
  332.         return $this->modelo;
  333.     }
  334.     public function setModelo(?string $modelo): self
  335.     {
  336.         $this->modelo $modelo;
  337.         return $this;
  338.     }
  339.     public function getSerie(): ?string
  340.     {
  341.         return $this->serie;
  342.     }
  343.     public function setSerie(?string $serie): self
  344.     {
  345.         $this->serie $serie;
  346.         return $this;
  347.     }
  348.     public function getProcesador(): ?string
  349.     {
  350.         return $this->procesador;
  351.     }
  352.     public function setProcesador(?string $procesador): self
  353.     {
  354.         $this->procesador $procesador;
  355.         return $this;
  356.     }
  357.     public function getNucleos(): ?int
  358.     {
  359.         return $this->nucleos;
  360.     }
  361.     public function setNucleos(?int $nucleos): self
  362.     {
  363.         $this->nucleos $nucleos;
  364.         return $this;
  365.     }
  366.     public function getCpuVelocidad(): ?string
  367.     {
  368.         return $this->cpuVelocidad;
  369.     }
  370.     public function setCpuVelocidad(?string $cpuVelocidad): self
  371.     {
  372.         $this->cpuVelocidad $cpuVelocidad;
  373.         return $this;
  374.     }
  375.     public function getRam(): ?string
  376.     {
  377.         return $this->ram;
  378.     }
  379.     public function setRam(?string $ram): self
  380.     {
  381.         $this->ram $ram;
  382.         return $this;
  383.     }
  384.     public function getHhd(): ?int
  385.     {
  386.         return $this->hhd !== null ? (int) $this->hhd null;
  387.     }
  388.     public function setHhd(?int $hhd): self
  389.     {
  390.         $this->hhd $hhd !== null ? (int) $hhd null;
  391.         return $this;
  392.     }
  393.     public function getSsd(): ?int
  394.     {
  395.         return $this->ssd !== null ? (int) $this->ssd null;
  396.     }
  397.     public function setSsd(?int $ssd): self
  398.     {
  399.         $this->ssd $ssd !== null ? (int) $ssd null;
  400.         return $this;
  401.     }
  402.     public function getMac(): ?string
  403.     {
  404.         return $this->mac;
  405.     }
  406.     public function setMac(?string $mac): self
  407.     {
  408.         $this->mac $mac;
  409.         return $this;
  410.     }
  411.     public function getIp(): ?string
  412.     {
  413.         return $this->ip;
  414.     }
  415.     public function setIp(?string $ip): self
  416.     {
  417.         $this->ip $ip;
  418.         return $this;
  419.     }
  420.     public function getMonitorMarbete(): ?string
  421.     {
  422.         return $this->monitorMarbete;
  423.     }
  424.     public function setMonitorMarbete(?string $monitorMarbete): self
  425.     {
  426.         $this->monitorMarbete $monitorMarbete;
  427.         return $this;
  428.     }
  429.     public function getMonitorMarca(): ?string
  430.     {
  431.         return $this->monitorMarca;
  432.     }
  433.     public function setMonitorMarca(?string $monitorMarca): self
  434.     {
  435.         $this->monitorMarca $monitorMarca;
  436.         return $this;
  437.     }
  438.     public function getMonitorModelo(): ?string
  439.     {
  440.         return $this->monitorModelo;
  441.     }
  442.     public function setMonitorModelo(?string $monitorModelo): self
  443.     {
  444.         $this->monitorModelo $monitorModelo;
  445.         return $this;
  446.     }
  447.     public function getMonitorSerie(): ?string
  448.     {
  449.         return $this->monitorSerie;
  450.     }
  451.     public function setMonitorSerie(?string $monitorSerie): self
  452.     {
  453.         $this->monitorSerie $monitorSerie;
  454.         return $this;
  455.     }
  456.     public function getMonitorTipo(): ?string
  457.     {
  458.         return $this->monitorTipo;
  459.     }
  460.     public function setMonitorTipo(?string $monitorTipo): self
  461.     {
  462.         $this->monitorTipo $monitorTipo;
  463.         return $this;
  464.     }
  465.     public function getMonitorPulgadas(): ?string
  466.     {
  467.         return $this->monitorPulgadas;
  468.     }
  469.     public function setMonitorPulgadas(?string $monitorPulgadas): self
  470.     {
  471.         $this->monitorPulgadas $monitorPulgadas;
  472.         return $this;
  473.     }
  474.     public function getTecladoMarca(): ?string
  475.     {
  476.         return $this->tecladoMarca;
  477.     }
  478.     public function setTecladoMarca(?string $tecladoMarca): self
  479.     {
  480.         $this->tecladoMarca $tecladoMarca;
  481.         return $this;
  482.     }
  483.     public function getTecladoModelo(): ?string
  484.     {
  485.         return $this->tecladoModelo;
  486.     }
  487.     public function setTecladoModelo(?string $tecladoModelo): self
  488.     {
  489.         $this->tecladoModelo $tecladoModelo;
  490.         return $this;
  491.     }
  492.     public function getTecladoSerie(): ?string
  493.     {
  494.         return $this->tecladoSerie;
  495.     }
  496.     public function setTecladoSerie(?string $tecladoSerie): self
  497.     {
  498.         $this->tecladoSerie $tecladoSerie;
  499.         return $this;
  500.     }
  501.     public function getMouseMarca(): ?string
  502.     {
  503.         return $this->mouseMarca;
  504.     }
  505.     public function setMouseMarca(?string $mouseMarca): self
  506.     {
  507.         $this->mouseMarca $mouseMarca;
  508.         return $this;
  509.     }
  510.     public function getMouseModelo(): ?string
  511.     {
  512.         return $this->mouseModelo;
  513.     }
  514.     public function setMouseModelo(?string $mouseModelo): self
  515.     {
  516.         $this->mouseModelo $mouseModelo;
  517.         return $this;
  518.     }
  519.     public function getMouseSerie(): ?string
  520.     {
  521.         return $this->mouseSerie;
  522.     }
  523.     public function setMouseSerie(?string $mouseSerie): self
  524.     {
  525.         $this->mouseSerie $mouseSerie;
  526.         return $this;
  527.     }
  528.     public function getUso(): ?string
  529.     {
  530.         return $this->uso;
  531.     }
  532.     public function setUso(?string $uso): self
  533.     {
  534.         $this->uso $uso;
  535.         return $this;
  536.     }
  537.     public function getFuncion(): ?string
  538.     {
  539.         return $this->funcion;
  540.     }
  541.     public function setFuncion(?string $funcion): self
  542.     {
  543.         $this->funcion $funcion;
  544.         return $this;
  545.     }
  546.     public function getFuncionDescripcion(): ?string
  547.     {
  548.         return $this->funcionDescripcion;
  549.     }
  550.     public function setFuncionDescripcion(?string $funcionDescripcion): self
  551.     {
  552.         $this->funcionDescripcion $funcionDescripcion;
  553.         return $this;
  554.     }
  555.     public function getEstatus(): ?string
  556.     {
  557.         return $this->estatus;
  558.     }
  559.     public function setEstatus(?string $estatus): self
  560.     {
  561.         $this->estatus $estatus;
  562.         return $this;
  563.     }
  564.     public function getFalta(): ?\DateTimeInterface
  565.     {
  566.         return $this->falta;
  567.     }
  568.     public function setFalta(?\DateTimeInterface $falta): self
  569.     {
  570.         $this->falta $falta;
  571.         return $this;
  572.     }
  573.     public function getFactualizacion(): ?\DateTimeInterface
  574.     {
  575.         return $this->factualizacion;
  576.     }
  577.     public function setFactualizacion(?\DateTimeInterface $factualizacion): self
  578.     {
  579.         $this->factualizacion $factualizacion;
  580.         return $this;
  581.     }
  582.     public function isEmhv(): ?bool
  583.     {
  584.         return $this->emhv;
  585.     }
  586.     public function setEmhv(?bool $emhv): self
  587.     {
  588.         $this->emhv $emhv;
  589.         return $this;
  590.     }
  591.     public function getUsuario(): ?Usuario
  592.     {
  593.         return $this->usuario;
  594.     }
  595.     public function setUsuario(?Usuario $usuario): self
  596.     {
  597.         $this->usuario $usuario;
  598.         return $this;
  599.     }
  600.     public function getUbicacion(): ?Ubicacion
  601.     {
  602.         return $this->ubicacion;
  603.     }
  604.     public function setUbicacion(?Ubicacion $ubicacion): self
  605.     {
  606.         $this->ubicacion $ubicacion;
  607.         return $this;
  608.     }
  609.     public function getUnidad(): ?Unidad
  610.     {
  611.         return $this->unidad;
  612.     }
  613.     public function setUnidad(?Unidad $unidad): self
  614.     {
  615.         $this->unidad $unidad;
  616.         return $this;
  617.     }
  618.     public function __toString(){
  619.         //return $this->marbete;
  620.         return "(" $this->idEqu") " $this->marbete;
  621.     }
  622.     // Entidad de equipo
  623. }