|
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
|
|
|
* CPeerAssessmentLog. |
|
15
|
|
|
*/ |
|
16
|
|
|
#[ORM\Table(name: 'c_peer_assessment_log')] |
|
17
|
|
|
#[ORM\Entity] |
|
18
|
|
|
class CPeerAssessmentLog |
|
19
|
|
|
{ |
|
20
|
|
|
use UserTrait; |
|
21
|
|
|
|
|
22
|
|
|
#[ORM\Id] |
|
23
|
|
|
#[ORM\GeneratedValue] |
|
24
|
|
|
#[ORM\Column(type: 'integer')] |
|
25
|
|
|
protected ?int $id = null; |
|
26
|
|
|
|
|
27
|
|
|
#[ORM\ManyToOne(targetEntity: CPeerAssessment::class)] |
|
28
|
|
|
#[ORM\JoinColumn(name: 'peer_assessment_id', referencedColumnName: 'id', nullable: true, onDelete: 'CASCADE')] |
|
29
|
|
|
protected ?CPeerAssessment $peerAssessment = null; |
|
30
|
|
|
|
|
31
|
|
|
#[ORM\ManyToOne(targetEntity: User::class)] |
|
32
|
|
|
#[ORM\JoinColumn(name: 'user_id', referencedColumnName: 'id', nullable: true, onDelete: 'SET NULL')] |
|
33
|
|
|
protected ?User $user = null; |
|
34
|
|
|
|
|
35
|
|
|
#[ORM\Column(type: 'datetime', nullable: true)] |
|
36
|
|
|
protected ?\DateTime $date = null; |
|
37
|
|
|
|
|
38
|
|
|
#[ORM\Column(type: 'string', length: 255, nullable: true)] |
|
39
|
|
|
protected ?string $description = null; |
|
40
|
|
|
|
|
41
|
|
|
public function __construct() {} |
|
42
|
|
|
|
|
43
|
|
|
public function getId(): ?int |
|
44
|
|
|
{ |
|
45
|
|
|
return $this->id; |
|
46
|
|
|
} |
|
47
|
|
|
|
|
48
|
|
|
public function getPeerAssessment(): ?CPeerAssessment |
|
49
|
|
|
{ |
|
50
|
|
|
return $this->peerAssessment; |
|
51
|
|
|
} |
|
52
|
|
|
|
|
53
|
|
|
public function setPeerAssessment(?CPeerAssessment $peerAssessment): self |
|
54
|
|
|
{ |
|
55
|
|
|
$this->peerAssessment = $peerAssessment; |
|
56
|
|
|
|
|
57
|
|
|
return $this; |
|
58
|
|
|
} |
|
59
|
|
|
|
|
60
|
|
|
public function getDate(): ?\DateTime |
|
61
|
|
|
{ |
|
62
|
|
|
return $this->date; |
|
63
|
|
|
} |
|
64
|
|
|
|
|
65
|
|
|
public function setDate(?\DateTime $date): self |
|
66
|
|
|
{ |
|
67
|
|
|
$this->date = $date; |
|
68
|
|
|
|
|
69
|
|
|
return $this; |
|
70
|
|
|
} |
|
71
|
|
|
|
|
72
|
|
|
public function getDescription(): ?string |
|
73
|
|
|
{ |
|
74
|
|
|
return $this->description; |
|
75
|
|
|
} |
|
76
|
|
|
|
|
77
|
|
|
public function setDescription(?string $description): self |
|
78
|
|
|
{ |
|
79
|
|
|
$this->description = $description; |
|
80
|
|
|
|
|
81
|
|
|
return $this; |
|
82
|
|
|
} |
|
83
|
|
|
} |
|
84
|
|
|
|