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")
19 * @ORM\Column(name="id", type="integer", nullable=true)
21 * @ORM\GeneratedValue(strategy="IDENTITY")
28 * @ORM\Column(name="title", type="text", nullable=true)
36 * @ORM\Column(name="url", type="text", nullable=true)
43 * @ORM\Column(name="is_read", type="decimal", precision=10, scale=0, nullable=true)
45 private $isRead = '0';
50 * @ORM\Column(name="is_fav", type="decimal", precision=10, scale=0, nullable=true)
57 * @ORM\Column(name="content", type="text", nullable=true)
64 * @ORM\Column(name="user_id", type="decimal", precision=10, scale=0, nullable=true)
75 public function getId()
83 * @param string $title
86 public function setTitle($title)
88 $this->title
= $title;
98 public function getTitle()
109 public function setUrl($url)
121 public function getUrl()
129 * @param string $isRead
132 public function setIsRead($isRead)
134 $this->isRead
= $isRead;
144 public function getIsRead()
146 return $this->isRead
;
149 public function toggleArchive()
151 $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
;