|
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 Doctrine\ORM\Mapping as ORM; |
|
10
|
|
|
|
|
11
|
|
|
#[ORM\Entity] |
|
12
|
|
|
#[ORM\Table(name: 'justification_document_rel_users')] |
|
13
|
|
|
class JustificationDocumentRelUsers |
|
14
|
|
|
{ |
|
15
|
|
|
#[ORM\Id] |
|
16
|
|
|
#[ORM\GeneratedValue(strategy: 'AUTO')] |
|
17
|
|
|
#[ORM\Column(type: 'integer')] |
|
18
|
|
|
private ?int $id = null; |
|
19
|
|
|
|
|
20
|
|
|
#[ORM\ManyToOne(targetEntity: JustificationDocument::class)] |
|
21
|
|
|
#[ORM\JoinColumn(name: 'justification_document_id', referencedColumnName: 'id', onDelete: 'CASCADE')] |
|
22
|
|
|
private JustificationDocument $justificationDocument; |
|
23
|
|
|
|
|
24
|
|
|
#[ORM\Column(type: 'string', length: 255, nullable: true)] |
|
25
|
|
|
private ?string $filePath = null; |
|
26
|
|
|
|
|
27
|
|
|
#[ORM\ManyToOne(targetEntity: User::class)] |
|
28
|
|
|
#[ORM\JoinColumn(name: 'user_id', referencedColumnName: 'id', onDelete: 'CASCADE')] |
|
29
|
|
|
private ?User $user = null; |
|
30
|
|
|
|
|
31
|
|
|
#[ORM\Column(type: 'date', nullable: true)] |
|
32
|
|
|
private ?\DateTime $dateValidity = null; |
|
33
|
|
|
|
|
34
|
|
|
public function getId(): ?int |
|
35
|
|
|
{ |
|
36
|
|
|
return $this->id; |
|
37
|
|
|
} |
|
38
|
|
|
|
|
39
|
|
|
public function getJustificationDocument(): JustificationDocument |
|
40
|
|
|
{ |
|
41
|
|
|
return $this->justificationDocument; |
|
42
|
|
|
} |
|
43
|
|
|
|
|
44
|
|
|
public function setJustificationDocument(JustificationDocument $justificationDocument): self |
|
45
|
|
|
{ |
|
46
|
|
|
$this->justificationDocument = $justificationDocument; |
|
47
|
|
|
|
|
48
|
|
|
return $this; |
|
49
|
|
|
} |
|
50
|
|
|
|
|
51
|
|
|
public function getFilePath(): ?string |
|
52
|
|
|
{ |
|
53
|
|
|
return $this->filePath; |
|
54
|
|
|
} |
|
55
|
|
|
|
|
56
|
|
|
public function setFilePath(?string $filePath): self |
|
57
|
|
|
{ |
|
58
|
|
|
$this->filePath = $filePath; |
|
59
|
|
|
|
|
60
|
|
|
return $this; |
|
61
|
|
|
} |
|
62
|
|
|
|
|
63
|
|
|
public function getUser(): ?User |
|
64
|
|
|
{ |
|
65
|
|
|
return $this->user; |
|
66
|
|
|
} |
|
67
|
|
|
|
|
68
|
|
|
public function setUser(?User $user): self |
|
69
|
|
|
{ |
|
70
|
|
|
$this->user = $user; |
|
71
|
|
|
|
|
72
|
|
|
return $this; |
|
73
|
|
|
} |
|
74
|
|
|
|
|
75
|
|
|
public function getDateValidity(): ?\DateTime |
|
76
|
|
|
{ |
|
77
|
|
|
return $this->dateValidity; |
|
78
|
|
|
} |
|
79
|
|
|
|
|
80
|
|
|
public function setDateValidity(?\DateTime $dateValidity): self |
|
81
|
|
|
{ |
|
82
|
|
|
$this->dateValidity = $dateValidity; |
|
83
|
|
|
|
|
84
|
|
|
return $this; |
|
85
|
|
|
} |
|
86
|
|
|
} |
|
87
|
|
|
|