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

GradebookScoreLog::getUser()   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
3
/* For licensing terms, see /license.txt */
4
5
namespace Chamilo\CoreBundle\Entity;
6
7
use Doctrine\ORM\Mapping as ORM;
8
9
/**
10
 * GradebookScoreLog.
11
 *
12
 * @ORM\Table(
13
 *      name="gradebook_score_log", indexes={
14
 *          @ORM\Index(name="idx_gradebook_score_log_user", columns={"user_id"}),
15
 *          @ORM\Index(name="idx_gradebook_score_log_user_category", columns={"user_id", "category_id"})
16
 *      }
17
 * )
18
 * @ORM\Entity
19
 */
20
class GradebookScoreLog
21
{
22
    /**
23
     * @var int
24
     *
25
     * @ORM\Column(name="id", type="integer")
26
     * @ORM\Id
27
     * @ORM\GeneratedValue
28
     */
29
    protected $id;
30
31
    /**
32
     * @var int
33
     *
34
     * @ORM\Column(name="category_id", type="integer", nullable=false)
35
     */
36
    protected $categoryId;
37
38
    /**
39
     * @var User
40
     * @ORM\ManyToOne (
41
     *    targetEntity="Chamilo\CoreBundle\Entity\User",
42
     *    inversedBy="gradebookResultLogs"
43
     * )
44
     * @ORM\JoinColumn(
45
     *    name="user_id",
46
     *    referencedColumnName="id",
47
     *    onDelete="CASCADE"
48
     * )
49
     */
50
    protected $user;
51
52
    /**
53
     * Get user.
54
     *
55
     */
56
    public function getUser(): User
57
    {
58
        return $this->user;
59
    }
60
61
    /**
62
     * Set user.
63
     *
64
     */
65
    public function setUser($user)
66
    {
67
        $this->user = $user;
68
69
        return $this;
70
    }
71
72
    /**
73
     * @var float
74
     *
75
     * @ORM\Column(name="score", type="float", precision=10, scale=0, nullable=false)
76
     */
77
    protected $score;
78
79
    /**
80
     * @var \DateTime
81
     *
82
     * @ORM\Column(name="registered_at", type="datetime", nullable=false)
83
     */
84
    protected $registeredAt;
85
86
    /**
87
     * Get the category id.
88
     *
89
     * @return int
90
     */
91
    public function getCategoryId()
92
    {
93
        return $this->categoryId;
94
    }
95
96
    /**
97
     * Get the achieved score.
98
     *
99
     * @return float
100
     */
101
    public function getScore()
102
    {
103
        return $this->score;
104
    }
105
106
    /**
107
     * Get the datetime of register.
108
     *
109
     * @return \DateTime
110
     */
111
    public function getRegisteredAt()
112
    {
113
        return $this->registeredAt;
114
    }
115
116
    /**
117
     * Get the id.
118
     *
119
     * @return int
120
     */
121
    public function getId()
122
    {
123
        return $this->id;
124
    }
125
126
    /**
127
     * Set the category id.
128
     *
129
     * @param int $categoryId
130
     *
131
     * @return $this
132
     */
133
    public function setCategoryId($categoryId)
134
    {
135
        $this->categoryId = $categoryId;
136
137
        return $this;
138
    }
139
140
    /**
141
     * Set the achieved score.
142
     *
143
     * @param float $score
144
     *
145
     * @return $this
146
     */
147
    public function setScore($score)
148
    {
149
        $this->score = $score;
150
151
        return $this;
152
    }
153
154
    /**
155
     * Set the datetime of register.
156
     *
157
     * @return $this
158
     */
159
    public function setRegisteredAt(\DateTime $registeredAt)
160
    {
161
        $this->registeredAt = $registeredAt;
162
163
        return $this;
164
    }
165
166
    /**
167
     * Set the id.
168
     *
169
     * @param int $id
170
     *
171
     * @return $this
172
     */
173
    public function setId($id)
174
    {
175
        $this->id = $id;
176
177
        return $this;
178
    }
179
}
180