Passed
Push — master ( 624452...6304f4 )
by Julito
08:28
created

GradebookCertificate::getScoreCertificate()   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
10
/**
11
 * @ORM\Table(
12
 *     name="gradebook_certificate",
13
 *     indexes={
14
 *      @ORM\Index(name="idx_gradebook_certificate_user_id", columns={"user_id"}),
15
 *     }
16
 * )
17
 * @ORM\Entity
18
 */
19
class GradebookCertificate
20
{
21
    use UserTrait;
22
23
    /**
24
     * @var int
25
     *
26
     * @ORM\Column(name="id", type="bigint")
27
     * @ORM\Id
28
     * @ORM\GeneratedValue
29
     */
30
    protected $id;
31
32
    /**
33
     * @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\GradebookCategory")
34
     * @ORM\JoinColumn(name="cat_id", referencedColumnName="id")
35
     */
36
    protected GradebookCategory $category;
37
38
    /**
39
     * @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\User", inversedBy="gradeBookCertificates")
40
     * @ORM\JoinColumn(name="user_id",referencedColumnName="id", onDelete="CASCADE")
41
     */
42
    protected User $user;
43
44
    /**
45
     * @var float
46
     *
47
     * @ORM\Column(name="score_certificate", type="float", precision=10, scale=0, nullable=false)
48
     */
49
    protected $scoreCertificate;
50
51
    /**
52
     * @var \DateTime
53
     *
54
     * @ORM\Column(name="created_at", type="datetime", nullable=false)
55
     */
56
    protected $createdAt;
57
58
    /**
59
     * @var string
60
     *
61
     * @ORM\Column(name="path_certificate", type="text", nullable=true)
62
     */
63
    protected $pathCertificate;
64
65
    /**
66
     * @var \DateTime
67
     *
68
     * @ORM\Column(name="downloaded_at", type="datetime", nullable=true)
69
     */
70
    protected $downloadedAt;
71
72
    /**
73
     * Set scoreCertificate.
74
     *
75
     * @param float $scoreCertificate
76
     *
77
     * @return GradebookCertificate
78
     */
79
    public function setScoreCertificate($scoreCertificate)
80
    {
81
        $this->scoreCertificate = $scoreCertificate;
82
83
        return $this;
84
    }
85
86
    /**
87
     * Get scoreCertificate.
88
     *
89
     * @return float
90
     */
91
    public function getScoreCertificate()
92
    {
93
        return $this->scoreCertificate;
94
    }
95
96
    /**
97
     * Set createdAt.
98
     *
99
     * @param \DateTime $createdAt
100
     *
101
     * @return GradebookCertificate
102
     */
103
    public function setCreatedAt($createdAt)
104
    {
105
        $this->createdAt = $createdAt;
106
107
        return $this;
108
    }
109
110
    /**
111
     * Get createdAt.
112
     *
113
     * @return \DateTime
114
     */
115
    public function getCreatedAt()
116
    {
117
        return $this->createdAt;
118
    }
119
120
    /**
121
     * Set pathCertificate.
122
     *
123
     * @param string $pathCertificate
124
     *
125
     * @return GradebookCertificate
126
     */
127
    public function setPathCertificate($pathCertificate)
128
    {
129
        $this->pathCertificate = $pathCertificate;
130
131
        return $this;
132
    }
133
134
    /**
135
     * Get pathCertificate.
136
     *
137
     * @return string
138
     */
139
    public function getPathCertificate()
140
    {
141
        return $this->pathCertificate;
142
    }
143
144
    /**
145
     * Get id.
146
     *
147
     * @return int
148
     */
149
    public function getId()
150
    {
151
        return $this->id;
152
    }
153
154
    public function getDownloadedAt(): \DateTime
155
    {
156
        return $this->downloadedAt;
157
    }
158
159
    public function setDownloadedAt(\DateTime $downloadedAt): self
160
    {
161
        $this->downloadedAt = $downloadedAt;
162
163
        return $this;
164
    }
165
}
166