|
@@ -13,7 +13,7 @@ use Base\AdminBundle\Traits\TenancyIdTraitInterface;
|
|
|
|
|
|
/**
|
|
/**
|
|
* @ORM\Table
|
|
* @ORM\Table
|
|
- * @ORM\Entity
|
|
|
|
|
|
+ * @ORM\Entity(repositoryClass="StatsBundle\Repository\CablemodemRepository")
|
|
* @UniqueEntity(fields={"deviceServer", "cmtsDeviceId", "mac"}, message="errors.duplicate_key")
|
|
* @UniqueEntity(fields={"deviceServer", "cmtsDeviceId", "mac"}, message="errors.duplicate_key")
|
|
* @ORM\Table(uniqueConstraints={@ORM\UniqueConstraint(name="unique_idx", columns={"device_server_id", "cmts_device_id", "mac"})})
|
|
* @ORM\Table(uniqueConstraints={@ORM\UniqueConstraint(name="unique_idx", columns={"device_server_id", "cmts_device_id", "mac"})})
|
|
*/
|
|
*/
|
|
@@ -262,7 +262,7 @@ class Cablemodem implements TenancyIdTraitInterface
|
|
*/
|
|
*/
|
|
public function getMac()
|
|
public function getMac()
|
|
{
|
|
{
|
|
- return $this->mac;
|
|
|
|
|
|
+ return strtoupper($this->mac);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -715,4 +715,20 @@ class Cablemodem implements TenancyIdTraitInterface
|
|
{
|
|
{
|
|
return $this->microreflectionCmts;
|
|
return $this->microreflectionCmts;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * @return string
|
|
|
|
+ */
|
|
|
|
+ public function getCustomId()
|
|
|
|
+ {
|
|
|
|
+ return sprintf('%s~%s~%s', strtolower($this->mac), $this->cmtsDeviceId, $this->deviceServer->getId());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * @return string
|
|
|
|
+ */
|
|
|
|
+ public function __toString()
|
|
|
|
+ {
|
|
|
|
+ return sprintf('%s', strtoupper($this->mac));
|
|
|
|
+ }
|
|
}
|
|
}
|