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")
13 * @ORM\HasLifecycleCallbacks()
21 * @ORM\Column(name="id", type="integer", nullable=true)
23 * @ORM\GeneratedValue(strategy="AUTO")
30 * @ORM\Column(name="title", type="text", nullable=true)
38 * @ORM\Column(name="url", type="text", nullable=true)
45 * @ORM\Column(name="is_read", type="boolean", nullable=true, options={"default" = false})
47 private $isRead = false;
52 * @ORM\Column(name="is_fav", type="boolean", nullable=true, options={"default" = false})
54 private $isFav = false;
59 * @ORM\Column(name="is_deleted", type="boolean", nullable=true, options={"default" = false})
61 private $isDeleted = false;
66 * @ORM\Column(name="content", type="text", nullable=true)
73 * @ORM\Column(name="created_at", type="datetime", nullable=true)
80 * @ORM\Column(name="updated_at", type="datetime", nullable=true)
87 * @ORM\Column(name="user_id", type="decimal", precision=10, scale=0, nullable=true)
94 * @ORM\Column(name="comments", type="text", nullable=true)
101 * @ORM\Column(name="mimetype", type="text", nullable=true)
108 * @ORM\Column(name="reading_type", type="integer", nullable=true)
110 private $readingTime;
115 * @ORM\Column(name="domain_name", type="text", nullable=true)
122 * @ORM\Column(name="is_public", type="boolean", nullable=true, options={"default" = false})
131 public function getId()
139 * @param string $title
142 public function setTitle($title)
144 $this->title
= $title;
154 public function getTitle()
165 public function setUrl($url)
177 public function getUrl()
185 * @param string $isRead
188 public function setRead($isRead)
190 $this->isRead
= $isRead;
200 public function isRead()
202 return $this->isRead
;
205 public function toggleArchive()
207 $this->isRead
= $this->getIsRead() ^
1;
215 * @param string $isFav
218 public function setFav($isFav)
220 $this->isFav
= $isFav;
230 public function isFav()
235 public function toggleStar()
237 $this->isFav
= $this->getIsFav() ^
1;
245 * @param string $content
248 public function setContent($content)
250 $this->content
= $content;
260 public function getContent()
262 return $this->content
;
268 * @param string $userId
271 public function setUserId($userId)
273 $this->userId
= $userId;
283 public function getUserId()
285 return $this->userId
;
291 public function isDeleted()
293 return $this->isDeleted
;
297 * @param string $isDeleted
299 public function setDeleted($isDeleted)
301 $this->isDeleted
= $isDeleted;
307 public function getCreatedAt()
309 return $this->createdAt
;
313 * @param mixed $createdAt
316 public function setCreatedAt()
318 $this->createdAt
= new \
DateTime();
324 public function getUpdatedAt()
326 return $this->updatedAt
;
330 * @param string $updatedAt
333 public function setUpdatedAt()
335 $this->updatedAt
= new \
DateTime();
341 public function getComments()
343 return $this->comments
;
347 * @param string $comments
349 public function setComments($comments)
351 $this->comments
= $comments;
357 public function getMimetype()
359 return $this->mimetype
;
363 * @param string $mimetype
365 public function setMimetype($mimetype)
367 $this->mimetype
= $mimetype;
373 public function getReadingTime()
375 return $this->readingTime
;
379 * @param int $readingTime
381 public function setReadingTime($readingTime)
383 $this->readingTime
= $readingTime;
389 public function getDomainName()
391 return $this->domainName
;
395 * @param string $domainName
397 public function setDomainName($domainName)
399 $this->domainName
= $domainName;
405 public function isPublic()
407 return $this->isPublic
;
411 * @param boolean $isPublic
413 public function setPublic($isPublic)
415 $this->isPublic
= $isPublic;