Completed
Push — master ( 0adf57...cd9ffe )
by Julito
10:56
created

CExerciseCategory::setCId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
rs 10
c 1
b 0
f 0
1
<?php
2
/* For licensing terms, see /license.txt */
3
4
namespace Chamilo\CourseBundle\Entity;
5
6
use Doctrine\ORM\Mapping as ORM;
7
use Gedmo\Mapping\Annotation as Gedmo;
8
9
/**
10
 * CExerciseCategory.
11
 *
12
 * @ORM\Table(name="c_exercise_category")
13
 * @ORM\Entity(repositoryClass="Gedmo\Sortable\Entity\Repository\SortableRepository")
14
 */
15
class CExerciseCategory
16
{
17
    /**
18
     * @var int
19
     *
20
     * @ORM\Column(name="id", type="bigint")
21
     * @ORM\Id
22
     * @ORM\GeneratedValue
23
     */
24
    protected $id;
25
26
    /**
27
     * @var int
28
     *
29
     * @Gedmo\SortableGroup
30
     * @ORM\ManyToOne(targetEntity="Chamilo\CourseBundle\Entity\CExerciseCategory", inversedBy="children")
31
     * @ORM\JoinColumn(referencedColumnName="id", onDelete="SET NULL")
32
     *
33
     * @ORM\Column(name="c_id", type="integer")
34
     */
35
    protected $cId;
36
37
    /**
38
     * @var string
39
     *
40
     * @ORM\Column(name="name", type="string", length=255, nullable=false)
41
     */
42
    protected $name;
43
44
    /**
45
     * @var string
46
     *
47
     * @ORM\Column(name="description", type="text", nullable=true)
48
     */
49
    protected $description;
50
51
    /**
52
     * @Gedmo\SortablePosition
53
     * @ORM\Column(name="position", type="integer")
54
     */
55
    protected $position;
56
57
    /**
58
     * @var \DateTime
59
     *
60
     * @ORM\Column(name="created_at", type="datetime", nullable=false)
61
     */
62
    protected $createdAt;
63
64
    /**
65
     * @var \DateTime
66
     *
67
     * @ORM\Column(name="updated_at", type="datetime", nullable=false)
68
     */
69
    protected $updatedAt;
70
71
    /**
72
     * Project constructor.
73
     */
74
    public function __construct()
75
    {
76
        $this->createdAt = new \DateTime();
77
        $this->updatedAt = new \DateTime();
78
    }
79
80
    /**
81
     * @return int
82
     */
83
    public function getId()
84
    {
85
        return $this->id;
86
    }
87
88
    /**
89
     * @param int $id
90
     *
91
     * @return CExerciseCategory
92
     */
93
    public function setId($id)
94
    {
95
        $this->id = $id;
96
97
        return $this;
98
    }
99
100
    /**
101
     * @return int
102
     */
103
    public function getCId()
104
    {
105
        return $this->cId;
106
    }
107
108
    /**
109
     * @param int $cId
110
     *
111
     * @return CExerciseCategory
112
     */
113
    public function setCId($cId)
114
    {
115
        $this->cId = $cId;
116
117
        return $this;
118
    }
119
120
    /**
121
     * @return string
122
     */
123
    public function getName()
124
    {
125
        return $this->name;
126
    }
127
128
    /**
129
     * @param string $name
130
     *
131
     * @return CExerciseCategory
132
     */
133
    public function setName($name)
134
    {
135
        $this->name = $name;
136
137
        return $this;
138
    }
139
140
    /**
141
     * @return string
142
     */
143
    public function getDescription()
144
    {
145
        return $this->description;
146
    }
147
148
    /**
149
     * @param string $description
150
     *
151
     * @return CExerciseCategory
152
     */
153
    public function setDescription($description)
154
    {
155
        $this->description = $description;
156
157
        return $this;
158
    }
159
160
    /**
161
     * @return \DateTime
162
     */
163
    public function getCreatedAt()
164
    {
165
        return $this->createdAt;
166
    }
167
168
    /**
169
     * @param \DateTime $createdAt
170
     *
171
     * @return CExerciseCategory
172
     */
173
    public function setCreatedAt($createdAt)
174
    {
175
        $this->createdAt = $createdAt;
176
177
        return $this;
178
    }
179
180
    /**
181
     * @return \DateTime
182
     */
183
    public function getUpdatedAt()
184
    {
185
        return $this->updatedAt;
186
    }
187
188
    /**
189
     * @param \DateTime $updatedAt
190
     *
191
     * @return CExerciseCategory
192
     */
193
    public function setUpdatedAt($updatedAt)
194
    {
195
        $this->updatedAt = $updatedAt;
196
197
        return $this;
198
    }
199
200
    /**
201
     * @return mixed
202
     */
203
    public function getPosition()
204
    {
205
        return $this->position;
206
    }
207
208
    /**
209
     * @param mixed $position
210
     *
211
     * @return CExerciseCategory
212
     */
213
    public function setPosition($position)
214
    {
215
        $this->position = $position;
216
217
        return $this;
218
    }
219
}
220