]> git.immae.eu Git - github/wallabag/wallabag.git/blame - src/Wallabag/CoreBundle/Entity/Entries.php
move WallabagBundle into Wallabag:CoreBundle
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Entity / Entries.php
CommitLineData
9d50517c
NL
1<?php
2
ad4d1caa 3namespace Wallabag\CoreBundle\Entity;
9d50517c
NL
4
5use Doctrine\ORM\Mapping as ORM;
b84a8055 6use Symfony\Component\Validator\Constraints as Assert;
9d50517c
NL
7
8/**
9 * Entries
10 *
ad4d1caa 11 * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\EntriesRepository")
9d50517c
NL
12 * @ORM\Table(name="entries")
13 */
14class Entries
15{
16 /**
17 * @var integer
18 *
19 * @ORM\Column(name="id", type="integer", nullable=true)
20 * @ORM\Id
21 * @ORM\GeneratedValue(strategy="IDENTITY")
22 */
23 private $id;
24
25 /**
26 * @var string
27 *
28 * @ORM\Column(name="title", type="text", nullable=true)
29 */
30 private $title;
31
32 /**
33 * @var string
34 *
b84a8055 35 * @Assert\NotBlank()
9d50517c
NL
36 * @ORM\Column(name="url", type="text", nullable=true)
37 */
38 private $url;
39
40 /**
41 * @var string
42 *
43 * @ORM\Column(name="is_read", type="decimal", precision=10, scale=0, nullable=true)
44 */
45 private $isRead = '0';
46
47 /**
48 * @var string
49 *
50 * @ORM\Column(name="is_fav", type="decimal", precision=10, scale=0, nullable=true)
51 */
52 private $isFav = '0';
53
54 /**
55 * @var string
56 *
57 * @ORM\Column(name="content", type="text", nullable=true)
58 */
59 private $content;
60
61 /**
62 * @var string
63 *
64 * @ORM\Column(name="user_id", type="decimal", precision=10, scale=0, nullable=true)
65 */
66 private $userId;
67
68
69
70 /**
71 * Get id
72 *
73 * @return integer
74 */
75 public function getId()
76 {
77 return $this->id;
78 }
79
80 /**
81 * Set title
82 *
83 * @param string $title
84 * @return Entries
85 */
86 public function setTitle($title)
87 {
88 $this->title = $title;
89
90 return $this;
91 }
92
93 /**
94 * Get title
95 *
96 * @return string
97 */
98 public function getTitle()
99 {
100 return $this->title;
101 }
102
103 /**
104 * Set url
105 *
106 * @param string $url
107 * @return Entries
108 */
109 public function setUrl($url)
110 {
111 $this->url = $url;
112
113 return $this;
114 }
115
116 /**
117 * Get url
118 *
119 * @return string
120 */
121 public function getUrl()
122 {
123 return $this->url;
124 }
125
126 /**
127 * Set isRead
128 *
129 * @param string $isRead
130 * @return Entries
131 */
132 public function setIsRead($isRead)
133 {
134 $this->isRead = $isRead;
135
136 return $this;
137 }
138
139 /**
140 * Get isRead
141 *
142 * @return string
143 */
144 public function getIsRead()
145 {
146 return $this->isRead;
147 }
148
163eae0b
NL
149 public function toggleArchive()
150 {
151 $this->isRead = $this->getIsRead() ^ 1;
152 return $this;
153 }
154
9d50517c
NL
155 /**
156 * Set isFav
157 *
158 * @param string $isFav
159 * @return Entries
160 */
161 public function setIsFav($isFav)
162 {
163 $this->isFav = $isFav;
164
165 return $this;
166 }
167
168 /**
169 * Get isFav
170 *
171 * @return string
172 */
173 public function getIsFav()
174 {
175 return $this->isFav;
176 }
177
163eae0b
NL
178 public function toggleStar()
179 {
180 $this->isFav = $this->getIsFav() ^ 1;
181
182 return $this;
183 }
184
9d50517c
NL
185 /**
186 * Set content
187 *
188 * @param string $content
189 * @return Entries
190 */
191 public function setContent($content)
192 {
193 $this->content = $content;
194
195 return $this;
196 }
197
198 /**
199 * Get content
200 *
201 * @return string
202 */
203 public function getContent()
204 {
205 return $this->content;
206 }
207
208 /**
209 * Set userId
210 *
211 * @param string $userId
212 * @return Entries
213 */
214 public function setUserId($userId)
215 {
216 $this->userId = $userId;
217
218 return $this;
219 }
220
221 /**
222 * Get userId
223 *
224 * @return string
225 */
226 public function getUserId()
227 {
228 return $this->userId;
229 }
230}