Passed
Push — master ( 445983...d786ab )
by Yannick
39:28
created

getStudentPublicationParentId()   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
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
/* For licensing terms, see /license.txt */
6
7
namespace Chamilo\CourseBundle\Entity;
8
9
use Chamilo\CoreBundle\Entity\User;
10
use Chamilo\CoreBundle\Traits\UserTrait;
11
use Doctrine\ORM\Mapping as ORM;
12
13
/**
14
 * CPeerAutogroupRelStudentPublication
15
 * Represents the link between autogroups and peer assessment related to student publications.
16
 */
17
#[ORM\Table(name: 'c_peer_autogroup_rel_student_publication')]
18
#[ORM\Entity]
19
class CPeerAutogroupRelStudentPublication
20
{
21
    use UserTrait;
22
23
    #[ORM\Id]
24
    #[ORM\GeneratedValue]
25
    #[ORM\Column(type: 'integer')]
26
    protected ?int $id = null;
27
28
    #[ORM\ManyToOne(targetEntity: User::class)]
29
    #[ORM\JoinColumn(name: 'user_id', referencedColumnName: 'id', nullable: false, onDelete: 'CASCADE')]
30
    protected ?User $user = null;
31
32
    #[ORM\Column(name: 'peer_autogroup_id', type: 'integer', nullable: true)]
33
    protected ?int $peerAutogroupId = null;
34
35
    #[ORM\Column(type: 'boolean', nullable: true, options: ['default' => 0])]
36
    protected ?bool $vote = null;
37
38
    #[ORM\Column(name: 'date_vote', type: 'datetime', nullable: true)]
39
    protected ?\DateTimeInterface $dateVote = null;
40
41
    #[ORM\ManyToOne(targetEntity: CStudentPublication::class)]
42
    #[ORM\JoinColumn(name: 'student_publication_id', referencedColumnName: 'iid', nullable: true, onDelete: 'SET NULL')]
43
    protected ?CStudentPublication $studentPublication = null;
44
45
    #[ORM\ManyToOne(targetEntity: CGroup::class)]
46
    #[ORM\JoinColumn(name: 'group_id', referencedColumnName: 'iid', nullable: true, onDelete: 'SET NULL')]
47
    protected ?CGroup $group = null;
48
49
    #[ORM\Column(name: 'student_publication_parent_id', type: 'integer', nullable: true)]
50
    protected ?int $studentPublicationParentId = null;
51
52
    #[ORM\Column(name: 'student_publication_folder_id', type: 'integer', nullable: true)]
53
    protected ?int $studentPublicationFolderId = null;
54
55
    public function __construct() {}
56
57
    public function getId(): ?int
58
    {
59
        return $this->id;
60
    }
61
62
    public function getPeerAutogroupId(): ?int
63
    {
64
        return $this->peerAutogroupId;
65
    }
66
67
    public function setPeerAutogroupId(?int $peerAutogroupId): self
68
    {
69
        $this->peerAutogroupId = $peerAutogroupId;
70
71
        return $this;
72
    }
73
74
    public function getVote(): ?bool
75
    {
76
        return $this->vote;
77
    }
78
79
    public function setVote(?bool $vote): self
80
    {
81
        $this->vote = $vote;
82
83
        return $this;
84
    }
85
86
    public function getDateVote(): ?\DateTimeInterface
87
    {
88
        return $this->dateVote;
89
    }
90
91
    public function setDateVote(?\DateTimeInterface $dateVote): self
92
    {
93
        $this->dateVote = $dateVote;
94
95
        return $this;
96
    }
97
98
    public function getStudentPublication(): ?CStudentPublication
99
    {
100
        return $this->studentPublication;
101
    }
102
103
    public function setStudentPublication(?CStudentPublication $studentPublication): self
104
    {
105
        $this->studentPublication = $studentPublication;
106
107
        return $this;
108
    }
109
110
    public function getGroup(): ?CGroup
111
    {
112
        return $this->group;
113
    }
114
115
    public function setGroup(?CGroup $group): self
116
    {
117
        $this->group = $group;
118
119
        return $this;
120
    }
121
122
    public function getStudentPublicationParentId(): ?int
123
    {
124
        return $this->studentPublicationParentId;
125
    }
126
127
    public function setStudentPublicationParentId(?int $studentPublicationParentId): self
128
    {
129
        $this->studentPublicationParentId = $studentPublicationParentId;
130
131
        return $this;
132
    }
133
134
    public function getStudentPublicationFolderId(): ?int
135
    {
136
        return $this->studentPublicationFolderId;
137
    }
138
139
    public function setStudentPublicationFolderId(?int $studentPublicationFolderId): self
140
    {
141
        $this->studentPublicationFolderId = $studentPublicationFolderId;
142
143
        return $this;
144
    }
145
}
146