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

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