Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 10 |
|
0.00% |
0 / 10 |
CRAP | |
0.00% |
0 / 1 |
SkillLevel | |
0.00% |
0 / 10 |
|
0.00% |
0 / 10 |
132 | |
0.00% |
0 / 1 |
getId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
6 | |||
setId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getUser | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setUser | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getSkill | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setSkill | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getValue | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setValue | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getRecordedAt | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setRecordedAt | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace Olz\Entity\Quiz; |
4 | |
5 | use Doctrine\ORM\Mapping as ORM; |
6 | use Olz\Entity\Common\OlzEntity; |
7 | use Olz\Entity\Users\User; |
8 | use Olz\Repository\Quiz\SkillLevelRepository; |
9 | |
10 | #[ORM\Table(name: 'quiz_skill_levels')] |
11 | #[ORM\Index(name: 'user_skill_index', columns: ['user_id', 'skill_id'])] |
12 | #[ORM\Entity(repositoryClass: SkillLevelRepository::class)] |
13 | class SkillLevel extends OlzEntity { |
14 | #[ORM\Id] |
15 | #[ORM\Column(type: 'bigint', nullable: false)] |
16 | #[ORM\GeneratedValue] |
17 | private int|string $id; |
18 | |
19 | #[ORM\ManyToOne(targetEntity: User::class)] |
20 | #[ORM\JoinColumn(name: 'user_id', referencedColumnName: 'id', nullable: true)] |
21 | private ?User $user; |
22 | |
23 | #[ORM\ManyToOne(targetEntity: Skill::class)] |
24 | #[ORM\JoinColumn(name: 'skill_id', referencedColumnName: 'id', nullable: true)] |
25 | private ?Skill $skill; |
26 | |
27 | #[ORM\Column(type: 'float', nullable: false)] |
28 | private float $value; |
29 | |
30 | #[ORM\Column(type: 'datetime', nullable: false)] |
31 | private \DateTime $recorded_at; |
32 | |
33 | public function getId(): ?int { |
34 | return isset($this->id) ? intval($this->id) : null; |
35 | } |
36 | |
37 | public function setId(int $new_id): void { |
38 | $this->id = $new_id; |
39 | } |
40 | |
41 | public function getUser(): ?User { |
42 | return $this->user; |
43 | } |
44 | |
45 | public function setUser(?User $new_user): void { |
46 | $this->user = $new_user; |
47 | } |
48 | |
49 | public function getSkill(): ?Skill { |
50 | return $this->skill; |
51 | } |
52 | |
53 | public function setSkill(?Skill $new_skill): void { |
54 | $this->skill = $new_skill; |
55 | } |
56 | |
57 | public function getValue(): float { |
58 | return $this->value; |
59 | } |
60 | |
61 | public function setValue(float $new_value): void { |
62 | $this->value = $new_value; |
63 | } |
64 | |
65 | public function getRecordedAt(): \DateTime { |
66 | return $this->recorded_at; |
67 | } |
68 | |
69 | public function setRecordedAt(\DateTime $new_recorded_at): void { |
70 | $this->recorded_at = $new_recorded_at; |
71 | } |
72 | } |