|
@@ -0,0 +1,165 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+namespace KeaBundle\Entity;
|
|
|
+
|
|
|
+use Doctrine\ORM\Mapping as ORM;
|
|
|
+use JMS\Serializer\Annotation as JMS;
|
|
|
+use Symfony\Component\Validator\Constraints as Assert;
|
|
|
+use Gedmo\Mapping\Annotation as Gedmo;
|
|
|
+
|
|
|
+/**
|
|
|
+ * Config
|
|
|
+ *
|
|
|
+ * @ORM\Table
|
|
|
+ * @ORM\Entity
|
|
|
+ */
|
|
|
+class Config
|
|
|
+{
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @var int
|
|
|
+ *
|
|
|
+ * @ORM\Column(name="id", type="integer")
|
|
|
+ * @ORM\Id
|
|
|
+ * @ORM\GeneratedValue(strategy="AUTO")
|
|
|
+ */
|
|
|
+ private $id;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @var string
|
|
|
+ *
|
|
|
+ * @ORM\Column(type="string", length=255)
|
|
|
+ */
|
|
|
+ private $description;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @ORM\ManyToOne(targetEntity="\DHCPBundle\Entity\DHCP", inversedBy="configs", fetch="EXTRA_LAZY")
|
|
|
+ * @ORM\JoinColumn(onDelete="SET NULL")
|
|
|
+ *
|
|
|
+ * @JMS\MaxDepth(1)
|
|
|
+ */
|
|
|
+ private $dhcp;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @var text
|
|
|
+ *
|
|
|
+ * @ORM\Column(type="text", nullable=false)
|
|
|
+ */
|
|
|
+ protected $template;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @Gedmo\Timestampable(on="create")
|
|
|
+ * @ORM\Column(type="datetime")
|
|
|
+ */
|
|
|
+ protected $created;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return string
|
|
|
+ */
|
|
|
+ public function __toString()
|
|
|
+ {
|
|
|
+ return "Config KEA";
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Get id
|
|
|
+ *
|
|
|
+ * @return int
|
|
|
+ */
|
|
|
+ public function getId()
|
|
|
+ {
|
|
|
+ return $this->id;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Set description
|
|
|
+ *
|
|
|
+ * @param string $description
|
|
|
+ *
|
|
|
+ * @return Config
|
|
|
+ */
|
|
|
+ public function setDescription($description)
|
|
|
+ {
|
|
|
+ $this->description = $description;
|
|
|
+
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Get description
|
|
|
+ *
|
|
|
+ * @return string
|
|
|
+ */
|
|
|
+ public function getDescription()
|
|
|
+ {
|
|
|
+ return $this->description;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Set template
|
|
|
+ *
|
|
|
+ * @param text $template
|
|
|
+ *
|
|
|
+ * @return Config
|
|
|
+ */
|
|
|
+ public function setTemplate($template)
|
|
|
+ {
|
|
|
+ $this->template = $template;
|
|
|
+
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Get template
|
|
|
+ *
|
|
|
+ * @return text
|
|
|
+ */
|
|
|
+ public function getTemplate()
|
|
|
+ {
|
|
|
+ return $this->template;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return DHCP
|
|
|
+ */
|
|
|
+ public function getDhcp()
|
|
|
+ {
|
|
|
+ return $this->dhcp;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param DHCP $dhcp
|
|
|
+ *
|
|
|
+ * @return Config
|
|
|
+ */
|
|
|
+ public function setDhcp($dhcp)
|
|
|
+ {
|
|
|
+ $this->dhcp = $dhcp;
|
|
|
+
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Get created
|
|
|
+ *
|
|
|
+ * @return \DateTime
|
|
|
+ */
|
|
|
+ public function getCreated()
|
|
|
+ {
|
|
|
+ return $this->created;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * Set created
|
|
|
+ *
|
|
|
+ * @param \DateTime
|
|
|
+ *
|
|
|
+ * @return Config
|
|
|
+ */
|
|
|
+ public function setCreated($d)
|
|
|
+ {
|
|
|
+ $this->created = $d;
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
+
|
|
|
+}
|