Skip to content

Instantly share code, notes, and snippets.

@ThaDafinser
Created April 12, 2013 14:02
Show Gist options
  • Save ThaDafinser/5372224 to your computer and use it in GitHub Desktop.
Save ThaDafinser/5372224 to your computer and use it in GitHub Desktop.
<?php
namespace LispLogbook\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
/**
* @ORM\Table(name="pstEntry")
* @ORM\Entity
*/
class Entry
{
/**
* @ORM\Id
* @ORM\Column(name="entId", type="guid")
* @ORM\GeneratedValue(strategy="UUID")
*/
protected $id;
/**
*
* @var \LispLogbook\Entity\Entry
* @ORM\ManyToOne(targetEntity="LispLogbook\Entity\Entry")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="entRootId", referencedColumnName="entId")
* })
*/
private $rootId;
/**
*
* @var \LispLogbook\Entity\Entry @ORM\ManyToOne(targetEntity="LispLogbook\Entity\Entry")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="entParentId", referencedColumnName="entId")
* })
*/
private $parentId;
/**
*
* @var string @ORM\Column(name="entHasChildren", type="enumYesNo", nullable=false)
*/
private $hasChildren;
/**
*
* @var string @ORM\Column(name="entDescription", type="text", nullable=false)
*/
private $description;
/**
*
* @var string @ORM\Column(name="entLanguage", type="string", length=2, nullable=false)
*/
private $language;
/**
*
* @var integer
*
* @ORM\Version
* @ORM\Column(name="entCurrentVersion", type="integer", nullable=false)
*/
private $currentVersion;
/**
*
* @var string @ORM\Column(name="entDeleted", type="enumYesNo", nullable=false)
*/
private $deleted;
public function __construct ()
{
$this->hasChildren = 'n';
$this->deleted = 'n';
$this->rootId = $this;
}
public function setId ($id)
{
$this->id = $id;
}
public function getId ()
{
return $this->id;
}
/**
*
* @param Entry $entry
*/
public function setRootId (Entry $entry)
{
$this->rootId = $entry;
}
/**
*
* @return \LispLogbook\Entity\Entry
*/
public function getRootId ()
{
return $this->rootId;
}
/**
*
* @param Entry $entry
*/
public function setParentId (Entry $entry)
{
$this->parentId = $entry;
}
/**
*
* @return \LispLogbook\Entity\Entry
*/
public function getParentId ()
{
return $this->parentId;
}
public function setHasChildren ($hasChildren)
{
$this->hasChildren = $hasChildren;
}
public function getHasChildren ()
{
return $this->hasChildren;
}
public function setDescription($description){
$this->description = $description;
}
public function getDescription(){
return $this->description;
}
public function setLanguage ($language)
{
$this->language = $language;
}
public function getLanguage ()
{
return $this->language;
}
public function setCurrentVersion ($version)
{
$this->currentVersion = $version;
}
public function getCurrentVersion ()
{
return $this->currentVersion;
}
public function setDeleted($deleted){
$this->deleted = $deleted;
}
public function getDeleted(){
return $this->deleted;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment