|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/* For licensing terms, see /license.txt */ |
|
4
|
|
|
|
|
5
|
|
|
namespace Chamilo\CourseBundle\Entity; |
|
6
|
|
|
|
|
7
|
|
|
use Chamilo\CoreBundle\Entity\User; |
|
8
|
|
|
use Doctrine\ORM\Mapping as ORM; |
|
9
|
|
|
use Symfony\Component\Validator\Constraints as Assert; |
|
10
|
|
|
|
|
11
|
|
|
/** |
|
12
|
|
|
* CDropboxCategory. |
|
13
|
|
|
* |
|
14
|
|
|
* @ORM\Table( |
|
15
|
|
|
* name="c_dropbox_category", |
|
16
|
|
|
* indexes={ |
|
17
|
|
|
* @ORM\Index(name="course", columns={"c_id"}), |
|
18
|
|
|
* @ORM\Index(name="session_id", columns={"session_id"}) |
|
19
|
|
|
* } |
|
20
|
|
|
* ) |
|
21
|
|
|
* @ORM\Entity |
|
22
|
|
|
*/ |
|
23
|
|
|
class CDropboxCategory |
|
24
|
|
|
{ |
|
25
|
|
|
/** |
|
26
|
|
|
* @var int |
|
27
|
|
|
* |
|
28
|
|
|
* @ORM\Column(name="iid", type="integer") |
|
29
|
|
|
* @ORM\Id |
|
30
|
|
|
* @ORM\GeneratedValue |
|
31
|
|
|
*/ |
|
32
|
|
|
protected $iid; |
|
33
|
|
|
|
|
34
|
|
|
/** |
|
35
|
|
|
* @var int |
|
36
|
|
|
* |
|
37
|
|
|
* @ORM\Column(name="c_id", type="integer") |
|
38
|
|
|
*/ |
|
39
|
|
|
protected $cId; |
|
40
|
|
|
|
|
41
|
|
|
/** |
|
42
|
|
|
* @var int |
|
43
|
|
|
* |
|
44
|
|
|
* @ORM\Column(name="cat_id", type="integer") |
|
45
|
|
|
*/ |
|
46
|
|
|
protected $catId; |
|
47
|
|
|
|
|
48
|
|
|
/** |
|
49
|
|
|
* @var string |
|
50
|
|
|
* |
|
51
|
|
|
* @Assert\NotBlank() |
|
52
|
|
|
* |
|
53
|
|
|
* @ORM\Column(name="cat_name", type="text", nullable=false) |
|
54
|
|
|
*/ |
|
55
|
|
|
protected $catName; |
|
56
|
|
|
|
|
57
|
|
|
/** |
|
58
|
|
|
* @var bool |
|
59
|
|
|
* |
|
60
|
|
|
* @ORM\Column(name="received", type="boolean", nullable=false) |
|
61
|
|
|
*/ |
|
62
|
|
|
protected $received; |
|
63
|
|
|
|
|
64
|
|
|
/** |
|
65
|
|
|
* @var bool |
|
66
|
|
|
* |
|
67
|
|
|
* @ORM\Column(name="sent", type="boolean", nullable=false) |
|
68
|
|
|
*/ |
|
69
|
|
|
protected $sent; |
|
70
|
|
|
|
|
71
|
|
|
/** |
|
72
|
|
|
* @var User |
|
73
|
|
|
* @ORM\ManyToOne ( |
|
74
|
|
|
* targetEntity="Chamilo\CoreBundle\Entity\User", |
|
75
|
|
|
* inversedBy="cDropboxCategorys" |
|
76
|
|
|
* ) |
|
77
|
|
|
* @ORM\JoinColumn( |
|
78
|
|
|
* name="user_id", |
|
79
|
|
|
* referencedColumnName="id", |
|
80
|
|
|
* onDelete="CASCADE" |
|
81
|
|
|
* ) |
|
82
|
|
|
*/ |
|
83
|
|
|
protected $user; |
|
84
|
|
|
|
|
85
|
|
|
/** |
|
86
|
|
|
* Get user. |
|
87
|
|
|
* |
|
88
|
|
|
*/ |
|
89
|
|
|
public function getUser(): User |
|
90
|
|
|
{ |
|
91
|
|
|
return $this->user; |
|
92
|
|
|
} |
|
93
|
|
|
|
|
94
|
|
|
/** |
|
95
|
|
|
* Set user. |
|
96
|
|
|
* |
|
97
|
|
|
*/ |
|
98
|
|
|
public function setUser($user) |
|
99
|
|
|
{ |
|
100
|
|
|
$this->user = $user; |
|
101
|
|
|
|
|
102
|
|
|
return $this; |
|
103
|
|
|
} |
|
104
|
|
|
|
|
105
|
|
|
/** |
|
106
|
|
|
* @var int |
|
107
|
|
|
* |
|
108
|
|
|
* @ORM\Column(name="session_id", type="integer", nullable=false) |
|
109
|
|
|
*/ |
|
110
|
|
|
protected $sessionId; |
|
111
|
|
|
|
|
112
|
|
|
/** |
|
113
|
|
|
* Set catName. |
|
114
|
|
|
* |
|
115
|
|
|
* @param string $catName |
|
116
|
|
|
* |
|
117
|
|
|
* @return CDropboxCategory |
|
118
|
|
|
*/ |
|
119
|
|
|
public function setCatName($catName) |
|
120
|
|
|
{ |
|
121
|
|
|
$this->catName = $catName; |
|
122
|
|
|
|
|
123
|
|
|
return $this; |
|
124
|
|
|
} |
|
125
|
|
|
|
|
126
|
|
|
/** |
|
127
|
|
|
* Get catName. |
|
128
|
|
|
* |
|
129
|
|
|
* @return string |
|
130
|
|
|
*/ |
|
131
|
|
|
public function getCatName() |
|
132
|
|
|
{ |
|
133
|
|
|
return $this->catName; |
|
134
|
|
|
} |
|
135
|
|
|
|
|
136
|
|
|
/** |
|
137
|
|
|
* Set received. |
|
138
|
|
|
* |
|
139
|
|
|
* @param bool $received |
|
140
|
|
|
* |
|
141
|
|
|
* @return CDropboxCategory |
|
142
|
|
|
*/ |
|
143
|
|
|
public function setReceived($received) |
|
144
|
|
|
{ |
|
145
|
|
|
$this->received = $received; |
|
146
|
|
|
|
|
147
|
|
|
return $this; |
|
148
|
|
|
} |
|
149
|
|
|
|
|
150
|
|
|
/** |
|
151
|
|
|
* Get received. |
|
152
|
|
|
* |
|
153
|
|
|
* @return bool |
|
154
|
|
|
*/ |
|
155
|
|
|
public function getReceived() |
|
156
|
|
|
{ |
|
157
|
|
|
return $this->received; |
|
158
|
|
|
} |
|
159
|
|
|
|
|
160
|
|
|
/** |
|
161
|
|
|
* Set sent. |
|
162
|
|
|
* |
|
163
|
|
|
* @param bool $sent |
|
164
|
|
|
* |
|
165
|
|
|
* @return CDropboxCategory |
|
166
|
|
|
*/ |
|
167
|
|
|
public function setSent($sent) |
|
168
|
|
|
{ |
|
169
|
|
|
$this->sent = $sent; |
|
170
|
|
|
|
|
171
|
|
|
return $this; |
|
172
|
|
|
} |
|
173
|
|
|
|
|
174
|
|
|
/** |
|
175
|
|
|
* Get sent. |
|
176
|
|
|
* |
|
177
|
|
|
* @return bool |
|
178
|
|
|
*/ |
|
179
|
|
|
public function getSent() |
|
180
|
|
|
{ |
|
181
|
|
|
return $this->sent; |
|
182
|
|
|
} |
|
183
|
|
|
|
|
184
|
|
|
/** |
|
185
|
|
|
* Set sessionId. |
|
186
|
|
|
* |
|
187
|
|
|
* @param int $sessionId |
|
188
|
|
|
* |
|
189
|
|
|
* @return CDropboxCategory |
|
190
|
|
|
*/ |
|
191
|
|
|
public function setSessionId($sessionId) |
|
192
|
|
|
{ |
|
193
|
|
|
$this->sessionId = $sessionId; |
|
194
|
|
|
|
|
195
|
|
|
return $this; |
|
196
|
|
|
} |
|
197
|
|
|
|
|
198
|
|
|
/** |
|
199
|
|
|
* Get sessionId. |
|
200
|
|
|
* |
|
201
|
|
|
* @return int |
|
202
|
|
|
*/ |
|
203
|
|
|
public function getSessionId() |
|
204
|
|
|
{ |
|
205
|
|
|
return $this->sessionId; |
|
206
|
|
|
} |
|
207
|
|
|
|
|
208
|
|
|
/** |
|
209
|
|
|
* Set catId. |
|
210
|
|
|
* |
|
211
|
|
|
* @param int $catId |
|
212
|
|
|
* |
|
213
|
|
|
* @return CDropboxCategory |
|
214
|
|
|
*/ |
|
215
|
|
|
public function setCatId($catId) |
|
216
|
|
|
{ |
|
217
|
|
|
$this->catId = $catId; |
|
218
|
|
|
|
|
219
|
|
|
return $this; |
|
220
|
|
|
} |
|
221
|
|
|
|
|
222
|
|
|
/** |
|
223
|
|
|
* Get catId. |
|
224
|
|
|
* |
|
225
|
|
|
* @return int |
|
226
|
|
|
*/ |
|
227
|
|
|
public function getCatId() |
|
228
|
|
|
{ |
|
229
|
|
|
return $this->catId; |
|
230
|
|
|
} |
|
231
|
|
|
|
|
232
|
|
|
/** |
|
233
|
|
|
* Set cId. |
|
234
|
|
|
* |
|
235
|
|
|
* @param int $cId |
|
236
|
|
|
* |
|
237
|
|
|
* @return CDropboxCategory |
|
238
|
|
|
*/ |
|
239
|
|
|
public function setCId($cId) |
|
240
|
|
|
{ |
|
241
|
|
|
$this->cId = $cId; |
|
242
|
|
|
|
|
243
|
|
|
return $this; |
|
244
|
|
|
} |
|
245
|
|
|
|
|
246
|
|
|
/** |
|
247
|
|
|
* Get cId. |
|
248
|
|
|
* |
|
249
|
|
|
* @return int |
|
250
|
|
|
*/ |
|
251
|
|
|
public function getCId() |
|
252
|
|
|
{ |
|
253
|
|
|
return $this->cId; |
|
254
|
|
|
} |
|
255
|
|
|
} |
|
256
|
|
|
|