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

GradebookLink::__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
 * GradebookLink.
12
 *
13
 * @ORM\Table(name="gradebook_link")
14
 * @ORM\Entity
15
 */
16
class GradebookLink
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 int
31
     *
32
     * @ORM\Column(name="type", type="integer", nullable=false)
33
     */
34
    protected $type;
35
36
    /**
37
     * @var int
38
     *
39
     * @ORM\Column(name="ref_id", type="integer", nullable=false)
40
     */
41
    protected $refId;
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="gradebookLinks")
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=false)
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 int
81
     *
82
     * @ORM\Column(name="visible", type="integer", nullable=false)
83
     */
84
    protected $visible;
85
86
    /**
87
     * @var int
88
     *
89
     * @ORM\Column(name="locked", type="integer", nullable=false)
90
     */
91
    protected $locked;
92
93
    /**
94
     * GradebookEvaluation constructor.
95
     */
96
    public function __construct()
97
    {
98
        $this->locked = 0;
99
    }
100
101
    /**
102
     * Set type.
103
     *
104
     * @param int $type
105
     *
106
     * @return GradebookLink
107
     */
108
    public function setType($type)
109
    {
110
        $this->type = $type;
111
112
        return $this;
113
    }
114
115
    /**
116
     * Get type.
117
     *
118
     * @return int
119
     */
120
    public function getType()
121
    {
122
        return $this->type;
123
    }
124
125
    /**
126
     * Set refId.
127
     *
128
     * @param int $refId
129
     *
130
     * @return GradebookLink
131
     */
132
    public function setRefId($refId)
133
    {
134
        $this->refId = $refId;
135
136
        return $this;
137
    }
138
139
    /**
140
     * Get refId.
141
     *
142
     * @return int
143
     */
144
    public function getRefId()
145
    {
146
        return $this->refId;
147
    }
148
149
    /**
150
     * Set userId.
151
     *
152
     * @param int $userId
153
     *
154
     * @return GradebookLink
155
     */
156
    public function setUserId($userId)
157
    {
158
        $this->userId = $userId;
159
160
        return $this;
161
    }
162
163
    /**
164
     * Get userId.
165
     *
166
     * @return int
167
     */
168
    public function getUserId()
169
    {
170
        return $this->userId;
171
    }
172
173
    /**
174
     * Set categoryId.
175
     *
176
     * @param int $categoryId
177
     *
178
     * @return GradebookLink
179
     */
180
    public function setCategoryId($categoryId)
181
    {
182
        $this->categoryId = $categoryId;
183
184
        return $this;
185
    }
186
187
    /**
188
     * Get categoryId.
189
     *
190
     * @return int
191
     */
192
    public function getCategoryId()
193
    {
194
        return $this->categoryId;
195
    }
196
197
    /**
198
     * Set createdAt.
199
     *
200
     * @param \DateTime $createdAt
201
     *
202
     * @return GradebookLink
203
     */
204
    public function setCreatedAt($createdAt)
205
    {
206
        $this->createdAt = $createdAt;
207
208
        return $this;
209
    }
210
211
    /**
212
     * Get createdAt.
213
     *
214
     * @return \DateTime
215
     */
216
    public function getCreatedAt()
217
    {
218
        return $this->createdAt;
219
    }
220
221
    /**
222
     * Set weight.
223
     *
224
     * @param float $weight
225
     *
226
     * @return GradebookLink
227
     */
228
    public function setWeight($weight)
229
    {
230
        $this->weight = $weight;
231
232
        return $this;
233
    }
234
235
    /**
236
     * Get weight.
237
     *
238
     * @return float
239
     */
240
    public function getWeight()
241
    {
242
        return $this->weight;
243
    }
244
245
    /**
246
     * Set visible.
247
     *
248
     * @param int $visible
249
     *
250
     * @return GradebookLink
251
     */
252
    public function setVisible($visible)
253
    {
254
        $this->visible = $visible;
255
256
        return $this;
257
    }
258
259
    /**
260
     * Get visible.
261
     *
262
     * @return int
263
     */
264
    public function getVisible()
265
    {
266
        return $this->visible;
267
    }
268
269
    /**
270
     * Set locked.
271
     *
272
     * @param int $locked
273
     *
274
     * @return GradebookLink
275
     */
276
    public function setLocked($locked)
277
    {
278
        $this->locked = $locked;
279
280
        return $this;
281
    }
282
283
    /**
284
     * Get locked.
285
     *
286
     * @return int
287
     */
288
    public function getLocked()
289
    {
290
        return $this->locked;
291
    }
292
293
    /**
294
     * Get id.
295
     *
296
     * @return int
297
     */
298
    public function getId()
299
    {
300
        return $this->id;
301
    }
302
}
303