3 namespace Wallabag\CoreBundle\Entity
;
5 use Doctrine\ORM\Mapping
as ORM
;
6 use Symfony\Component\Validator\Constraints
as Assert
;
11 * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\EntriesRepository")
12 * @ORM\Table(name="entries")
20 * @ORM\Column(name="id", type="integer", nullable=true)
22 * @ORM\GeneratedValue(strategy="IDENTITY")
29 * @ORM\Column(name="title", type="text", nullable=true)
37 * @ORM\Column(name="url", type="text", nullable=true)
44 * @ORM\Column(name="is_read", type="decimal", precision=10, scale=0, nullable=true)
46 private $isRead = '0';
51 * @ORM\Column(name="is_fav", type="decimal", precision=10, scale=0, nullable=true)
58 * @ORM\Column(name="content", type="text", nullable=true)
65 * @ORM\Column(name="user_id", type="decimal", precision=10, scale=0, nullable=true)
74 public function getId()
82 * @param string $title
85 public function setTitle($title)
87 $this->title
= $title;
97 public function getTitle()
108 public function setUrl($url)
120 public function getUrl()
128 * @param string $isRead
131 public function setIsRead($isRead)
133 $this->isRead
= $isRead;
143 public function getIsRead()
145 return $this->isRead
;
148 public function toggleArchive()
150 $this->isRead
= $this->getIsRead() ^
1;
158 * @param string $isFav
161 public function setIsFav($isFav)
163 $this->isFav
= $isFav;
173 public function getIsFav()
178 public function toggleStar()
180 $this->isFav
= $this->getIsFav() ^
1;
188 * @param string $content
191 public function setContent($content)
193 $this->content
= $content;
203 public function getContent()
205 return $this->content
;
211 * @param string $userId
214 public function setUserId($userId)
216 $this->userId
= $userId;
226 public function getUserId()
228 return $this->userId
;