Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 23 |
|
0.00% |
0 / 14 |
CRAP | |
0.00% |
0 / 1 |
| PreisgruppePreis | |
0.00% |
0 / 23 |
|
0.00% |
0 / 14 |
272 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
12 | |||
| getAbmenge | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setAbmenge | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getArtikel | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setArtikel | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getBruttopreis | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setBruttopreis | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getGlobalermengenstaffelpreis | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setGlobalermengenstaffelpreis | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getLfdnr | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getNettopreis | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setNettopreis | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getPreisgruppe | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setPreisgruppe | |
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 | use Satag\AmicronEntityBundle\Traits\DecimalEntity; |
| 12 | |
| 13 | /** |
| 14 | * @see \Satag\AmicronEntityBundle\Tests\Entity\PreisgruppePreisTest |
| 15 | */ |
| 16 | #[ORM\Entity] |
| 17 | #[ORM\HasLifecycleCallbacks] |
| 18 | #[ORM\Table(name: 'PREISGRUPPENPREISE')] |
| 19 | #[ORM\Index(columns: ['bezeichnung'], name: 'PREISGRUPPEN_BEZEICHNUNG_UK')] |
| 20 | #[ORM\UniqueConstraint(name: 'PREISGRUPPENPREISE_UK', columns: ['artikellfdnr', 'preisgruppenlfdnr', 'abmenge', 'globalermengenstaffelpreis'])] |
| 21 | class PreisgruppePreis extends AbstractAmicronEntity implements BlameableEntityInterface |
| 22 | { |
| 23 | use BlameableEntity; |
| 24 | use DecimalEntity; |
| 25 | |
| 26 | #[ORM\Column(name: 'abmenge', type: 'amicron_decimal', precision: 15, scale: 6, nullable: true)] |
| 27 | private ?string $abmenge = null; |
| 28 | |
| 29 | #[ORM\ManyToOne(targetEntity: Artikel::class, cascade: ['persist'])] |
| 30 | #[ORM\JoinColumn(name: 'artikellfdnr', referencedColumnName: 'lfdnr')] |
| 31 | private ?Artikel $artikel = null; |
| 32 | |
| 33 | #[ORM\Column(name: 'bruttopreis', type: 'amicron_decimal', precision: 15, scale: 6, nullable: true)] |
| 34 | private ?string $bruttopreis = null; |
| 35 | |
| 36 | #[ORM\Column(name: 'globalermengenstaffelpreis', type: 'boolean_int', nullable: true)] |
| 37 | private ?bool $globalermengenstaffelpreis = null; |
| 38 | |
| 39 | #[ORM\Column(name: 'lfdnr', type: Types::INTEGER, nullable: false)] |
| 40 | #[ORM\Id] |
| 41 | #[ORM\GeneratedValue(strategy: 'SEQUENCE')] |
| 42 | #[ORM\SequenceGenerator(sequenceName: 'GEN_LFDNR', allocationSize: 1, initialValue: 1)] |
| 43 | public private(set) ?int $lfdnr = null; |
| 44 | |
| 45 | #[ORM\Column(name: 'nettopreis', type: 'amicron_decimal', precision: 15, scale: 6, nullable: true)] |
| 46 | private ?string $nettopreis = null; |
| 47 | |
| 48 | #[ORM\ManyToOne(targetEntity: Preisgruppe::class, cascade: ['persist'])] |
| 49 | #[ORM\JoinColumn(name: 'preisgruppenlfdnr', referencedColumnName: 'lfdnr')] |
| 50 | private ?Preisgruppe $preisgruppe = null; |
| 51 | |
| 52 | public function __construct( |
| 53 | ?Preisgruppe $preisgruppe = null, |
| 54 | ?Artikel $artikel = null |
| 55 | ) { |
| 56 | if ($preisgruppe) { |
| 57 | $this->setPreisgruppe($preisgruppe); |
| 58 | } |
| 59 | if ($artikel) { |
| 60 | $this->setArtikel($artikel); |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | public function getAbmenge(): ?string |
| 65 | { |
| 66 | return $this->abmenge; |
| 67 | } |
| 68 | |
| 69 | /** |
| 70 | * @return $this |
| 71 | */ |
| 72 | public function setAbmenge(?string $abmenge): self |
| 73 | { |
| 74 | $this->abmenge = $abmenge; |
| 75 | |
| 76 | return $this; |
| 77 | } |
| 78 | |
| 79 | public function getArtikel(): ?Artikel |
| 80 | { |
| 81 | return $this->artikel; |
| 82 | } |
| 83 | |
| 84 | public function setArtikel(?Artikel $artikel): self |
| 85 | { |
| 86 | $this->artikel = $artikel; |
| 87 | |
| 88 | return $this; |
| 89 | } |
| 90 | |
| 91 | public function getBruttopreis(): ?string |
| 92 | { |
| 93 | return $this->bruttopreis; |
| 94 | } |
| 95 | |
| 96 | public function setBruttopreis(?string $bruttopreis): self |
| 97 | { |
| 98 | $this->bruttopreis = $bruttopreis; |
| 99 | |
| 100 | return $this; |
| 101 | } |
| 102 | |
| 103 | public function getGlobalermengenstaffelpreis(): ?bool |
| 104 | { |
| 105 | return $this->globalermengenstaffelpreis; |
| 106 | } |
| 107 | |
| 108 | public function setGlobalermengenstaffelpreis(?bool $globalermengenstaffelpreis): self |
| 109 | { |
| 110 | $this->globalermengenstaffelpreis = $globalermengenstaffelpreis; |
| 111 | |
| 112 | return $this; |
| 113 | } |
| 114 | |
| 115 | public function getLfdnr(): ?int |
| 116 | { |
| 117 | return $this->lfdnr; |
| 118 | } |
| 119 | |
| 120 | public function getNettopreis(): ?string |
| 121 | { |
| 122 | return $this->nettopreis; |
| 123 | } |
| 124 | |
| 125 | public function setNettopreis(?string $nettopreis): self |
| 126 | { |
| 127 | $this->nettopreis = $nettopreis; |
| 128 | |
| 129 | return $this; |
| 130 | } |
| 131 | |
| 132 | public function getPreisgruppe(): ?Preisgruppe |
| 133 | { |
| 134 | return $this->preisgruppe; |
| 135 | } |
| 136 | |
| 137 | public function setPreisgruppe(Preisgruppe $preisgruppe): self |
| 138 | { |
| 139 | $this->preisgruppe = $preisgruppe; |
| 140 | |
| 141 | return $this; |
| 142 | } |
| 143 | } |