|
@@ -16,20 +16,25 @@ use MapBundle\Entity\Interfaces\LocationInterface;
|
|
|
use MapBundle\Entity\Traits\LocationTrait;
|
|
|
use WorkflowBundle\Entity\Interfaces\WorkflowInterface;
|
|
|
use WorkflowBundle\Entity\Traits\WorkflowTrait;
|
|
|
+use Gedmo\SoftDeleteable\Traits\SoftDeleteableEntity as SoftDeleteable;
|
|
|
+use Gedmo\Mapping\Annotation as Gedmo;
|
|
|
+use Base\AdminBundle\Interfaces\SoftDeleteInterface;
|
|
|
|
|
|
/**
|
|
|
* @ORM\Entity
|
|
|
* @UniqueEntity("ip")
|
|
|
+ * @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=true)
|
|
|
*
|
|
|
* @ValidatorAssert\Device
|
|
|
*/
|
|
|
-class OLT implements DeviceInterface, TenancyIdTraitInterface, LocationInterface, WorkflowInterface
|
|
|
+class OLT implements DeviceInterface, TenancyIdTraitInterface, LocationInterface, WorkflowInterface, SoftDeleteInterface
|
|
|
{
|
|
|
|
|
|
use ExtraDataTrait;
|
|
|
use TenancyIdTrait;
|
|
|
use LocationTrait;
|
|
|
use WorkflowTrait;
|
|
|
+ use SoftDeleteable;
|
|
|
|
|
|
/**
|
|
|
* @var bigint $id
|
|
@@ -488,5 +493,13 @@ class OLT implements DeviceInterface, TenancyIdTraitInterface, LocationInterface
|
|
|
{
|
|
|
return $this->libraryVersion;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return array
|
|
|
+ */
|
|
|
+ public function getSoftDeleteCriteria()
|
|
|
+ {
|
|
|
+ return array('ip' => $this->ip);
|
|
|
+ }
|
|
|
|
|
|
}
|