瀏覽代碼

FD3-295 Campos link y slot en ONU. Se modificó constant en NAP

Guillermo Espinoza 7 年之前
父節點
當前提交
1e17831054
共有 2 個文件被更改,包括 55 次插入1 次删除
  1. 1 1
      src/FTTHBundle/Entity/NAP.php
  2. 54 0
      src/FTTHBundle/Entity/ONU.php

+ 1 - 1
src/FTTHBundle/Entity/NAP.php

@@ -24,7 +24,7 @@ class NAP implements TenancyIdTraitInterface, LocationInterface
     use LocationTrait;
     use LocationTrait;
 
 
     // Cantidad máxima de ONU por NAP
     // Cantidad máxima de ONU por NAP
-    const MAX_NUMBER_ONU = 64;
+    const MAX_NUMBER_ONU = 8;
 
 
     /**
     /**
      * @var int
      * @var int

+ 54 - 0
src/FTTHBundle/Entity/ONU.php

@@ -148,6 +148,20 @@ class ONU implements DeviceInterface, TenancyIdTraitInterface, LocationInterface
      * @Assert\Callback({"FTTHBundle\Validator\ONUPositionValidator", "validate"})
      * @Assert\Callback({"FTTHBundle\Validator\ONUPositionValidator", "validate"})
      */
      */
     private $position = 0;
     private $position = 0;
+    
+    /**
+     * @var int
+     * 
+     * @ORM\Column(type="integer", nullable=true)
+     */
+    protected $slot;
+    
+    /**
+     * @var int
+     * 
+     * @ORM\Column(type="integer", nullable=true)
+     */
+    protected $link;  
 
 
 
 
     /**
     /**
@@ -470,7 +484,47 @@ class ONU implements DeviceInterface, TenancyIdTraitInterface, LocationInterface
 
 
         return $this;
         return $this;
     }
     }
+    
+    /**
+     * @return int
+     */
+    public function getSlot()
+    {
+        return $this->slot;
+    }
+
+    /**
+     * @return int
+     */
+    public function getLink()
+    {
+        return $this->link;
+    }
+
+    /**
+     * @param int $slot
+     * 
+     * @return $this
+     */
+    public function setSlot($slot)
+    {
+        $this->slot = $slot;
+        
+        return $this;
+    }
 
 
+    /**
+     * @param int $link
+     * 
+     * @return $this
+     */
+    public function setLink($link)
+    {
+        $this->link = $link;
+        
+        return $this;
+    }
+    
     /**
     /**
      * Si la ONU no tiene NAP retorna 0
      * Si la ONU no tiene NAP retorna 0
      * De lo contrario recorre y retorna la primer position
      * De lo contrario recorre y retorna la primer position