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="boolean", options={"default" = false})
51 * @ORM\Column(name="is_fav", type="boolean", options={"default" = false})
58 * @ORM\Column(name="is_deleted", type="boolean", options={"default" = false})
65 * @ORM\Column(name="content", type="text", nullable=true)
72 * @ORM\Column(name="user_id", type="decimal", precision=10, scale=0, nullable=true)
81 public function getId()
89 * @param string $title
92 public function setTitle($title)
94 $this->title
= $title;
104 public function getTitle()
115 public function setUrl($url)
127 public function getUrl()
135 * @param string $isRead
138 public function setIsRead($isRead)
140 $this->isRead
= $isRead;
150 public function getIsRead()
152 return $this->isRead
;
155 public function toggleArchive()
157 $this->isRead
= $this->getIsRead() ^
1;
165 * @param string $isFav
168 public function setIsFav($isFav)
170 $this->isFav
= $isFav;
180 public function getIsFav()
185 public function toggleStar()
187 $this->isFav
= $this->getIsFav() ^
1;
195 * @param string $content
198 public function setContent($content)
200 $this->content
= $content;
210 public function getContent()
212 return $this->content
;
218 * @param string $userId
221 public function setUserId($userId)
223 $this->userId
= $userId;
233 public function getUserId()
235 return $this->userId
;
241 public function isDeleted()
243 return $this->isDeleted
;
247 * @param string $isDeleted
249 public function setDeleted($isDeleted)
251 $this->isDeleted
= $isDeleted;