2012-07-03 16:05:09 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace KekRozsak\FrontBundle\Entity;
|
|
|
|
|
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
|
|
|
|
/**
|
2012-07-13 10:07:21 +00:00
|
|
|
* @ORM\Entity
|
|
|
|
* @ORM\Table(name="news")
|
2012-07-03 16:05:09 +00:00
|
|
|
*/
|
|
|
|
class News
|
|
|
|
{
|
2012-07-13 10:07:21 +00:00
|
|
|
/**
|
|
|
|
* @var integer $id
|
|
|
|
* @ORM\Id
|
|
|
|
* @ORM\GeneratedValue(strategy="AUTO")
|
2012-07-15 12:56:31 +00:00
|
|
|
* @ORM\Column(type="integer")
|
2012-07-13 10:07:21 +00:00
|
|
|
*/
|
|
|
|
private $id;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get id
|
|
|
|
*
|
2012-07-15 12:56:31 +00:00
|
|
|
* @return integer
|
2012-07-13 10:07:21 +00:00
|
|
|
*/
|
|
|
|
public function getId()
|
|
|
|
{
|
|
|
|
return $this->id;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var string $title
|
2012-07-15 12:56:31 +00:00
|
|
|
* @ORM\Column(type="string", length=100)
|
2012-07-13 10:07:21 +00:00
|
|
|
*/
|
|
|
|
private $title;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set title
|
|
|
|
*
|
|
|
|
* @param string $title
|
|
|
|
* @return News
|
|
|
|
*/
|
|
|
|
public function setTitle($title)
|
|
|
|
{
|
|
|
|
$this->title = $title;
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get title
|
|
|
|
*
|
2012-07-15 12:56:31 +00:00
|
|
|
* @return string
|
2012-07-13 10:07:21 +00:00
|
|
|
*/
|
|
|
|
public function getTitle()
|
|
|
|
{
|
|
|
|
return $this->title;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2012-07-15 12:56:31 +00:00
|
|
|
* @var string $text
|
|
|
|
* @ORM\Column(type="text", nullable=false)
|
2012-07-13 10:07:21 +00:00
|
|
|
*/
|
2012-07-15 12:56:31 +00:00
|
|
|
private $text;
|
2012-07-13 10:07:21 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Set text
|
|
|
|
*
|
2012-07-15 12:56:31 +00:00
|
|
|
* @param string $text
|
2012-07-13 10:07:21 +00:00
|
|
|
* @return News
|
|
|
|
*/
|
|
|
|
public function setText($text)
|
|
|
|
{
|
|
|
|
$this->text = $text;
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get text
|
|
|
|
*
|
2012-07-15 12:56:31 +00:00
|
|
|
* @return string
|
2012-07-13 10:07:21 +00:00
|
|
|
*/
|
|
|
|
public function getText()
|
|
|
|
{
|
|
|
|
return $this->text;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2012-07-15 12:56:31 +00:00
|
|
|
* @var DateTime $createdAt
|
|
|
|
* @ORM\Column(type="datetime", name="created_at", nullable=false)
|
|
|
|
*/
|
|
|
|
private $createdAt;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set createdAt
|
2012-07-13 10:07:21 +00:00
|
|
|
*
|
2012-07-15 12:56:31 +00:00
|
|
|
* @param DateTime $createdAt
|
2012-07-13 10:07:21 +00:00
|
|
|
* @return News
|
|
|
|
*/
|
2012-07-15 12:56:31 +00:00
|
|
|
public function setCreatedAt(\DateTime $createdAt)
|
2012-07-13 10:07:21 +00:00
|
|
|
{
|
2012-07-15 12:56:31 +00:00
|
|
|
$this->createdAt = $createdAt;
|
2012-07-13 10:07:21 +00:00
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2012-07-15 12:56:31 +00:00
|
|
|
* Get createdAt
|
2012-07-13 10:07:21 +00:00
|
|
|
*
|
2012-07-15 12:56:31 +00:00
|
|
|
* @return DateTime
|
2012-07-13 10:07:21 +00:00
|
|
|
*/
|
2012-07-15 12:56:31 +00:00
|
|
|
public function getCreatedAt()
|
2012-07-13 10:07:21 +00:00
|
|
|
{
|
2012-07-15 12:56:31 +00:00
|
|
|
return $this->createdAt;
|
2012-07-13 10:07:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2012-07-15 12:56:31 +00:00
|
|
|
* @var \KekRozsak\SecurityBundle\Entity\User $createdBy
|
|
|
|
* @ORM\ManyToOne(targetEntity="\KekRozsak\SecurityBundle\Entity\User")
|
|
|
|
* @ORM\JoinColumn(name="created_by_id")
|
|
|
|
*/
|
|
|
|
private $createdBy;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set createdBy
|
2012-07-13 10:07:21 +00:00
|
|
|
*
|
2012-07-15 12:56:31 +00:00
|
|
|
* @param \KekRozsak\SecurityBundle\Entity\User $createdBy
|
2012-07-13 10:07:21 +00:00
|
|
|
* @return News
|
|
|
|
*/
|
2012-07-15 12:56:31 +00:00
|
|
|
public function setCreatedBy(\KekRozsak\SecurityBundle\Entity\User $createdBy)
|
2012-07-13 10:07:21 +00:00
|
|
|
{
|
2012-07-15 12:56:31 +00:00
|
|
|
$this->createdBy = $createdBy;
|
2012-07-13 10:07:21 +00:00
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2012-07-15 12:56:31 +00:00
|
|
|
* Get createdBy
|
2012-07-13 10:07:21 +00:00
|
|
|
*
|
2012-07-15 12:56:31 +00:00
|
|
|
* @return \KekRozsak\SecurityBundle\Entity\User
|
2012-07-13 10:07:21 +00:00
|
|
|
*/
|
2012-07-15 12:56:31 +00:00
|
|
|
public function getCreatedBy()
|
2012-07-13 10:07:21 +00:00
|
|
|
{
|
2012-07-15 12:56:31 +00:00
|
|
|
return $this->createdBy;
|
2012-07-13 10:07:21 +00:00
|
|
|
}
|
|
|
|
}
|