Entities generated from the old database.

This commit is contained in:
Alexey Skobkin 2015-03-02 20:39:45 +03:00
parent 7c4d6d2b4d
commit 04660e191d
2 changed files with 461 additions and 0 deletions

View file

@ -0,0 +1,141 @@
<?php
namespace Skobkin\Bundle\CopyPasteBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Lang
*
* @ORM\Table(
* name="lang",
* indexes={
* @ORM\Index(name="idx_enabled", columns={"enabled"}),
* @ORM\Index(name="idx_file", columns={"file"})
* }
* )
* @ORM\Entity
*/
class Lang
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="name", type="string", length=100, nullable=false)
*/
private $name;
/**
* @var string
*
* @ORM\Column(name="file", type="string", length=24, nullable=false)
*/
private $code;
/**
* @var boolean
*
* @ORM\Column(name="enabled", type="boolean", nullable=false)
*/
private $enabled;
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set name
*
* @param string $name
* @return Lang
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* Get name
*
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Set code
*
* @param string $file
* @return Lang
*/
public function setCode($code)
{
$this->code = $code;
return $this;
}
/**
* Get code
*
* @return string
*/
public function getCode()
{
return $this->code;
}
/**
* Set enabled
*
* @param boolean $enabled
* @return Lang
*/
public function setEnabled($enabled)
{
$this->enabled = $enabled;
return $this;
}
/**
* Get enabled
*
* @return boolean
*/
public function getEnabled()
{
return $this->enabled;
}
/**
* Check if language is enabled
*
* @return boolean
*/
public function isEnabled()
{
return $this->enabled;
}
}

View file

@ -0,0 +1,320 @@
<?php
namespace Skobkin\Bundle\CopyPasteBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Paste
*
* @ORM\Table(
* name="paste",
* indexes={
* @ORM\Index(name="idx_expire", columns={"date_exp"})
* }
* )
* @ORM\Entity
*/
class Paste
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="code", type="text", nullable=false)
*/
private $text;
/**
* @var string
*
* @ORM\Column(name="code_comment", type="text", nullable=true)
*/
private $description;
/**
* @var integer
*
* @ORM\Column(name="lang", type="integer", nullable=false)
*/
private $language;
/**
* @var string
*
* @ORM\Column(name="filename", type="string", length=128, nullable=true)
*/
private $fileName;
/**
* @var string
*
* @ORM\Column(name="name", type="string", length=48, nullable=true)
*/
private $author;
/**
* @var \DateTime
*
* @ORM\Column(name="date_pub", type="datetime", nullable=false)
*/
private $datePublished;
/**
* @var \DateTime
*
* @ORM\Column(name="date_exp", type="datetime", nullable=true)
*/
private $dateExpire;
/**
* @var string
*
* @ORM\Column(name="ip", type="string", length=48, nullable=false)
*/
private $ip;
/**
* @var string
*
* @ORM\Column(name="secret", type="string", length=16, nullable=true)
*/
private $secret;
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set text
*
* @param string $text
* @return Paste
*/
public function setText($text)
{
$this->text = $text;
return $this;
}
/**
* Get text
*
* @return string
*/
public function getText()
{
return $this->text;
}
/**
* Set description
*
* @param string $description
* @return Paste
*/
public function setDescription($description)
{
$this->description = $description;
return $this;
}
/**
* Get codeComment
*
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* Set language
*
* @param integer $language
* @return Paste
*/
public function setLanguage($language)
{
$this->language = $language;
return $this;
}
/**
* Get language
*
* @return integer
*/
public function getLanguage()
{
return $this->language;
}
/**
* Set filename
*
* @param string $filename
* @return Paste
*/
public function setFilename($filename)
{
$this->fileName = $filename;
return $this;
}
/**
* Get filename
*
* @return string
*/
public function getFilename()
{
return $this->fileName;
}
/**
* Set author
*
* @param string $author
* @return Paste
*/
public function setAuthor($author)
{
$this->author = $author;
return $this;
}
/**
* Get author
*
* @return string
*/
public function getAuthor()
{
return $this->author;
}
/**
* Set publication date
*
* @param \DateTime $datePublished
* @return Paste
*/
public function setDatePublished($datePublished)
{
$this->datePublished = $datePublished;
return $this;
}
/**
* Get publication date
*
* @return \DateTime
*/
public function getDatePublished()
{
return $this->datePublished;
}
/**
* Set dateExp
*
* @param \DateTime $dateExpire
* @return Paste
*/
public function setDateExpire($dateExpire)
{
$this->dateExpire = $dateExpire;
return $this;
}
/**
* Get dateExp
*
* @return \DateTime
*/
public function getDateExpire()
{
return $this->dateExpire;
}
/**
* Set ip
*
* @param string $ip
* @return Paste
*/
public function setIp($ip)
{
$this->ip = $ip;
return $this;
}
/**
* Get ip
*
* @return string
*/
public function getIp()
{
return $this->ip;
}
/**
* Set secret
*
* @param string $secret
* @return Paste
*/
public function setSecret($secret)
{
$this->secret = $secret;
return $this;
}
/**
* Get secret
*
* @return string
*/
public function getSecret()
{
return $this->secret;
}
/**
* Check if copypaste is private
*
* @return boolean
*/
public function isPrivate()
{
return ($this->secret === null) ? false : true;
}
}