Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 15 |
|
0.00% |
0 / 10 |
CRAP | |
0.00% |
0 / 1 |
| Preisgruppe | |
0.00% |
0 / 15 |
|
0.00% |
0 / 10 |
132 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
6 | |||
| getBezeichnung | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setBezeichnung | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getLfdnr | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getSortierung | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setSortierung | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| isAktiv | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| isBrutto | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setAktiv | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| setBrutto | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| 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 | /** |
| 13 | * @see \Satag\AmicronEntityBundle\Tests\Entity\PreisgruppeTest |
| 14 | */ |
| 15 | #[ORM\Entity] |
| 16 | #[ORM\HasLifecycleCallbacks] |
| 17 | #[ORM\Table(name: 'PREISGRUPPEN')] |
| 18 | #[ORM\Index(columns: ['bezeichnung'], name: 'PREISGRUPPEN_BEZEICHNUNG_UK')] |
| 19 | #[ORM\UniqueConstraint(name: 'PREISGRUPPEN_BEZEICHNUNG_UK', columns: ['bezeichnung'])] |
| 20 | class Preisgruppe implements BlameableEntityInterface |
| 21 | { |
| 22 | use BlameableEntity; |
| 23 | |
| 24 | #[ORM\Column(name: 'aktiv', type: 'boolean_int', nullable: true)] |
| 25 | private ?bool $aktiv = true; |
| 26 | |
| 27 | #[ORM\Column(name: 'bezeichnung', type: Types::STRING, length: 80, unique: true, nullable: false)] |
| 28 | private string $bezeichnung = ''; |
| 29 | |
| 30 | #[ORM\Column(name: 'brutto', type: 'boolean_int', nullable: true)] |
| 31 | private ?bool $brutto = null; |
| 32 | |
| 33 | #[ORM\Column(name: 'lfdnr', type: Types::INTEGER, nullable: false)] |
| 34 | #[ORM\Id] |
| 35 | #[ORM\GeneratedValue(strategy: 'SEQUENCE')] |
| 36 | #[ORM\SequenceGenerator(sequenceName: 'GEN_LFDNR', allocationSize: 1, initialValue: 1)] |
| 37 | public private(set) ?int $lfdnr = null; |
| 38 | |
| 39 | #[ORM\Column(name: 'sortierung', type: Types::STRING, length: 2, nullable: true)] |
| 40 | private ?string $sortierung = null; |
| 41 | |
| 42 | public function __construct( |
| 43 | ?string $bezeichnung = null |
| 44 | ) { |
| 45 | if ($bezeichnung !== null) { |
| 46 | $this->bezeichnung = $bezeichnung; |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | public function getBezeichnung(): string |
| 51 | { |
| 52 | return (string) $this->bezeichnung; |
| 53 | } |
| 54 | |
| 55 | public function setBezeichnung(string $bezeichnung): self |
| 56 | { |
| 57 | $this->bezeichnung = $bezeichnung; |
| 58 | |
| 59 | return $this; |
| 60 | } |
| 61 | |
| 62 | public function getLfdnr(): ?int |
| 63 | { |
| 64 | return $this->lfdnr; |
| 65 | } |
| 66 | |
| 67 | public function getSortierung(): ?string |
| 68 | { |
| 69 | return $this->sortierung; |
| 70 | } |
| 71 | |
| 72 | public function setSortierung(string $sortierung): self |
| 73 | { |
| 74 | $this->sortierung = $sortierung; |
| 75 | |
| 76 | return $this; |
| 77 | } |
| 78 | |
| 79 | public function isAktiv(): ?bool |
| 80 | { |
| 81 | return $this->aktiv; |
| 82 | } |
| 83 | |
| 84 | public function isBrutto(): ?bool |
| 85 | { |
| 86 | return $this->brutto; |
| 87 | } |
| 88 | |
| 89 | public function setAktiv(?bool $aktiv): self |
| 90 | { |
| 91 | $this->aktiv = $aktiv; |
| 92 | |
| 93 | return $this; |
| 94 | } |
| 95 | |
| 96 | public function setBrutto(?bool $brutto): self |
| 97 | { |
| 98 | $this->brutto = $brutto; |
| 99 | |
| 100 | return $this; |
| 101 | } |
| 102 | } |