Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
13 / 13 |
|
100.00% |
9 / 9 |
CRAP | |
100.00% |
1 / 1 |
| AdresseEmails | |
100.00% |
13 / 13 |
|
100.00% |
9 / 9 |
9 | |
100.00% |
1 / 1 |
| getAdressenlfdnr | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setAdressenlfdnr | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getArt | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setArt | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getEmail | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setEmail | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getLfdnr | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getPos | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setPos | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Satag\AmicronEntityBundle\Entity; |
| 6 | |
| 7 | use Doctrine\DBAL\Types\Types; |
| 8 | use Doctrine\ORM\Mapping as ORM; |
| 9 | use Satag\AmicronEntityBundle\Traits\BlameableEntity; |
| 10 | use Satag\AmicronEntityBundle\Traits\BlameableEntityInterface; |
| 11 | |
| 12 | #[ORM\Entity] |
| 13 | #[ORM\Table(name: 'ADRESSENEMAILADR')] |
| 14 | #[ORM\Index(columns: ['email'], name: 'ADREMAILADR_EMAIL_IDX')] |
| 15 | #[ORM\Index(columns: ['adressenlfdnr'], name: 'ADRESSENEMAILADR_ADRLFDNR_FK')] |
| 16 | #[ORM\UniqueConstraint(name: 'ADRESSENEMAILADR_UK', columns: ['adressenlfdnr', 'email'])] |
| 17 | class AdresseEmails implements BlameableEntityInterface |
| 18 | { |
| 19 | use BlameableEntity; |
| 20 | |
| 21 | #[ORM\ManyToOne(targetEntity: Adresse::class)] |
| 22 | #[ORM\JoinColumn(name: 'adressenlfdnr', referencedColumnName: 'lfdnr')] |
| 23 | private ?Adresse $adressenlfdnr = null; |
| 24 | |
| 25 | #[ORM\Column(name: 'art', type: Types::INTEGER, nullable: true)] |
| 26 | private ?int $art = null; |
| 27 | |
| 28 | #[ORM\Column(name: 'email', type: Types::STRING, length: 80, nullable: false)] |
| 29 | private string $email; |
| 30 | |
| 31 | #[ORM\Column(name: 'lfdnr', type: Types::INTEGER, nullable: false)] |
| 32 | #[ORM\Id] |
| 33 | #[ORM\GeneratedValue(strategy: 'SEQUENCE')] |
| 34 | #[ORM\SequenceGenerator(sequenceName: 'GEN_LFDNR', allocationSize: 1, initialValue: 1)] |
| 35 | public private(set) ?int $lfdnr = null; |
| 36 | |
| 37 | #[ORM\Column(name: 'pos', type: Types::INTEGER, nullable: true)] |
| 38 | private ?int $pos = null; |
| 39 | |
| 40 | public function getAdressenlfdnr(): ?Adresse |
| 41 | { |
| 42 | return $this->adressenlfdnr; |
| 43 | } |
| 44 | |
| 45 | public function setAdressenlfdnr(?Adresse $adressenlfdnr): self |
| 46 | { |
| 47 | $this->adressenlfdnr = $adressenlfdnr; |
| 48 | |
| 49 | return $this; |
| 50 | } |
| 51 | |
| 52 | public function getArt(): ?int |
| 53 | { |
| 54 | return $this->art; |
| 55 | } |
| 56 | |
| 57 | public function setArt(?int $art): self |
| 58 | { |
| 59 | $this->art = $art; |
| 60 | |
| 61 | return $this; |
| 62 | } |
| 63 | |
| 64 | public function getEmail(): string |
| 65 | { |
| 66 | return $this->email; |
| 67 | } |
| 68 | |
| 69 | public function setEmail(string $email): self |
| 70 | { |
| 71 | $this->email = $email; |
| 72 | |
| 73 | return $this; |
| 74 | } |
| 75 | |
| 76 | public function getLfdnr(): ?int |
| 77 | { |
| 78 | return $this->lfdnr; |
| 79 | } |
| 80 | |
| 81 | public function getPos(): ?int |
| 82 | { |
| 83 | return $this->pos; |
| 84 | } |
| 85 | |
| 86 | public function setPos(?int $pos): self |
| 87 | { |
| 88 | $this->pos = $pos; |
| 89 | |
| 90 | return $this; |
| 91 | } |
| 92 | } |