aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Entity
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-02-04 22:25:44 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2015-02-04 22:25:44 +0100
commit34d15eb4d0544263d27650207b23bd046e509f74 (patch)
tree3b7e0b3545119c4bff6a4ce712570f257237a9ba /src/Wallabag/CoreBundle/Entity
parent1b0e6e9ae6c7c294a911018e8fdd60f8630e3b7b (diff)
downloadwallabag-34d15eb4d0544263d27650207b23bd046e509f74.tar.gz
wallabag-34d15eb4d0544263d27650207b23bd046e509f74.tar.zst
wallabag-34d15eb4d0544263d27650207b23bd046e509f74.zip
change database structure for Entries
Diffstat (limited to 'src/Wallabag/CoreBundle/Entity')
-rw-r--r--src/Wallabag/CoreBundle/Entity/Entries.php180
1 files changed, 172 insertions, 8 deletions
diff --git a/src/Wallabag/CoreBundle/Entity/Entries.php b/src/Wallabag/CoreBundle/Entity/Entries.php
index 3f23965f..6eb1efc0 100644
--- a/src/Wallabag/CoreBundle/Entity/Entries.php
+++ b/src/Wallabag/CoreBundle/Entity/Entries.php
@@ -10,6 +10,7 @@ use Symfony\Component\Validator\Constraints as Assert;
10 * 10 *
11 * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\EntriesRepository") 11 * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\EntriesRepository")
12 * @ORM\Table(name="entries") 12 * @ORM\Table(name="entries")
13 * @ORM\HasLifecycleCallbacks()
13 * 14 *
14 */ 15 */
15class Entries 16class Entries
@@ -19,9 +20,9 @@ class Entries
19 * 20 *
20 * @ORM\Column(name="id", type="integer", nullable=true) 21 * @ORM\Column(name="id", type="integer", nullable=true)
21 * @ORM\Id 22 * @ORM\Id
22 * @ORM\GeneratedValue(strategy="IDENTITY") 23 * @ORM\GeneratedValue(strategy="AUTO")
23 */ 24 */
24 private $id; 25 private $id = null;
25 26
26 /** 27 /**
27 * @var string 28 * @var string
@@ -41,23 +42,23 @@ class Entries
41 /** 42 /**
42 * @var boolean 43 * @var boolean
43 * 44 *
44 * @ORM\Column(name="is_read", type="boolean", options={"default" = false}) 45 * @ORM\Column(name="is_read", type="boolean", nullable=true, options={"default" = false})
45 */ 46 */
46 private $isRead; 47 private $isRead = false;
47 48
48 /** 49 /**
49 * @var boolean 50 * @var boolean
50 * 51 *
51 * @ORM\Column(name="is_fav", type="boolean", options={"default" = false}) 52 * @ORM\Column(name="is_fav", type="boolean", nullable=true, options={"default" = false})
52 */ 53 */
53 private $isFav; 54 private $isFav = false;
54 55
55 /** 56 /**
56 * @var boolean 57 * @var boolean
57 * 58 *
58 * @ORM\Column(name="is_deleted", type="boolean", options={"default" = false}) 59 * @ORM\Column(name="is_deleted", type="boolean", nullable=true, options={"default" = false})
59 */ 60 */
60 private $isDeleted; 61 private $isDeleted = false;
61 62
62 /** 63 /**
63 * @var string 64 * @var string
@@ -67,6 +68,20 @@ class Entries
67 private $content; 68 private $content;
68 69
69 /** 70 /**
71 * @var date
72 *
73 * @ORM\Column(name="created_at", type="datetime", nullable=true)
74 */
75 private $createdAt;
76
77 /**
78 * @var date
79 *
80 * @ORM\Column(name="updated_at", type="datetime", nullable=true)
81 */
82 private $updatedAt;
83
84 /**
70 * @var string 85 * @var string
71 * 86 *
72 * @ORM\Column(name="user_id", type="decimal", precision=10, scale=0, nullable=true) 87 * @ORM\Column(name="user_id", type="decimal", precision=10, scale=0, nullable=true)
@@ -74,6 +89,41 @@ class Entries
74 private $userId; 89 private $userId;
75 90
76 /** 91 /**
92 * @var string
93 *
94 * @ORM\Column(name="comments", type="text", nullable=true)
95 */
96 private $comments;
97
98 /**
99 * @var string
100 *
101 * @ORM\Column(name="mimetype", type="text", nullable=true)
102 */
103 private $mimetype;
104
105 /**
106 * @var integer
107 *
108 * @ORM\Column(name="reading_type", type="integer", nullable=true)
109 */
110 private $readingTime;
111
112 /**
113 * @var string
114 *
115 * @ORM\Column(name="domain_name", type="text", nullable=true)
116 */
117 private $domainName;
118
119 /**
120 * @var boolean
121 *
122 * @ORM\Column(name="is_public", type="boolean", nullable=true, options={"default" = false})
123 */
124 private $isPublic;
125
126 /**
77 * Get id 127 * Get id
78 * 128 *
79 * @return integer 129 * @return integer
@@ -250,4 +300,118 @@ class Entries
250 { 300 {
251 $this->isDeleted = $isDeleted; 301 $this->isDeleted = $isDeleted;
252 } 302 }
303
304 /**
305 * @return mixed
306 */
307 public function getCreatedAt()
308 {
309 return $this->createdAt;
310 }
311
312 /**
313 * @param mixed $createdAt
314 * @ORM\PrePersist
315 */
316 public function setCreatedAt()
317 {
318 $this->createdAt = new \DateTime();
319 }
320
321 /**
322 * @return string
323 */
324 public function getUpdatedAt()
325 {
326 return $this->updatedAt;
327 }
328
329 /**
330 * @param string $updatedAt
331 * @ORM\PreUpdate
332 */
333 public function setUpdatedAt()
334 {
335 $this->updatedAt = new \DateTime();
336 }
337
338 /**
339 * @return string
340 */
341 public function getComments()
342 {
343 return $this->comments;
344 }
345
346 /**
347 * @param string $comments
348 */
349 public function setComments($comments)
350 {
351 $this->comments = $comments;
352 }
353
354 /**
355 * @return string
356 */
357 public function getMimetype()
358 {
359 return $this->mimetype;
360 }
361
362 /**
363 * @param string $mimetype
364 */
365 public function setMimetype($mimetype)
366 {
367 $this->mimetype = $mimetype;
368 }
369
370 /**
371 * @return int
372 */
373 public function getReadingTime()
374 {
375 return $this->readingTime;
376 }
377
378 /**
379 * @param int $readingTime
380 */
381 public function setReadingTime($readingTime)
382 {
383 $this->readingTime = $readingTime;
384 }
385
386 /**
387 * @return string
388 */
389 public function getDomainName()
390 {
391 return $this->domainName;
392 }
393
394 /**
395 * @param string $domainName
396 */
397 public function setDomainName($domainName)
398 {
399 $this->domainName = $domainName;
400 }
401
402 /**
403 * @return boolean
404 */
405 public function isIsPublic()
406 {
407 return $this->isPublic;
408 }
409
410 /**
411 * @param boolean $isPublic
412 */
413 public function setIsPublic($isPublic)
414 {
415 $this->isPublic = $isPublic;
416 }
253} 417}