|
@@ -31,6 +31,7 @@ use Doctrine\ORM\Mapping\HasLifecycleCallbacks;
|
|
|
* @ORM\Table(uniqueConstraints={@ORM\UniqueConstraint(name="unique_idx", columns={"pon_serial_number", "tenancy_id"})})
|
|
|
*
|
|
|
* @UniqueEntity(fields={"ponSerialNumber", "tenancyId"}, message="errors.duplicate_key")
|
|
|
+ * @UniqueEntity(fields={"mac"}, message="errors.duplicate_key")
|
|
|
*
|
|
|
* @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=true)
|
|
|
*
|
|
@@ -274,6 +275,12 @@ class ONU implements DeviceInterface, TenancyIdTraitInterface, LocationInterface
|
|
|
*/
|
|
|
protected $logOLT;
|
|
|
|
|
|
+ /**
|
|
|
+ * @ORM\Column(type="string", nullable=false, options={"default": "psn"})
|
|
|
+ * psn | mac
|
|
|
+ */
|
|
|
+ protected $radiusAuth = 'psn';
|
|
|
+
|
|
|
/**
|
|
|
* Constructor
|
|
|
*/
|
|
@@ -348,7 +355,7 @@ class ONU implements DeviceInterface, TenancyIdTraitInterface, LocationInterface
|
|
|
*/
|
|
|
public function setMac($mac)
|
|
|
{
|
|
|
- $this->mac = $mac;
|
|
|
+ $this->mac = strtolower($mac);
|
|
|
|
|
|
return $this;
|
|
|
}
|
|
@@ -1147,4 +1154,28 @@ class ONU implements DeviceInterface, TenancyIdTraitInterface, LocationInterface
|
|
|
|
|
|
return $hex;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Set radiusAuth
|
|
|
+ *
|
|
|
+ * @param string $radiusAuth
|
|
|
+ *
|
|
|
+ * @return ONU
|
|
|
+ */
|
|
|
+ public function setRadiusAuth($radiusAuth)
|
|
|
+ {
|
|
|
+ $this->radiusAuth = $radiusAuth;
|
|
|
+
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Get radiusAuth
|
|
|
+ *
|
|
|
+ * @return string
|
|
|
+ */
|
|
|
+ public function getRadiusAuth()
|
|
|
+ {
|
|
|
+ return $this->radiusAuth;
|
|
|
+ }
|
|
|
}
|