|
@@ -3,11 +3,8 @@
|
|
|
namespace StatsBundle\Entity;
|
|
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
-use ExtraDataBundle\Entity\Traits\ExtraDataTrait;
|
|
|
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
|
|
use Symfony\Component\Validator\Constraints as Assert;
|
|
|
-use Symfony\Component\Workflow\Exception\ExceptionInterface;
|
|
|
-
|
|
|
|
|
|
/**
|
|
|
* @ORM\Table
|
|
@@ -34,9 +31,9 @@ class Onu
|
|
|
* @ORM\Column(type="integer", nullable=true)
|
|
|
*
|
|
|
*/
|
|
|
- private $oltDeviceId;
|
|
|
-
|
|
|
- /**
|
|
|
+ private $oltDeviceId;
|
|
|
+
|
|
|
+ /**
|
|
|
* @ORM\Id
|
|
|
* @ORM\ManyToOne(targetEntity="DeviceServer", inversedBy="devices", fetch="EXTRA_LAZY")
|
|
|
*
|
|
@@ -49,15 +46,15 @@ class Onu
|
|
|
* @ORM\Column(type="integer", nullable=true)
|
|
|
*
|
|
|
*/
|
|
|
- private $deviceId;
|
|
|
-
|
|
|
+ private $deviceId;
|
|
|
+
|
|
|
/**
|
|
|
* @var int
|
|
|
*
|
|
|
* @ORM\Column(type="integer", nullable=false, options={"default":1})
|
|
|
*/
|
|
|
protected $tenancyId = 1;
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* @var string
|
|
|
*
|
|
@@ -66,21 +63,21 @@ class Onu
|
|
|
* @Assert\Ip
|
|
|
*/
|
|
|
private $ip;
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* @var string
|
|
|
*
|
|
|
* @ORM\Column(type="string", length=12, nullable=true)
|
|
|
*/
|
|
|
private $mac;
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* @var string
|
|
|
*
|
|
|
* @ORM\Column(type="string", length=25, nullable=true)
|
|
|
*/
|
|
|
private $serialNumber;
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* @ORM\Column(type="string", length=25, nullable=true)
|
|
|
*/
|
|
@@ -90,22 +87,22 @@ class Onu
|
|
|
* @ORM\Column(name="status", type="boolean", nullable=true, columnDefinition="BOOLEAN DEFAULT FALSE")
|
|
|
*/
|
|
|
public $status = false;
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* @ORM\Column(type="decimal", precision=6, scale=3, nullable=true)
|
|
|
*/
|
|
|
public $txPower;
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* @ORM\Column(type="decimal", precision=6, scale=3, nullable=true)
|
|
|
*/
|
|
|
public $rxPower;
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* @ORM\Column(type="decimal", precision=6, scale=3, nullable=true)
|
|
|
*/
|
|
|
public $voltage;
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* @ORM\Column(type="decimal", precision=6, scale=3, nullable=true)
|
|
|
*/
|
|
@@ -120,11 +117,12 @@ class Onu
|
|
|
* @ORM\Column(type="datetime")
|
|
|
*/
|
|
|
protected $updated;
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* @return string
|
|
|
*/
|
|
|
- public function getId()
|
|
|
+ public function getId()
|
|
|
{
|
|
|
return sprintf('%s~%s~%s', strtolower($this->ponSerialNumber), $this->oltDeviceId, $this->deviceServer->getId());
|
|
|
}
|
|
@@ -229,7 +227,7 @@ class Onu
|
|
|
return strtoupper($this->ponSerialNumber);
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
+ /**
|
|
|
* Set ponPort
|
|
|
*
|
|
|
* @param string $ponPort
|
|
@@ -272,7 +270,7 @@ class Onu
|
|
|
{
|
|
|
return $this->deviceId;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* @param int $oltDeviceId
|
|
|
*
|
|
@@ -313,9 +311,9 @@ class Onu
|
|
|
return $this;
|
|
|
}
|
|
|
|
|
|
- public function getShortType()
|
|
|
+ public function getShortType()
|
|
|
{
|
|
|
- return str_replace("FTTHBundle\\Entity\\","",$this->deviceType);
|
|
|
+ return str_replace("FTTHBundle\\Entity\\", "", $this->deviceType);
|
|
|
}
|
|
|
|
|
|
/**
|