Passed
Push — master ( e0f7b0...a8affd )
by Julito
10:09
created

SkillRelCourse::setId()   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\CoreBundle\Entity;
6
7
use Doctrine\ORM\Mapping as ORM;
8
use Gedmo\Timestampable\Traits\TimestampableEntity;
9
10
/**
11
 * SkillRelCourse.
12
 *
13
 * @ORM\Table(name="skill_rel_course")
14
 * @ORM\Entity
15
 */
16
class SkillRelCourse
17
{
18
    use TimestampableEntity;
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 Skill
31
     *
32
     * @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\Skill", inversedBy="courses")
33
     * @ORM\JoinColumn(name="skill_id", referencedColumnName="id")
34
     */
35
    protected $skill;
36
37
    /**
38
     * @var Course
39
     *
40
     * @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\Course", inversedBy="skills", cascade={"persist"})
41
     * @ORM\JoinColumn(name="c_id", referencedColumnName="id", nullable=false)
42
     */
43
    protected $course;
44
45
    /**
46
     * @var Session
47
     *
48
     * @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\Session", inversedBy="skills", cascade={"persist"})
49
     * @ORM\JoinColumn(name="session_id", referencedColumnName="id", nullable=false)
50
     */
51
    protected $session;
52
53
    /**
54
     * SkillRelItem constructor.
55
     */
56
    public function __construct()
57
    {
58
        $this->createdAt = new \DateTime('now');
59
        $this->updatedAt = new \DateTime('now');
60
    }
61
62
    /**
63
     * @return int
64
     */
65
    public function getId()
66
    {
67
        return $this->id;
68
    }
69
70
    /**
71
     * @return Skill
72
     */
73
    public function getSkill()
74
    {
75
        return $this->skill;
76
    }
77
78
    /**
79
     * @param Skill $skill
80
     *
81
     * @return SkillRelCourse
82
     */
83
    public function setSkill($skill)
84
    {
85
        $this->skill = $skill;
86
87
        return $this;
88
    }
89
90
    /**
91
     * @return Course
92
     */
93
    public function getCourse()
94
    {
95
        return $this->course;
96
    }
97
98
    /**
99
     * @param Course $course
100
     *
101
     * @return SkillRelCourse
102
     */
103
    public function setCourse($course)
104
    {
105
        $this->course = $course;
106
107
        return $this;
108
    }
109
110
    /**
111
     * @return Session
112
     */
113
    public function getSession()
114
    {
115
        return $this->session;
116
    }
117
118
    /**
119
     * @param Session $session
120
     *
121
     * @return SkillRelCourse
122
     */
123
    public function setSession($session)
124
    {
125
        $this->session = $session;
126
127
        return $this;
128
    }
129
130
    /**
131
     * @return \DateTime
132
     */
133
    public function getCreatedAt()
134
    {
135
        return $this->createdAt;
136
    }
137
138
    /**
139
     * @param \DateTime $createdAt
140
     *
141
     * @return SkillRelCourse
142
     */
143
    public function setCreatedAt($createdAt)
144
    {
145
        $this->createdAt = $createdAt;
146
147
        return $this;
148
    }
149
150
    /**
151
     * @return \DateTime
152
     */
153
    public function getUpdatedAt()
154
    {
155
        return $this->updatedAt;
156
    }
157
158
    /**
159
     * @param \DateTime $updatedAt
160
     *
161
     * @return SkillRelCourse
162
     */
163
    public function setUpdatedAt($updatedAt)
164
    {
165
        $this->updatedAt = $updatedAt;
166
167
        return $this;
168
    }
169
}
170