<?php
namespace App\Entity\Api;
use Gedmo\Mapping\Annotation as Gedmo;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use App\Helper\Parsedown;
/**
* @ORM\Table(name="app_api_kelsync_device")
* @ORM\Entity()
*/
class KelSyncDevice
{
/**
* @var int
*
* @ORM\Column(name="id", type="bigint")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(type="string", length=400, nullable=true)
*/
private $ip;
/**
* @ORM\Column(type="string", length=400)
*/
private $name;
/**
* @ORM\Column(type="string", length=400)
*/
private $deviceId;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $addDate;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $updateDate;
/**
* @ORM\OneToMany(targetEntity="KelSyncLinkItem", mappedBy="device", cascade={"persist", "remove"})
*/
private $linkItems;
public function __construct()
{
$this->linkItems = new ArrayCollection();
}
/**
* Get id
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* @return mixed
*/
public function getName()
{
return $this->name;
}
/**
* @param mixed $name
*/
public function setName($name): void
{
$this->name = $name;
}
/**
* @return mixed
*/
public function getDeviceId()
{
return $this->deviceId;
}
/**
* @param mixed $deviceId
*/
public function setDeviceId($deviceId): void
{
$this->deviceId = $deviceId;
}
/**
* @return mixed
*/
public function getAddDate()
{
return $this->addDate;
}
/**
* @param mixed $addDate
*/
public function setAddDate($addDate): void
{
$this->addDate = $addDate;
}
/**
* @return mixed
*/
public function getUpdateDate()
{
return $this->updateDate;
}
/**
* @param mixed $updateDate
*/
public function setUpdateDate($updateDate): void
{
$this->updateDate = $updateDate;
}
/**
* @return Collection|KelSyncLinkItem[]
*/
public function getLinkItems(): Collection
{
return $this->linkItems;
}
/**
* @param KelSyncLinkItem $linkItem
*/
public function addLinkItem(KelSyncLinkItem $linkItem): void
{
if (!$this->linkItems->contains($linkItem)) {
$this->linkItems[] = $linkItem;
$linkItem->setDevice($this);
}
}
/**
* @param KelSyncLinkItem $linkItem
*/
public function removeLinkItem(KelSyncLinkItem $linkItem): void
{
if ($this->linkItems->contains($linkItem)) {
$this->linkItems->removeElement($linkItem);
if ($linkItem->getDevice() === $this) {
$linkItem->setDevice(null);
}
}
}
/**
* @return mixed
*/
public function getIp()
{
return $this->ip;
}
/**
* @param mixed $ip
*/
public function setIp($ip): void
{
$this->ip = $ip;
}
}