1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
/* For licensing terms, see /license.txt */ |
6
|
|
|
|
7
|
|
|
namespace Chamilo\CoreBundle\Entity; |
8
|
|
|
|
9
|
|
|
use Chamilo\CoreBundle\Traits\UserTrait; |
10
|
|
|
use DateTime; |
11
|
|
|
use Doctrine\ORM\Mapping as ORM; |
12
|
|
|
use Gedmo\Mapping\Annotation as Gedmo; |
13
|
|
|
|
14
|
|
|
#[ORM\Table(name: 'gradebook_linkeval_log')] |
15
|
|
|
#[ORM\Entity] |
16
|
|
|
class GradebookLinkevalLog |
17
|
|
|
{ |
18
|
|
|
use UserTrait; |
19
|
|
|
|
20
|
|
|
#[ORM\Column(name: 'id', type: 'integer')] |
21
|
|
|
#[ORM\Id] |
22
|
|
|
#[ORM\GeneratedValue(strategy: 'IDENTITY')] |
23
|
|
|
protected ?int $id = null; |
24
|
|
|
|
25
|
|
|
#[ORM\Column(name: 'id_linkeval_log', type: 'integer', nullable: false)] |
26
|
|
|
protected int $idLinkevalLog; |
27
|
|
|
|
28
|
|
|
#[ORM\Column(name: 'title', type: 'text')] |
29
|
|
|
protected string $title; |
30
|
|
|
|
31
|
|
|
#[ORM\Column(name: 'description', type: 'text', nullable: true)] |
32
|
|
|
protected ?string $description = null; |
33
|
|
|
|
34
|
|
|
#[ORM\Column(name: 'weight', type: 'smallint', nullable: true)] |
35
|
|
|
protected ?int $weight = null; |
36
|
|
|
|
37
|
|
|
#[ORM\Column(name: 'visible', type: 'boolean', nullable: true)] |
38
|
|
|
protected ?bool $visible = null; |
39
|
|
|
|
40
|
|
|
#[ORM\Column(name: 'type', type: 'string', length: 20, nullable: false)] |
41
|
|
|
protected string $type; |
42
|
|
|
|
43
|
|
|
#[ORM\ManyToOne(targetEntity: User::class, inversedBy: 'gradeBookLinkEvalLogs')] |
44
|
|
|
#[ORM\JoinColumn(name: 'user_id_log', referencedColumnName: 'id', onDelete: 'CASCADE')] |
45
|
|
|
protected User $user; |
46
|
|
|
|
47
|
|
|
#[Gedmo\Timestampable(on: 'create')] |
48
|
|
|
#[ORM\Column(name: 'created_at', type: 'datetime', nullable: false)] |
49
|
|
|
protected DateTime $createdAt; |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* Set idLinkevalLog. |
53
|
|
|
* |
54
|
|
|
* @return GradebookLinkevalLog |
55
|
|
|
*/ |
56
|
|
|
public function setIdLinkevalLog(int $idLinkevalLog) |
57
|
|
|
{ |
58
|
|
|
$this->idLinkevalLog = $idLinkevalLog; |
59
|
|
|
|
60
|
|
|
return $this; |
61
|
|
|
} |
62
|
|
|
|
63
|
|
|
/** |
64
|
|
|
* Get idLinkevalLog. |
65
|
|
|
* |
66
|
|
|
* @return int |
67
|
|
|
*/ |
68
|
|
|
public function getIdLinkevalLog() |
69
|
|
|
{ |
70
|
|
|
return $this->idLinkevalLog; |
71
|
|
|
} |
72
|
|
|
|
73
|
|
|
public function setTitle(string $title): self |
74
|
|
|
{ |
75
|
|
|
$this->title = $title; |
76
|
|
|
|
77
|
|
|
return $this; |
78
|
|
|
} |
79
|
|
|
|
80
|
|
|
/** |
81
|
|
|
* Get title. |
82
|
|
|
* |
83
|
|
|
* @return string |
84
|
|
|
*/ |
85
|
|
|
public function getTitle() |
86
|
|
|
{ |
87
|
|
|
return $this->title; |
88
|
|
|
} |
89
|
|
|
|
90
|
|
|
public function setDescription(string $description): self |
91
|
|
|
{ |
92
|
|
|
$this->description = $description; |
93
|
|
|
|
94
|
|
|
return $this; |
95
|
|
|
} |
96
|
|
|
|
97
|
|
|
/** |
98
|
|
|
* Get description. |
99
|
|
|
* |
100
|
|
|
* @return string |
101
|
|
|
*/ |
102
|
|
|
public function getDescription() |
103
|
|
|
{ |
104
|
|
|
return $this->description; |
105
|
|
|
} |
106
|
|
|
|
107
|
|
|
/** |
108
|
|
|
* Set createdAt. |
109
|
|
|
* |
110
|
|
|
* @return GradebookLinkevalLog |
111
|
|
|
*/ |
112
|
|
|
public function setCreatedAt(DateTime $createdAt) |
113
|
|
|
{ |
114
|
|
|
$this->createdAt = $createdAt; |
115
|
|
|
|
116
|
|
|
return $this; |
117
|
|
|
} |
118
|
|
|
|
119
|
|
|
/** |
120
|
|
|
* Get createdAt. |
121
|
|
|
* |
122
|
|
|
* @return DateTime |
123
|
|
|
*/ |
124
|
|
|
public function getCreatedAt() |
125
|
|
|
{ |
126
|
|
|
return $this->createdAt; |
127
|
|
|
} |
128
|
|
|
|
129
|
|
|
/** |
130
|
|
|
* Set weight. |
131
|
|
|
* |
132
|
|
|
* @return GradebookLinkevalLog |
133
|
|
|
*/ |
134
|
|
|
public function setWeight(int $weight) |
135
|
|
|
{ |
136
|
|
|
$this->weight = $weight; |
137
|
|
|
|
138
|
|
|
return $this; |
139
|
|
|
} |
140
|
|
|
|
141
|
|
|
/** |
142
|
|
|
* Get weight. |
143
|
|
|
* |
144
|
|
|
* @return int |
145
|
|
|
*/ |
146
|
|
|
public function getWeight() |
147
|
|
|
{ |
148
|
|
|
return $this->weight; |
149
|
|
|
} |
150
|
|
|
|
151
|
|
|
/** |
152
|
|
|
* Set visible. |
153
|
|
|
* |
154
|
|
|
* @return GradebookLinkevalLog |
155
|
|
|
*/ |
156
|
|
|
public function setVisible(bool $visible) |
157
|
|
|
{ |
158
|
|
|
$this->visible = $visible; |
159
|
|
|
|
160
|
|
|
return $this; |
161
|
|
|
} |
162
|
|
|
|
163
|
|
|
/** |
164
|
|
|
* Get visible. |
165
|
|
|
* |
166
|
|
|
* @return bool |
167
|
|
|
*/ |
168
|
|
|
public function getVisible() |
169
|
|
|
{ |
170
|
|
|
return $this->visible; |
171
|
|
|
} |
172
|
|
|
|
173
|
|
|
/** |
174
|
|
|
* Set type. |
175
|
|
|
* |
176
|
|
|
* @return GradebookLinkevalLog |
177
|
|
|
*/ |
178
|
|
|
public function setType(string $type) |
179
|
|
|
{ |
180
|
|
|
$this->type = $type; |
181
|
|
|
|
182
|
|
|
return $this; |
183
|
|
|
} |
184
|
|
|
|
185
|
|
|
/** |
186
|
|
|
* Get type. |
187
|
|
|
* |
188
|
|
|
* @return string |
189
|
|
|
*/ |
190
|
|
|
public function getType() |
191
|
|
|
{ |
192
|
|
|
return $this->type; |
193
|
|
|
} |
194
|
|
|
|
195
|
|
|
/** |
196
|
|
|
* Get id. |
197
|
|
|
* |
198
|
|
|
* @return int |
199
|
|
|
*/ |
200
|
|
|
public function getId() |
201
|
|
|
{ |
202
|
|
|
return $this->id; |
203
|
|
|
} |
204
|
|
|
} |
205
|
|
|
|