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

GradebookCertificate   A

Complexity

Total Complexity 13

Size/Duplication

Total Lines 197
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 27
c 0
b 0
f 0
dl 0
loc 197
rs 10
wmc 13

13 Methods

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