point-tools/src/Skobkin/Bundle/PointToolsBundle/Entity/Blogs/Comment.php

235 lines
3.7 KiB
PHP

<?php
namespace Skobkin\Bundle\PointToolsBundle\Entity\Blogs;
use Doctrine\ORM\Mapping as ORM;
use Skobkin\Bundle\PointToolsBundle\Entity\User;
/**
* Comment
*
* @ORM\Table(name="posts.comments")
* @ORM\Entity
*/
class Comment
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="text", type="text")
*/
private $text;
/**
* @var \DateTime
*
* @ORM\Column(name="createdAt", type="datetime")
*/
private $createdAt;
/**
* @var boolean
*
* @ORM\Column(name="isRec", type="boolean")
*/
private $isRec;
/**
* @var int
*
* @ORM\Column(name="number", type="integer")
*/
private $number;
/**
* @var Post
*
* @ORM\ManyToOne(targetEntity="Skobkin\Bundle\PointToolsBundle\Entity\Blogs\Post")
* @ORM\JoinColumn(name="post_id")
*/
private $post;
/**
* @var User
*
* @ORM\ManyToOne(targetEntity="Skobkin\Bundle\PointToolsBundle\Entity\User")
* @ORM\JoinColumn(name="author_id")
*/
private $author;
/**
* @var Comment
*
* @ORM\ManyToOne(targetEntity="Skobkin\Bundle\PointToolsBundle\Entity\Blogs\Comment")
* @ORM\JoinColumn(name="to_comment_id", nullable=true)
*/
private $toComment;
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set createdAt
*
* @param \DateTime $createdAt
* @return Comment
*/
public function setCreatedAt($createdAt)
{
$this->createdAt = $createdAt;
return $this;
}
/**
* Get createdAt
*
* @return \DateTime
*/
public function getCreatedAt()
{
return $this->createdAt;
}
/**
* Set text
*
* @param string $text
* @return Comment
*/
public function setText($text)
{
$this->text = $text;
return $this;
}
/**
* Get text
*
* @return string
*/
public function getText()
{
return $this->text;
}
/**
* Set isRec
*
* @param boolean $isRec
* @return Comment
*/
public function setIsRec($isRec)
{
$this->isRec = $isRec;
return $this;
}
/**
* Get isRec
*
* @return boolean
*/
public function isRec()
{
return $this->isRec;
}
/**
* @return int
*/
public function getNumber()
{
return $this->number;
}
/**
* @param int $number
* @return Comment
*/
public function setNumber($number)
{
$this->number = $number;
return $this;
}
/**
* @return Post
*/
public function getPost()
{
return $this->post;
}
/**
* @param Post $post
* @return Comment
*/
public function setPost($post)
{
$this->post = $post;
return $this;
}
/**
* @return User
*/
public function getAuthor()
{
return $this->author;
}
/**
* @param User $author
* @return Comment
*/
public function setAuthor($author)
{
$this->author = $author;
return $this;
}
/**
* @return Comment
*/
public function getToComment()
{
return $this->toComment;
}
/**
* @param Comment $toComment
* @return Comment
*/
public function setToComment($toComment)
{
$this->toComment = $toComment;
return $this;
}
}