1
|
|
|
<?php |
2
|
|
|
/* For licensing terms, see /license.txt */ |
3
|
|
|
|
4
|
|
|
namespace Chamilo\CoreBundle\Entity; |
5
|
|
|
|
6
|
|
|
use Doctrine\ORM\Mapping as ORM; |
7
|
|
|
|
8
|
|
|
/** |
9
|
|
|
* PersonalAgenda. |
10
|
|
|
* |
11
|
|
|
* @ORM\Table(name="personal_agenda", indexes={@ORM\Index(name="idx_personal_agenda_user", columns={"user"}), |
12
|
|
|
* @ORM\Index(name="idx_personal_agenda_parent", columns={"parent_event_id"})}) |
13
|
|
|
* @ORM\Entity |
14
|
|
|
*/ |
15
|
|
|
class PersonalAgenda |
16
|
|
|
{ |
17
|
|
|
/** |
18
|
|
|
* @var int |
19
|
|
|
* |
20
|
|
|
* @ORM\Column(name="id", type="integer") |
21
|
|
|
* @ORM\Id |
22
|
|
|
* @ORM\GeneratedValue |
23
|
|
|
*/ |
24
|
|
|
protected $id; |
25
|
|
|
|
26
|
|
|
/** |
27
|
|
|
* @var int |
28
|
|
|
* |
29
|
|
|
* @ORM\Column(name="user", type="integer", nullable=true) |
30
|
|
|
*/ |
31
|
|
|
protected $user; |
32
|
|
|
|
33
|
|
|
/** |
34
|
|
|
* @var string |
35
|
|
|
* |
36
|
|
|
* @ORM\Column(name="title", type="text", nullable=true) |
37
|
|
|
*/ |
38
|
|
|
protected $title; |
39
|
|
|
|
40
|
|
|
/** |
41
|
|
|
* @var string |
42
|
|
|
* |
43
|
|
|
* @ORM\Column(name="text", type="text", nullable=true) |
44
|
|
|
*/ |
45
|
|
|
protected $text; |
46
|
|
|
|
47
|
|
|
/** |
48
|
|
|
* @var \DateTime |
49
|
|
|
* |
50
|
|
|
* @ORM\Column(name="date", type="datetime", nullable=true) |
51
|
|
|
*/ |
52
|
|
|
protected $date; |
53
|
|
|
|
54
|
|
|
/** |
55
|
|
|
* @var \DateTime |
56
|
|
|
* |
57
|
|
|
* @ORM\Column(name="enddate", type="datetime", nullable=true) |
58
|
|
|
*/ |
59
|
|
|
protected $enddate; |
60
|
|
|
|
61
|
|
|
/** |
62
|
|
|
* @var int |
63
|
|
|
* |
64
|
|
|
* @ORM\Column(name="parent_event_id", type="integer", nullable=true) |
65
|
|
|
*/ |
66
|
|
|
protected $parentEventId; |
67
|
|
|
|
68
|
|
|
/** |
69
|
|
|
* @var int |
70
|
|
|
* |
71
|
|
|
* @ORM\Column(name="all_day", type="integer", nullable=false) |
72
|
|
|
*/ |
73
|
|
|
protected $allDay; |
74
|
|
|
|
75
|
|
|
/** |
76
|
|
|
* @var string |
77
|
|
|
* |
78
|
|
|
* @ORM\Column(name="color", type="string", length=255, nullable=true) |
79
|
|
|
*/ |
80
|
|
|
protected $color; |
81
|
|
|
|
82
|
|
|
/** |
83
|
|
|
* Set user. |
84
|
|
|
* |
85
|
|
|
* @param int $user |
86
|
|
|
* |
87
|
|
|
* @return PersonalAgenda |
88
|
|
|
*/ |
89
|
|
|
public function setUser($user) |
90
|
|
|
{ |
91
|
|
|
$this->user = $user; |
92
|
|
|
|
93
|
|
|
return $this; |
94
|
|
|
} |
95
|
|
|
|
96
|
|
|
/** |
97
|
|
|
* Get user. |
98
|
|
|
* |
99
|
|
|
* @return int |
100
|
|
|
*/ |
101
|
|
|
public function getUser() |
102
|
|
|
{ |
103
|
|
|
return $this->user; |
104
|
|
|
} |
105
|
|
|
|
106
|
|
|
/** |
107
|
|
|
* Set title. |
108
|
|
|
* |
109
|
|
|
* @param string $title |
110
|
|
|
* |
111
|
|
|
* @return PersonalAgenda |
112
|
|
|
*/ |
113
|
|
|
public function setTitle($title) |
114
|
|
|
{ |
115
|
|
|
$this->title = $title; |
116
|
|
|
|
117
|
|
|
return $this; |
118
|
|
|
} |
119
|
|
|
|
120
|
|
|
/** |
121
|
|
|
* Get title. |
122
|
|
|
* |
123
|
|
|
* @return string |
124
|
|
|
*/ |
125
|
|
|
public function getTitle() |
126
|
|
|
{ |
127
|
|
|
return $this->title; |
128
|
|
|
} |
129
|
|
|
|
130
|
|
|
/** |
131
|
|
|
* Set text. |
132
|
|
|
* |
133
|
|
|
* @param string $text |
134
|
|
|
* |
135
|
|
|
* @return PersonalAgenda |
136
|
|
|
*/ |
137
|
|
|
public function setText($text) |
138
|
|
|
{ |
139
|
|
|
$this->text = $text; |
140
|
|
|
|
141
|
|
|
return $this; |
142
|
|
|
} |
143
|
|
|
|
144
|
|
|
/** |
145
|
|
|
* Get text. |
146
|
|
|
* |
147
|
|
|
* @return string |
148
|
|
|
*/ |
149
|
|
|
public function getText() |
150
|
|
|
{ |
151
|
|
|
return $this->text; |
152
|
|
|
} |
153
|
|
|
|
154
|
|
|
/** |
155
|
|
|
* Set date. |
156
|
|
|
* |
157
|
|
|
* @param \DateTime $date |
158
|
|
|
* |
159
|
|
|
* @return PersonalAgenda |
160
|
|
|
*/ |
161
|
|
|
public function setDate($date) |
162
|
|
|
{ |
163
|
|
|
$this->date = $date; |
164
|
|
|
|
165
|
|
|
return $this; |
166
|
|
|
} |
167
|
|
|
|
168
|
|
|
/** |
169
|
|
|
* Get date. |
170
|
|
|
* |
171
|
|
|
* @return \DateTime |
172
|
|
|
*/ |
173
|
|
|
public function getDate() |
174
|
|
|
{ |
175
|
|
|
return $this->date; |
176
|
|
|
} |
177
|
|
|
|
178
|
|
|
/** |
179
|
|
|
* Set enddate. |
180
|
|
|
* |
181
|
|
|
* @param \DateTime $enddate |
182
|
|
|
* |
183
|
|
|
* @return PersonalAgenda |
184
|
|
|
*/ |
185
|
|
|
public function setEnddate($enddate) |
186
|
|
|
{ |
187
|
|
|
$this->enddate = $enddate; |
188
|
|
|
|
189
|
|
|
return $this; |
190
|
|
|
} |
191
|
|
|
|
192
|
|
|
/** |
193
|
|
|
* Get enddate. |
194
|
|
|
* |
195
|
|
|
* @return \DateTime |
196
|
|
|
*/ |
197
|
|
|
public function getEnddate() |
198
|
|
|
{ |
199
|
|
|
return $this->enddate; |
200
|
|
|
} |
201
|
|
|
|
202
|
|
|
/** |
203
|
|
|
* Set parentEventId. |
204
|
|
|
* |
205
|
|
|
* @param int $parentEventId |
206
|
|
|
* |
207
|
|
|
* @return PersonalAgenda |
208
|
|
|
*/ |
209
|
|
|
public function setParentEventId($parentEventId) |
210
|
|
|
{ |
211
|
|
|
$this->parentEventId = $parentEventId; |
212
|
|
|
|
213
|
|
|
return $this; |
214
|
|
|
} |
215
|
|
|
|
216
|
|
|
/** |
217
|
|
|
* Get parentEventId. |
218
|
|
|
* |
219
|
|
|
* @return int |
220
|
|
|
*/ |
221
|
|
|
public function getParentEventId() |
222
|
|
|
{ |
223
|
|
|
return $this->parentEventId; |
224
|
|
|
} |
225
|
|
|
|
226
|
|
|
/** |
227
|
|
|
* Set allDay. |
228
|
|
|
* |
229
|
|
|
* @param int $allDay |
230
|
|
|
* |
231
|
|
|
* @return PersonalAgenda |
232
|
|
|
*/ |
233
|
|
|
public function setAllDay($allDay) |
234
|
|
|
{ |
235
|
|
|
$this->allDay = $allDay; |
236
|
|
|
|
237
|
|
|
return $this; |
238
|
|
|
} |
239
|
|
|
|
240
|
|
|
/** |
241
|
|
|
* Get allDay. |
242
|
|
|
* |
243
|
|
|
* @return int |
244
|
|
|
*/ |
245
|
|
|
public function getAllDay() |
246
|
|
|
{ |
247
|
|
|
return $this->allDay; |
248
|
|
|
} |
249
|
|
|
|
250
|
|
|
/** |
251
|
|
|
* Get id. |
252
|
|
|
* |
253
|
|
|
* @return int |
254
|
|
|
*/ |
255
|
|
|
public function getId() |
256
|
|
|
{ |
257
|
|
|
return $this->id; |
258
|
|
|
} |
259
|
|
|
|
260
|
|
|
/** |
261
|
|
|
* @return string |
262
|
|
|
*/ |
263
|
|
|
public function getColor() |
264
|
|
|
{ |
265
|
|
|
return $this->color; |
266
|
|
|
} |
267
|
|
|
|
268
|
|
|
/** |
269
|
|
|
* @param string $color |
270
|
|
|
* |
271
|
|
|
* @return PersonalAgenda |
272
|
|
|
*/ |
273
|
|
|
public function setColor($color) |
274
|
|
|
{ |
275
|
|
|
$this->color = $color; |
276
|
|
|
|
277
|
|
|
return $this; |
278
|
|
|
} |
279
|
|
|
} |
280
|
|
|
|