|
@@ -2,23 +2,24 @@
|
|
|
|
|
|
namespace FTTHBundle\Entity;
|
|
|
|
|
|
+use Base\AdminBundle\Interfaces\SoftDeleteInterface;
|
|
|
use Base\AdminBundle\Traits\TenancyIdTrait;
|
|
|
use Base\AdminBundle\Traits\TenancyIdTraitInterface;
|
|
|
-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;
|
|
|
use DeviceBundle\Validator\Constraints as ValidatorAssert;
|
|
|
use DeviceBundle\Interfaces\DeviceInterface;
|
|
|
-use JMS\Serializer\Annotation as JMS;
|
|
|
+use ExtraDataBundle\Entity\Traits\ExtraDataTrait;
|
|
|
+use FTTHBundle\Validator\Constraints as FTTHAssert;
|
|
|
use MapBundle\Entity\Interfaces\LocationInterface;
|
|
|
use MapBundle\Entity\Traits\LocationTrait;
|
|
|
use WorkflowBundle\Entity\Interfaces\WorkflowInterface;
|
|
|
use WorkflowBundle\Entity\Traits\WorkflowTrait;
|
|
|
+use Doctrine\ORM\Mapping as ORM;
|
|
|
use Gedmo\SoftDeleteable\Traits\SoftDeleteableEntity as SoftDeleteable;
|
|
|
use Gedmo\Mapping\Annotation as Gedmo;
|
|
|
-use Base\AdminBundle\Interfaces\SoftDeleteInterface;
|
|
|
+use JMS\Serializer\Annotation as JMS;
|
|
|
+use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
|
|
+use Symfony\Component\Validator\Constraints as Assert;
|
|
|
+use Symfony\Component\Workflow\Exception\ExceptionInterface;
|
|
|
|
|
|
/**
|
|
|
* ONU
|
|
@@ -31,6 +32,8 @@ use Base\AdminBundle\Interfaces\SoftDeleteInterface;
|
|
|
* @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=true)
|
|
|
*
|
|
|
* @ValidatorAssert\Device
|
|
|
+ *
|
|
|
+ * @FTTHAssert\Position
|
|
|
*/
|
|
|
class ONU implements DeviceInterface, TenancyIdTraitInterface, LocationInterface, WorkflowInterface, SoftDeleteInterface
|
|
|
{
|
|
@@ -172,6 +175,8 @@ class ONU implements DeviceInterface, TenancyIdTraitInterface, LocationInterface
|
|
|
* @var int
|
|
|
*
|
|
|
* @ORM\Column(type="integer", nullable=false, options={"default": "0"})
|
|
|
+ *
|
|
|
+ * @Assert\Range(min = 0)
|
|
|
*/
|
|
|
private $position = 0;
|
|
|
|