Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 11 |
|
0.00% |
0 / 11 |
CRAP | |
0.00% |
0 / 1 |
WeeklyPicture | |
0.00% |
0 / 11 |
|
0.00% |
0 / 11 |
132 | |
0.00% |
0 / 1 |
getId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getPublishedDate | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setPublishedDate | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getText | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setText | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getImageId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setImageId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
__toString | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getEntityNameForStorage | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getEntityIdForStorage | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | |
3 | namespace Olz\Entity\Startseite; |
4 | |
5 | use Doctrine\ORM\Mapping as ORM; |
6 | use Olz\Entity\Common\DataStorageInterface; |
7 | use Olz\Entity\Common\DataStorageTrait; |
8 | use Olz\Entity\Common\OlzEntity; |
9 | use Olz\Repository\Startseite\WeeklyPictureRepository; |
10 | |
11 | #[ORM\Table(name: 'weekly_picture')] |
12 | #[ORM\Index(name: 'datum_index', columns: ['datum'])] |
13 | #[ORM\Entity(repositoryClass: WeeklyPictureRepository::class)] |
14 | class WeeklyPicture extends OlzEntity implements DataStorageInterface { |
15 | use DataStorageTrait; |
16 | |
17 | #[ORM\Column(type: 'date', nullable: true)] |
18 | private ?\DateTime $datum; |
19 | |
20 | #[ORM\Column(type: 'text', nullable: true)] |
21 | private ?string $image_id; |
22 | |
23 | #[ORM\Column(type: 'text', nullable: true)] |
24 | private ?string $text; |
25 | |
26 | #[ORM\Id] |
27 | #[ORM\Column(type: 'integer', nullable: false)] |
28 | #[ORM\GeneratedValue] |
29 | private int $id; |
30 | // PRIMARY KEY (`id`), |
31 | // KEY `datum` (`datum`) |
32 | |
33 | public function getId(): ?int { |
34 | return $this->id ?? null; |
35 | } |
36 | |
37 | public function setId(int $new_id): void { |
38 | $this->id = $new_id; |
39 | } |
40 | |
41 | public function getPublishedDate(): ?\DateTime { |
42 | return $this->datum; |
43 | } |
44 | |
45 | public function setPublishedDate(?\DateTime $new_datum): void { |
46 | $this->datum = $new_datum; |
47 | } |
48 | |
49 | public function getText(): ?string { |
50 | return $this->text; |
51 | } |
52 | |
53 | public function setText(?string $new_text): void { |
54 | $this->text = $new_text; |
55 | } |
56 | |
57 | public function getImageId(): ?string { |
58 | return $this->image_id; |
59 | } |
60 | |
61 | public function setImageId(?string $new_image_id): void { |
62 | $this->image_id = $new_image_id; |
63 | } |
64 | |
65 | // --- |
66 | |
67 | public function __toString(): string { |
68 | return "WeeklyPicture (ID: {$this->getId()})"; |
69 | } |
70 | |
71 | public static function getEntityNameForStorage(): string { |
72 | return 'weekly_picture'; |
73 | } |
74 | |
75 | public function getEntityIdForStorage(): string { |
76 | return "{$this->getId()}"; |
77 | } |
78 | } |