|
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
|
|
|
/** |
|
12
|
|
|
* @ORM\Table(name="skill_rel_skill") |
|
13
|
|
|
* @ORM\Entity |
|
14
|
|
|
*/ |
|
15
|
|
|
class SkillRelSkill |
|
16
|
|
|
{ |
|
17
|
|
|
/** |
|
18
|
|
|
* @ORM\Column(name="id", type="integer") |
|
19
|
|
|
* @ORM\Id |
|
20
|
|
|
* @ORM\GeneratedValue |
|
21
|
|
|
*/ |
|
22
|
|
|
protected int $id; |
|
23
|
|
|
|
|
24
|
|
|
/** |
|
25
|
|
|
* @ORM\ManyToOne(targetEntity="Chamilo\CoreBundle\Entity\Skill", inversedBy="skills") |
|
26
|
|
|
* @ORM\JoinColumn(name="skill_id", referencedColumnName="id") |
|
27
|
|
|
*/ |
|
28
|
|
|
protected Skill $skill; |
|
29
|
|
|
|
|
30
|
|
|
/** |
|
31
|
|
|
* @ORM\ManyToOne(targetEntity="Skill") |
|
32
|
|
|
* @ORM\JoinColumn(name="parent_id", referencedColumnName="id", onDelete="SET NULL") |
|
33
|
|
|
*/ |
|
34
|
|
|
protected ?Skill $parent = null; |
|
35
|
|
|
|
|
36
|
|
|
/** |
|
37
|
|
|
* @ORM\Column(name="relation_type", type="integer", nullable=false) |
|
38
|
|
|
*/ |
|
39
|
|
|
protected int $relationType; |
|
40
|
|
|
|
|
41
|
|
|
/** |
|
42
|
|
|
* @ORM\Column(name="level", type="integer", nullable=false) |
|
43
|
|
|
*/ |
|
44
|
|
|
protected int $level; |
|
45
|
|
|
|
|
46
|
|
|
public function getParent(): ?Skill |
|
47
|
|
|
{ |
|
48
|
|
|
return $this->parent; |
|
49
|
|
|
} |
|
50
|
|
|
|
|
51
|
|
|
public function setParent(?Skill $parent): self |
|
52
|
|
|
{ |
|
53
|
|
|
$this->parent = $parent; |
|
54
|
|
|
|
|
55
|
|
|
return $this; |
|
56
|
|
|
} |
|
57
|
|
|
|
|
58
|
|
|
public function setRelationType(int $relationType): self |
|
59
|
|
|
{ |
|
60
|
|
|
$this->relationType = $relationType; |
|
61
|
|
|
|
|
62
|
|
|
return $this; |
|
63
|
|
|
} |
|
64
|
|
|
|
|
65
|
|
|
/** |
|
66
|
|
|
* Get relationType. |
|
67
|
|
|
* |
|
68
|
|
|
* @return int |
|
69
|
|
|
*/ |
|
70
|
|
|
public function getRelationType() |
|
71
|
|
|
{ |
|
72
|
|
|
return $this->relationType; |
|
73
|
|
|
} |
|
74
|
|
|
|
|
75
|
|
|
public function setLevel(int $level): self |
|
76
|
|
|
{ |
|
77
|
|
|
$this->level = $level; |
|
78
|
|
|
|
|
79
|
|
|
return $this; |
|
80
|
|
|
} |
|
81
|
|
|
|
|
82
|
|
|
public function getLevel() |
|
83
|
|
|
{ |
|
84
|
|
|
return $this->level; |
|
85
|
|
|
} |
|
86
|
|
|
|
|
87
|
|
|
public function getId() |
|
88
|
|
|
{ |
|
89
|
|
|
return $this->id; |
|
90
|
|
|
} |
|
91
|
|
|
|
|
92
|
|
|
public function getSkill(): Skill |
|
93
|
|
|
{ |
|
94
|
|
|
return $this->skill; |
|
95
|
|
|
} |
|
96
|
|
|
|
|
97
|
|
|
public function setSkill(Skill $skill): self |
|
98
|
|
|
{ |
|
99
|
|
|
$this->skill = $skill; |
|
100
|
|
|
|
|
101
|
|
|
return $this; |
|
102
|
|
|
} |
|
103
|
|
|
} |
|
104
|
|
|
|