<?php
-namespace Wallabag\CommentBundle\Entity;
+namespace Wallabag\AnnotationBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use JMS\Serializer\Annotation\ExclusionPolicy;
use Wallabag\CoreBundle\Entity\Entry;
/**
- * Comment.
+ * Annotation.
*
- * @ORM\Table(name="comment")
- * @ORM\Entity(repositoryClass="Wallabag\CommentBundle\Repository\CommentRepository")
+ * @ORM\Table(name="annotation")
+ * @ORM\Entity(repositoryClass="Wallabag\AnnotationBundle\Repository\AnnotationRepository")
* @ORM\HasLifecycleCallbacks()
* @ExclusionPolicy("none")
*/
-class Comment
+class Annotation
{
/**
* @var int
/**
* @Exclude
*
- * @ORM\ManyToOne(targetEntity="Wallabag\CoreBundle\Entity\Entry", inversedBy="comments")
+ * @ORM\ManyToOne(targetEntity="Wallabag\CoreBundle\Entity\Entry", inversedBy="annotations")
* @ORM\JoinColumn(name="entry_id", referencedColumnName="id")
*/
private $entry;
*
* @param string $text
*
- * @return Comment
+ * @return Annotation
*/
public function setText($text)
{
*
* @param string $quote
*
- * @return Comment
+ * @return Annotation
*/
public function setQuote($quote)
{
*
* @param array $ranges
*
- * @return Comment
+ * @return Annotation
*/
public function setRanges($ranges)
{
*
* @param string $user
*
- * @return Comment
+ * @return Annotation
*/
public function setUser($user)
{
*
* @param Entry $entry
*
- * @return Comment
+ * @return Annotation
*/
public function setEntry($entry)
{
$this->entry = $entry;
- $entry->setComment($this);
+ $entry->setAnnotation($this);
return $this;
}