Completed
Pull Request — master (#3464)
by Julito
14:18 queued 01:15
created

CNotebook::setUser()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
/* For licensing terms, see /license.txt */
4
5
namespace Chamilo\CourseBundle\Entity;
6
7
use Doctrine\ORM\Mapping as ORM;
8
use Chamilo\CoreBundle\Entity\User;
9
10
/**
11
 * CNotebook.
12
 *
13
 * @ORM\Table(
14
 *  name="c_notebook",
15
 *  indexes={
16
 *      @ORM\Index(name="course", columns={"c_id"})
17
 *  }
18
 * )
19
 * @ORM\Entity(repositoryClass="Chamilo\CourseBundle\Repository\CNotebookRepository")
20
 */
21
class CNotebook
22
{
23
    /**
24
     * @var int
25
     *
26
     * @ORM\Column(name="iid", type="integer")
27
     * @ORM\Id
28
     * @ORM\GeneratedValue
29
     */
30
    protected $iid;
31
32
    /**
33
     * @var int
34
     *
35
     * @ORM\Column(name="c_id", type="integer")
36
     */
37
    protected $cId;
38
39
    /**
40
     * @var int
41
     *
42
     * @ORM\Column(name="notebook_id", type="integer")
43
     */
44
    protected $notebookId;
45
46
    /**
47
     * @var User
48
     * @ORM\ManyToOne (
49
     *    targetEntity="Chamilo\CoreBundle\Entity\User",
50
     *    inversedBy="cNotebooks"
51
     * )
52
     * @ORM\JoinColumn(
53
     *    name="user_id",
54
     *    referencedColumnName="id",
55
     *    onDelete="CASCADE"
56
     * )
57
     */
58
    protected $user;
59
60
    /**
61
     * Get user.
62
     *
63
     */
64
    public function getUser(): User
65
    {
66
        return $this->user;
67
    }
68
69
    /**
70
     * Set user.
71
     *
72
     */
73
    public function setUser($user)
74
    {
75
        $this->user = $user;
76
77
        return $this;
78
    }
79
80
    /**
81
     * @var string
82
     *
83
     * @ORM\Column(name="course", type="string", length=40, nullable=false)
84
     */
85
    protected $course;
86
87
    /**
88
     * @var int
89
     *
90
     * @ORM\Column(name="session_id", type="integer", nullable=false)
91
     */
92
    protected $sessionId;
93
94
    /**
95
     * @var string
96
     *
97
     * @ORM\Column(name="title", type="string", length=255, nullable=false)
98
     */
99
    protected $title;
100
101
    /**
102
     * @var string
103
     *
104
     * @ORM\Column(name="description", type="text", nullable=false)
105
     */
106
    protected $description;
107
108
    /**
109
     * @var \DateTime
110
     *
111
     * @ORM\Column(name="creation_date", type="datetime", nullable=false)
112
     */
113
    protected $creationDate;
114
115
    /**
116
     * @var \DateTime
117
     *
118
     * @ORM\Column(name="update_date", type="datetime", nullable=false)
119
     */
120
    protected $updateDate;
121
122
    /**
123
     * @var int
124
     *
125
     * @ORM\Column(name="status", type="integer", nullable=true)
126
     */
127
    protected $status;
128
129
    /**
130
     * Set course.
131
     *
132
     * @param string $course
133
     *
134
     * @return CNotebook
135
     */
136
    public function setCourse($course)
137
    {
138
        $this->course = $course;
139
140
        return $this;
141
    }
142
143
    /**
144
     * Get course.
145
     *
146
     * @return string
147
     */
148
    public function getCourse()
149
    {
150
        return $this->course;
151
    }
152
153
    /**
154
     * Set sessionId.
155
     *
156
     * @param int $sessionId
157
     *
158
     * @return CNotebook
159
     */
160
    public function setSessionId($sessionId)
161
    {
162
        $this->sessionId = $sessionId;
163
164
        return $this;
165
    }
166
167
    /**
168
     * Get sessionId.
169
     *
170
     * @return int
171
     */
172
    public function getSessionId()
173
    {
174
        return $this->sessionId;
175
    }
176
177
    /**
178
     * Set title.
179
     *
180
     * @param string $title
181
     *
182
     * @return CNotebook
183
     */
184
    public function setTitle($title)
185
    {
186
        $this->title = $title;
187
188
        return $this;
189
    }
190
191
    /**
192
     * Get title.
193
     *
194
     * @return string
195
     */
196
    public function getTitle()
197
    {
198
        return $this->title;
199
    }
200
201
    /**
202
     * Set description.
203
     *
204
     * @param string $description
205
     *
206
     * @return CNotebook
207
     */
208
    public function setDescription($description)
209
    {
210
        $this->description = $description;
211
212
        return $this;
213
    }
214
215
    /**
216
     * Get description.
217
     *
218
     * @return string
219
     */
220
    public function getDescription()
221
    {
222
        return $this->description;
223
    }
224
225
    /**
226
     * Set creationDate.
227
     *
228
     * @param \DateTime $creationDate
229
     *
230
     * @return CNotebook
231
     */
232
    public function setCreationDate($creationDate)
233
    {
234
        $this->creationDate = $creationDate;
235
236
        return $this;
237
    }
238
239
    /**
240
     * Get creationDate.
241
     *
242
     * @return \DateTime
243
     */
244
    public function getCreationDate()
245
    {
246
        return $this->creationDate;
247
    }
248
249
    /**
250
     * Set updateDate.
251
     *
252
     * @param \DateTime $updateDate
253
     *
254
     * @return CNotebook
255
     */
256
    public function setUpdateDate($updateDate)
257
    {
258
        $this->updateDate = $updateDate;
259
260
        return $this;
261
    }
262
263
    /**
264
     * Get updateDate.
265
     *
266
     * @return \DateTime
267
     */
268
    public function getUpdateDate()
269
    {
270
        return $this->updateDate;
271
    }
272
273
    /**
274
     * Set status.
275
     *
276
     * @param int $status
277
     *
278
     * @return CNotebook
279
     */
280
    public function setStatus($status)
281
    {
282
        $this->status = $status;
283
284
        return $this;
285
    }
286
287
    /**
288
     * Get status.
289
     *
290
     * @return int
291
     */
292
    public function getStatus()
293
    {
294
        return $this->status;
295
    }
296
297
    /**
298
     * Set notebookId.
299
     *
300
     * @param int $notebookId
301
     *
302
     * @return CNotebook
303
     */
304
    public function setNotebookId($notebookId)
305
    {
306
        $this->notebookId = $notebookId;
307
308
        return $this;
309
    }
310
311
    /**
312
     * Get notebookId.
313
     *
314
     * @return int
315
     */
316
    public function getNotebookId()
317
    {
318
        return $this->notebookId;
319
    }
320
321
    /**
322
     * Set cId.
323
     *
324
     * @param int $cId
325
     *
326
     * @return CNotebook
327
     */
328
    public function setCId($cId)
329
    {
330
        $this->cId = $cId;
331
332
        return $this;
333
    }
334
335
    /**
336
     * Get cId.
337
     *
338
     * @return int
339
     */
340
    public function getCId()
341
    {
342
        return $this->cId;
343
    }
344
345
    /**
346
     * Get iid.
347
     *
348
     * @return int
349
     */
350
    public function getIid()
351
    {
352
        return $this->iid;
353
    }
354
}
355