|
@@ -0,0 +1,220 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+namespace RadiusBundle\Entity;
|
|
|
+
|
|
|
+use Base\AdminBundle\Traits\TenancyIdTrait;
|
|
|
+use Base\AdminBundle\Traits\TenancyIdTraitInterface;
|
|
|
+use Doctrine\ORM\Mapping as ORM;
|
|
|
+use ExtraDataBundle\Entity\Traits\ExtraDataTrait;
|
|
|
+use Symfony\Component\Validator\Constraints as Assert;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @ORM\Table
|
|
|
+ * @ORM\Entity
|
|
|
+ */
|
|
|
+class NAS implements TenancyIdTraitInterface
|
|
|
+{
|
|
|
+
|
|
|
+ use ExtraDataTrait;
|
|
|
+ use TenancyIdTrait;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @var int
|
|
|
+ *
|
|
|
+ * @ORM\Column(name="id", type="integer")
|
|
|
+ * @ORM\Id
|
|
|
+ * @ORM\GeneratedValue(strategy="AUTO")
|
|
|
+ */
|
|
|
+ private $id;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @ORM\Column(type="string", length=50, nullable=true)
|
|
|
+ */
|
|
|
+ private $description;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @ORM\Column(type="string", length=50, nullable=false, unique=TRUE)
|
|
|
+ */
|
|
|
+ private $host;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @ORM\Column(type="string", length=50, nullable=false)
|
|
|
+ */
|
|
|
+ private $snmp_comunity;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @ORM\Column(type="integer", nullable=false)
|
|
|
+ */
|
|
|
+ private $snmp_version;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @ORM\Column(type="string", length=50, nullable=false)
|
|
|
+ */
|
|
|
+ private $radius_password;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @ORM\ManyToOne(targetEntity="NASModel", inversedBy="nass", fetch="EXTRA_LAZY")
|
|
|
+ * @ORM\JoinColumn(name="model_id", referencedColumnName="id", onDelete="SET NULL")
|
|
|
+ */
|
|
|
+ private $model;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @var boolean $acct_enabled
|
|
|
+ *
|
|
|
+ * @ORM\Column(type="boolean", nullable=true)
|
|
|
+ */
|
|
|
+ private $acct_enabled;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return string
|
|
|
+ */
|
|
|
+ public function __toString()
|
|
|
+ {
|
|
|
+ return (string)$this->description;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return int
|
|
|
+ */
|
|
|
+ public function getId()
|
|
|
+ {
|
|
|
+ return $this->id;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param int $id
|
|
|
+ * @return mixed Retorna el objeto.
|
|
|
+ */
|
|
|
+ public function setId($id)
|
|
|
+ {
|
|
|
+ $this->id = $id;
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return mixed
|
|
|
+ */
|
|
|
+ public function getDescription()
|
|
|
+ {
|
|
|
+ return $this->description;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param mixed $description
|
|
|
+ * @return mixed Retorna el objeto.
|
|
|
+ */
|
|
|
+ public function setDescription($description)
|
|
|
+ {
|
|
|
+ $this->description = $description;
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return mixed
|
|
|
+ */
|
|
|
+ public function getHost()
|
|
|
+ {
|
|
|
+ return $this->host;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param mixed $host
|
|
|
+ * @return mixed Retorna el objeto.
|
|
|
+ */
|
|
|
+ public function setHost($host)
|
|
|
+ {
|
|
|
+ $this->host = $host;
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return mixed
|
|
|
+ */
|
|
|
+ public function getSnmpComunity()
|
|
|
+ {
|
|
|
+ return $this->snmp_comunity;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param mixed $snmp_comunity
|
|
|
+ * @return mixed Retorna el objeto.
|
|
|
+ */
|
|
|
+ public function setSnmpComunity($snmp_comunity)
|
|
|
+ {
|
|
|
+ $this->snmp_comunity = $snmp_comunity;
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return mixed
|
|
|
+ */
|
|
|
+ public function getSnmpVersion()
|
|
|
+ {
|
|
|
+ return $this->snmp_version;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param mixed $snmp_version
|
|
|
+ * @return mixed Retorna el objeto.
|
|
|
+ */
|
|
|
+ public function setSnmpVersion($snmp_version)
|
|
|
+ {
|
|
|
+ $this->snmp_version = $snmp_version;
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return mixed
|
|
|
+ */
|
|
|
+ public function getRadiusPassword()
|
|
|
+ {
|
|
|
+ return $this->radius_password;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param mixed $radius_password
|
|
|
+ * @return mixed Retorna el objeto.
|
|
|
+ */
|
|
|
+ public function setRadiusPassword($radius_password)
|
|
|
+ {
|
|
|
+ $this->radius_password = $radius_password;
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return mixed
|
|
|
+ */
|
|
|
+ public function getModel()
|
|
|
+ {
|
|
|
+ return $this->model;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param mixed $model
|
|
|
+ * @return mixed Retorna el objeto.
|
|
|
+ */
|
|
|
+ public function setModel($model)
|
|
|
+ {
|
|
|
+ $this->model = $model;
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return bool
|
|
|
+ */
|
|
|
+ public function isAcctEnabled()
|
|
|
+ {
|
|
|
+ return $this->acct_enabled;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param bool $acct_enabled
|
|
|
+ * @return mixed Retorna el objeto.
|
|
|
+ */
|
|
|
+ public function setAcctEnabled($acct_enabled)
|
|
|
+ {
|
|
|
+ $this->acct_enabled = $acct_enabled;
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+}
|