Completed
Push — master ( 0d55cd...2b4dde )
by Julito
09:59
created

GradebookEvaluation::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

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