317 lines
5.4 KiB
PHP
317 lines
5.4 KiB
PHP
<?php
|
|
|
|
namespace Cadoles\CoreBundle\Entity;
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
use Doctrine\Common\Collections\ArrayCollection;
|
|
use Symfony\Component\Validator\Constraints as Assert;
|
|
|
|
/**
|
|
* @ORM\Entity
|
|
* @ORM\Table(name="server")
|
|
* @ORM\HasLifecycleCallbacks
|
|
*/
|
|
class Server
|
|
{
|
|
/**
|
|
* @var integer
|
|
*
|
|
* @ORM\Column(name="id", type="integer")
|
|
* @ORM\Id
|
|
* @ORM\GeneratedValue(strategy="AUTO")
|
|
*/
|
|
private $id;
|
|
|
|
/**
|
|
* @ORM\Column(type="string", length=100)
|
|
*/
|
|
private $idserver;
|
|
|
|
/**
|
|
* @ORM\Column(type="string", length=100)
|
|
*/
|
|
private $idlocal;
|
|
|
|
/**
|
|
* @ORM\Column(type="string", length=100)
|
|
*/
|
|
private $name;
|
|
|
|
/**
|
|
* @ORM\Column(type="string", length=100, nullable=true)
|
|
*/
|
|
private $module;
|
|
|
|
/**
|
|
* @ORM\Column(type="string", length=100, nullable=true)
|
|
*/
|
|
private $version;
|
|
|
|
/**
|
|
* @ORM\Column(type="string", length=250, nullable=true)
|
|
*/
|
|
private $url;
|
|
|
|
/**
|
|
* @ORM\Column(name="updatedate", type="datetime")
|
|
*/
|
|
private $updatedate;
|
|
|
|
/**
|
|
* @ORM\OneToMany(targetEntity="Cadoles\CoreBundle\Entity\ServerApplication", mappedBy="server", cascade={"persist"}, orphanRemoval=true)
|
|
*/
|
|
private $serverapplications;
|
|
|
|
/**
|
|
* @ORM\ManyToOne(targetEntity="Cadoles\CoreBundle\Entity\Etab", inversedBy="servers")
|
|
*/
|
|
private $etab;
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Constructor
|
|
*/
|
|
public function __construct()
|
|
{
|
|
$this->serverapplications = new \Doctrine\Common\Collections\ArrayCollection();
|
|
}
|
|
|
|
/**
|
|
* Get id
|
|
*
|
|
* @return integer
|
|
*/
|
|
public function getId()
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
/**
|
|
* Set idserver
|
|
*
|
|
* @param string $idserver
|
|
*
|
|
* @return Server
|
|
*/
|
|
public function setIdserver($idserver)
|
|
{
|
|
$this->idserver = $idserver;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get idserver
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getIdserver()
|
|
{
|
|
return $this->idserver;
|
|
}
|
|
|
|
/**
|
|
* Set idlocal
|
|
*
|
|
* @param string $idlocal
|
|
*
|
|
* @return Server
|
|
*/
|
|
public function setIdlocal($idlocal)
|
|
{
|
|
$this->idlocal = $idlocal;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get idlocal
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getIdlocal()
|
|
{
|
|
return $this->idlocal;
|
|
}
|
|
|
|
/**
|
|
* Set name
|
|
*
|
|
* @param string $name
|
|
*
|
|
* @return Server
|
|
*/
|
|
public function setName($name)
|
|
{
|
|
$this->name = $name;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get name
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getName()
|
|
{
|
|
return $this->name;
|
|
}
|
|
|
|
/**
|
|
* Set module
|
|
*
|
|
* @param string $module
|
|
*
|
|
* @return Server
|
|
*/
|
|
public function setModule($module)
|
|
{
|
|
$this->module = $module;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get module
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getModule()
|
|
{
|
|
return $this->module;
|
|
}
|
|
|
|
/**
|
|
* Set version
|
|
*
|
|
* @param string $version
|
|
*
|
|
* @return Server
|
|
*/
|
|
public function setVersion($version)
|
|
{
|
|
$this->version = $version;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get version
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getVersion()
|
|
{
|
|
return $this->version;
|
|
}
|
|
|
|
/**
|
|
* Set url
|
|
*
|
|
* @param string $url
|
|
*
|
|
* @return Server
|
|
*/
|
|
public function setUrl($url)
|
|
{
|
|
$this->url = $url;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get url
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getUrl()
|
|
{
|
|
return $this->url;
|
|
}
|
|
|
|
/**
|
|
* Set updatedate
|
|
*
|
|
* @param \DateTime $updatedate
|
|
*
|
|
* @return Server
|
|
*/
|
|
public function setUpdatedate($updatedate)
|
|
{
|
|
$this->updatedate = $updatedate;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get updatedate
|
|
*
|
|
* @return \DateTime
|
|
*/
|
|
public function getUpdatedate()
|
|
{
|
|
return $this->updatedate;
|
|
}
|
|
|
|
/**
|
|
* Add serverapplication
|
|
*
|
|
* @param \Cadoles\CoreBundle\Entity\ServerApplication $serverapplication
|
|
*
|
|
* @return Server
|
|
*/
|
|
public function addServerapplication(\Cadoles\CoreBundle\Entity\ServerApplication $serverapplication)
|
|
{
|
|
$this->serverapplications[] = $serverapplication;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Remove serverapplication
|
|
*
|
|
* @param \Cadoles\CoreBundle\Entity\ServerApplication $serverapplication
|
|
*/
|
|
public function removeServerapplication(\Cadoles\CoreBundle\Entity\ServerApplication $serverapplication)
|
|
{
|
|
$this->serverapplications->removeElement($serverapplication);
|
|
}
|
|
|
|
/**
|
|
* Get serverapplications
|
|
*
|
|
* @return \Doctrine\Common\Collections\Collection
|
|
*/
|
|
public function getServerapplications()
|
|
{
|
|
return $this->serverapplications;
|
|
}
|
|
|
|
/**
|
|
* Set etab
|
|
*
|
|
* @param \Cadoles\CoreBundle\Entity\Etab $etab
|
|
*
|
|
* @return Server
|
|
*/
|
|
public function setEtab(\Cadoles\CoreBundle\Entity\Etab $etab = null)
|
|
{
|
|
$this->etab = $etab;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Get etab
|
|
*
|
|
* @return \Cadoles\CoreBundle\Entity\Etab
|
|
*/
|
|
public function getEtab()
|
|
{
|
|
return $this->etab;
|
|
}
|
|
}
|