src/Entity/Red.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.  * Red
  9.  *
  10.  * @ORM\Table(name="red", indexes={
  11.  *     @ORM\Index(name="red_usuario_FK", columns={"usuario"}),
  12.  *     @ORM\Index(name="red_ubicacion_FK", columns={"ubicacion"})
  13.  * })
  14.  * @ORM\Entity(repositoryClass="App\Repository\RedRepository")
  15.  * @UniqueEntity(fields={"marbete"}, message="Existe un EQUIPO DE RED registrado con el mismo marbete")
  16.  */
  17. class Red
  18. {
  19.     /**
  20.      * @var int
  21.      *
  22.      * @ORM\Column(name="id_red", type="integer", nullable=false, options={"comment"="Identificador del equipo de comunicacion"})
  23.      * @ORM\Id
  24.      * @ORM\GeneratedValue(strategy="IDENTITY")
  25.      */
  26.     private $idRed;
  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 del equipo de red 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="velocidad", type="string", length=20, nullable=true, options={"default"="NULL","comment"="Máxima velocidad de los puertos"})
  61.      */
  62.     private $velocidad '';
  63.     /**
  64.      * @var string|null
  65.      *
  66.      * @ORM\Column(name="puertos", type="string", length=20, nullable=true, options={"default"="NULL","comment"="Númeor de puertos"})
  67.      */
  68.     private $puertos '';
  69.     /**
  70.      * @var string|null
  71.      *
  72.      * @ORM\Column(name="uso", type="string", length=20, nullable=true, options={"default"="NULL","comment"="Para describir el uso que se le da al equipo
  73. 1=Educativo
  74.     2=Docente
  75.     3=Administrativo"})
  76.      */
  77.     private $uso '';
  78.     /**
  79.      * @var string|null
  80.      *
  81.      * @ORM\Column(name="mac", type="string", length=18, nullable=true, options={"default"="NULL","comment"="Dirección MAC del equipo de red"})
  82.      */
  83.     private $mac '';
  84.     /**
  85.      * @var string|null
  86.      *
  87.      * @ORM\Column(name="ip", type="string", length=16, nullable=true, options={"default"="NULL","comment"="Dirección IP del equipo de red"})
  88.      */
  89.     private $ip '';
  90.     /**
  91.      * @var string|null
  92.      *
  93.      * @ORM\Column(name="estatus", type="string", length=20, nullable=true, options={"default"="NULL","comment"="Para indicar el estado en que se encuentra el equipo
  94.         1=En operación
  95.         2=Descompuesto
  96.         3=Sin instalar
  97.         4=En proceso de baja
  98.         5=Baja"})
  99.      */
  100.     private $estatus '';
  101.     /**
  102.      * @var \DateTime|null
  103.      *
  104.      * @ORM\Column(name="falta", type="datetime", nullable=true, options={"default"="CURRENT_TIMESTAMP"})
  105.      */
  106.     private $falta;
  107.     /**
  108.      * @var \DateTime|null
  109.      *
  110.      * @ORM\Column(name="factualizacion", type="datetime", nullable=true, options={"default"="CURRENT_TIMESTAMP"})
  111.      */
  112.     private $factualizacion;
  113.     /**
  114.      * @var \Ubicacion
  115.      *
  116.      * @ORM\ManyToOne(targetEntity="Ubicacion")
  117.      * @ORM\JoinColumns({
  118.      *   @ORM\JoinColumn(name="ubicacion", referencedColumnName="id_ubi")
  119.      * })
  120.      */
  121.     private $ubicacion;
  122.     /**
  123.      * @var \Usuario
  124.      *
  125.      * @ORM\ManyToOne(targetEntity="Usuario")
  126.      * @ORM\JoinColumns({
  127.      *   @ORM\JoinColumn(name="usuario", referencedColumnName="id_usu")
  128.      * })
  129.      */
  130.     private $usuario;
  131.     /**
  132.      * @var Unidad
  133.      *
  134.      * @ORM\ManyToOne(targetEntity="Unidad")
  135.      * @ORM\JoinColumns({
  136.      *   @ORM\JoinColumn(name="unidad", referencedColumnName="id_uni")
  137.      * })
  138.      */
  139.     private $unidad;
  140.     /**
  141.      * @var int
  142.      *
  143.      * @ORM\Column(name="mantenimiento_count", type="integer", nullable=false, options={"default"=0, "comment"="Número de mantenimientos realizados"})
  144.      */
  145.     private $mantenimientoCount 0;
  146.     public function getMantenimientoCount(): ?int
  147.     {
  148.         return $this->mantenimientoCount;
  149.     }
  150.     public function setMantenimientoCount(int $mantenimientoCount): self
  151.     {
  152.         $this->mantenimientoCount $mantenimientoCount;
  153.         return $this;
  154.     }
  155.     public function incrementMantenimientoCount(): void
  156.     {
  157.         $this->mantenimientoCount++;
  158.     }
  159.     public function getIdRed(): ?int
  160.     {
  161.         return $this->idRed;
  162.     }
  163.     public function getMarbete(): ?string
  164.     {
  165.         return $this->marbete;
  166.     }
  167.     public function setMarbete(?string $marbete): self
  168.     {
  169.         $this->marbete $marbete;
  170.         return $this;
  171.     }
  172.     public function getDescripcion(): ?string
  173.     {
  174.         return $this->descripcion;
  175.     }
  176.     public function setDescripcion(?string $descripcion): self
  177.     {
  178.         $this->descripcion $descripcion;
  179.         return $this;
  180.     }
  181.     public function getMarca(): ?string
  182.     {
  183.         return $this->marca;
  184.     }
  185.     public function setMarca(?string $marca): self
  186.     {
  187.         $this->marca $marca;
  188.         return $this;
  189.     }
  190.     public function getModelo(): ?string
  191.     {
  192.         return $this->modelo;
  193.     }
  194.     public function setModelo(?string $modelo): self
  195.     {
  196.         $this->modelo $modelo;
  197.         return $this;
  198.     }
  199.     public function getSerie(): ?string
  200.     {
  201.         return $this->serie;
  202.     }
  203.     public function setSerie(?string $serie): self
  204.     {
  205.         $this->serie $serie;
  206.         return $this;
  207.     }
  208.     public function getVelocidad(): ?string
  209.     {
  210.         return $this->velocidad;
  211.     }
  212.     public function setVelocidad(?string $velocidad): self
  213.     {
  214.         $this->velocidad $velocidad;
  215.         return $this;
  216.     }
  217.     public function getPuertos(): ?string
  218.     {
  219.         return $this->puertos;
  220.     }
  221.     public function setPuertos(?string $puertos): self
  222.     {
  223.         $this->puertos $puertos;
  224.         return $this;
  225.     }
  226.     public function getUso(): ?string
  227.     {
  228.         return $this->uso;
  229.     }
  230.     public function setUso(?string $uso): self
  231.     {
  232.         $this->uso $uso;
  233.         return $this;
  234.     }
  235.     public function getMac(): ?string
  236.     {
  237.         return $this->mac;
  238.     }
  239.     public function setMac(?string $mac): self
  240.     {
  241.         $this->mac $mac;
  242.         return $this;
  243.     }
  244.     public function getIp(): ?string
  245.     {
  246.         return $this->ip;
  247.     }
  248.     public function setIp(?string $ip): self
  249.     {
  250.         $this->ip $ip;
  251.         return $this;
  252.     }
  253.     public function getEstatus(): ?string
  254.     {
  255.         return $this->estatus;
  256.     }
  257.     public function setEstatus(?string $estatus): self
  258.     {
  259.         $this->estatus $estatus;
  260.         return $this;
  261.     }
  262.     public function getFalta(): ?\DateTimeInterface
  263.     {
  264.         return $this->falta;
  265.     }
  266.     public function setFalta(?\DateTimeInterface $falta): self
  267.     {
  268.         $this->falta $falta;
  269.         return $this;
  270.     }
  271.     public function getFactualizacion(): ?\DateTimeInterface
  272.     {
  273.         return $this->factualizacion;
  274.     }
  275.     public function setFactualizacion(?\DateTimeInterface $factualizacion): self
  276.     {
  277.         $this->factualizacion $factualizacion;
  278.         return $this;
  279.     }
  280.     public function getUbicacion(): ?Ubicacion
  281.     {
  282.         return $this->ubicacion;
  283.     }
  284.     public function setUbicacion(?Ubicacion $ubicacion): self
  285.     {
  286.         $this->ubicacion $ubicacion;
  287.         return $this;
  288.     }
  289.     public function getUsuario(): ?Usuario
  290.     {
  291.         return $this->usuario;
  292.     }
  293.     public function setUsuario(?Usuario $usuario): self
  294.     {
  295.         $this->usuario $usuario;
  296.         return $this;
  297.     }
  298.     public function getUnidad(): ?Unidad
  299.     {
  300.         return $this->unidad;
  301.     }
  302.     public function setUnidad(?Unidad $unidad): self
  303.     {
  304.         $this->unidad $unidad;
  305.         return $this;
  306.     }
  307. // Entidad de red
  308. }