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)
76 public function getId()
84 * @param string $title
87 public function setTitle($title)
89 $this->title
= $title;
99 public function getTitle()
110 public function setUrl($url)
122 public function getUrl()
130 * @param string $isRead
133 public function setIsRead($isRead)
135 $this->isRead
= $isRead;
145 public function getIsRead()
147 return $this->isRead
;
150 public function toggleArchive()
152 $this->isRead
= $this->getIsRead() ^
1;
159 * @param string $isFav
162 public function setIsFav($isFav)
164 $this->isFav
= $isFav;
174 public function getIsFav()
179 public function toggleStar()
181 $this->isFav
= $this->getIsFav() ^
1;
189 * @param string $content
192 public function setContent($content)
194 $this->content
= $content;
204 public function getContent()
206 return $this->content
;
212 * @param string $userId
215 public function setUserId($userId)
217 $this->userId
= $userId;
227 public function getUserId()
229 return $this->userId
;