]> git.immae.eu Git - github/wallabag/wallabag.git/blame - src/Wallabag/CoreBundle/Entity/Entries.php
disable authentication for the moment
[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 12 * @ORM\Table(name="entries")
c3235553 13 *
9d50517c
NL
14 */
15class Entries
16{
17 /**
18 * @var integer
19 *
20 * @ORM\Column(name="id", type="integer", nullable=true)
21 * @ORM\Id
22 * @ORM\GeneratedValue(strategy="IDENTITY")
23 */
24 private $id;
25
26 /**
27 * @var string
28 *
29 * @ORM\Column(name="title", type="text", nullable=true)
30 */
31 private $title;
32
33 /**
34 * @var string
35 *
b84a8055 36 * @Assert\NotBlank()
9d50517c
NL
37 * @ORM\Column(name="url", type="text", nullable=true)
38 */
39 private $url;
40
41 /**
42 * @var string
43 *
44 * @ORM\Column(name="is_read", type="decimal", precision=10, scale=0, nullable=true)
45 */
46 private $isRead = '0';
47
48 /**
49 * @var string
50 *
51 * @ORM\Column(name="is_fav", type="decimal", precision=10, scale=0, nullable=true)
52 */
53 private $isFav = '0';
54
55 /**
56 * @var string
57 *
58 * @ORM\Column(name="content", type="text", nullable=true)
59 */
60 private $content;
61
62 /**
63 * @var string
64 *
65 * @ORM\Column(name="user_id", type="decimal", precision=10, scale=0, nullable=true)
66 */
67 private $userId;
68
9d50517c
NL
69 /**
70 * Get id
71 *
7df80cb3 72 * @return integer
9d50517c
NL
73 */
74 public function getId()
75 {
76 return $this->id;
77 }
78
79 /**
80 * Set title
81 *
7df80cb3 82 * @param string $title
9d50517c
NL
83 * @return Entries
84 */
85 public function setTitle($title)
86 {
87 $this->title = $title;
88
89 return $this;
90 }
91
92 /**
93 * Get title
94 *
7df80cb3 95 * @return string
9d50517c
NL
96 */
97 public function getTitle()
98 {
99 return $this->title;
100 }
101
102 /**
103 * Set url
104 *
7df80cb3 105 * @param string $url
9d50517c
NL
106 * @return Entries
107 */
108 public function setUrl($url)
109 {
110 $this->url = $url;
111
112 return $this;
113 }
114
115 /**
116 * Get url
117 *
7df80cb3 118 * @return string
9d50517c
NL
119 */
120 public function getUrl()
121 {
122 return $this->url;
123 }
124
125 /**
126 * Set isRead
127 *
7df80cb3 128 * @param string $isRead
9d50517c
NL
129 * @return Entries
130 */
131 public function setIsRead($isRead)
132 {
133 $this->isRead = $isRead;
134
135 return $this;
136 }
137
138 /**
139 * Get isRead
140 *
7df80cb3 141 * @return string
9d50517c
NL
142 */
143 public function getIsRead()
144 {
145 return $this->isRead;
146 }
147
163eae0b
NL
148 public function toggleArchive()
149 {
150 $this->isRead = $this->getIsRead() ^ 1;
7df80cb3 151
163eae0b
NL
152 return $this;
153 }
154
9d50517c
NL
155 /**
156 * Set isFav
157 *
7df80cb3 158 * @param string $isFav
9d50517c
NL
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 *
7df80cb3 171 * @return string
9d50517c
NL
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 *
7df80cb3 188 * @param string $content
9d50517c
NL
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 *
7df80cb3 201 * @return string
9d50517c
NL
202 */
203 public function getContent()
204 {
205 return $this->content;
206 }
207
208 /**
209 * Set userId
210 *
7df80cb3 211 * @param string $userId
9d50517c
NL
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 *
7df80cb3 224 * @return string
9d50517c
NL
225 */
226 public function getUserId()
227 {
228 return $this->userId;
229 }
230}