Completed
Push — master ( c9546d...95f607 )
by Julito
09:41
created

GradebookResultLog::getCreatedAt()   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 Chamilo\CoreBundle\Traits\UserTrait;
8
use Doctrine\ORM\Mapping as ORM;
9
use Gedmo\Mapping\Annotation as Gedmo;
10
11
/**
12
 * GradebookResultLog.
13
 *
14
 * @ORM\Table(name="gradebook_result_log")
15
 * @ORM\Entity
16
 */
17
class GradebookResultLog
18
{
19
    use UserTrait;
20
21
    /**
22
     * @var int
23
     *
24
     * @ORM\Column(name="id", type="integer")
25
     * @ORM\Id
26
     * @ORM\GeneratedValue(strategy="IDENTITY")
27
     */
28
    protected $id;
29
30
    /**
31
     * @var int
32
     *
33
     * @ORM\Column(name="result_id", type="integer", nullable=false)
34
     */
35
    protected $resultId;
36
37
    /**
38
     * @var int
39
     *
40
     * @ORM\Column(name="evaluation_id", type="integer", nullable=false)
41
     */
42
    protected $evaluationId;
43
44
    /**
45
     * @var \DateTime
46
     *
47
     * @Gedmo\Timestampable(on="create")
48
     * @ORM\Column(name="created_at", type="datetime", nullable=false)
49
     */
50
    protected $createdAt;
51
52
    /**
53
     * @var float
54
     *
55
     * @ORM\Column(name="score", type="float", precision=10, scale=0, nullable=true)
56
     */
57
    protected $score;
58
59
    /**
60
     * @var User
61
     *
62
     * @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\User", inversedBy="gradeBookResultLogs")
63
     * @ORM\JoinColumn(name="user_id", referencedColumnName="id", onDelete="CASCADE")
64
     */
65
    protected $user;
66
67
    /**
68
     * Set evaluationId.
69
     *
70
     * @param int $evaluationId
71
     *
72
     * @return GradebookResultLog
73
     */
74
    public function setEvaluationId($evaluationId)
75
    {
76
        $this->evaluationId = $evaluationId;
77
78
        return $this;
79
    }
80
81
    /**
82
     * Get evaluationId.
83
     *
84
     * @return int
85
     */
86
    public function getEvaluationId()
87
    {
88
        return $this->evaluationId;
89
    }
90
91
    /**
92
     * Set createdAt.
93
     *
94
     * @param \DateTime $createdAt
95
     *
96
     * @return GradebookResultLog
97
     */
98
    public function setCreatedAt($createdAt)
99
    {
100
        $this->createdAt = $createdAt;
101
102
        return $this;
103
    }
104
105
    /**
106
     * Get createdAt.
107
     *
108
     * @return \DateTime
109
     */
110
    public function getCreatedAt()
111
    {
112
        return $this->createdAt;
113
    }
114
115
    /**
116
     * Set score.
117
     *
118
     * @param float $score
119
     *
120
     * @return GradebookResultLog
121
     */
122
    public function setScore($score)
123
    {
124
        $this->score = $score;
125
126
        return $this;
127
    }
128
129
    /**
130
     * Get score.
131
     *
132
     * @return float
133
     */
134
    public function getScore()
135
    {
136
        return $this->score;
137
    }
138
139
    /**
140
     * Get id.
141
     *
142
     * @return int
143
     */
144
    public function getId()
145
    {
146
        return $this->id;
147
    }
148
149
    public function getResultId(): int
150
    {
151
        return $this->resultId;
152
    }
153
154
    public function setResultId(int $resultId): self
155
    {
156
        $this->resultId = $resultId;
157
158
        return $this;
159
    }
160
}
161