kekrozsak/src/KekRozsak/FrontBundle/Entity/News.php

144 lines
2.1 KiB
PHP
Raw Normal View History

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