Passed
Push — master ( 0b0f56...afb2ec )
by Julito
16:30 queued 04:59
created

GradebookComment::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 1
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
use Gedmo\Timestampable\Traits\TimestampableEntity;
11
12
/**
13
 * @ORM\Table(
14
 *     name="gradebook_comment",
15
 *     indexes={}
16
 * )
17
 * @ORM\Entity
18
 */
19
class GradebookComment
20
{
21
    use UserTrait;
22
    use TimestampableEntity;
23
24
    /**
25
     * @var int
26
     *
27
     * @ORM\Column(name="id", type="bigint")
28
     * @ORM\Id
29
     * @ORM\GeneratedValue
30
     */
31
    protected $id;
32
33
    /**
34
     * @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\User", inversedBy="gradeBookComments")
35
     * @ORM\JoinColumn(name="user_id",referencedColumnName="id",onDelete="CASCADE")
36
     */
37
    protected User $user;
38
39
    /**
40
     *
41
     * @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\GradebookCategory", inversedBy="comments")
42
     * @ORM\JoinColumn(name="gradebook_id",referencedColumnName="id",onDelete="CASCADE")
43
     */
44
    protected GradebookCategory $gradeBook;
45
46
    /**
47
     * @var string
48
     *
49
     * @ORM\Column(name="comment", type="text")
50
     */
51
    protected string $comment;
52
53
    public function __construct()
54
    {
55
        $this->comment = '';
56
    }
57
}
58