Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 35 |
|
0.00% |
0 / 21 |
CRAP | |
0.00% |
0 / 1 |
| Filter | |
0.00% |
0 / 35 |
|
0.00% |
0 / 21 |
650 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| isOeffentlich | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setOeffentlich | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
6 | |||
| getBenutzer | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setBenutzer | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getBezeichnung | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setBezeichnung | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getFilterdata | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setFilterdata | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getFilterid | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setFilterid | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getLfdnr | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getModus | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setModus | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getNcfilterdata | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setNcfilterdata | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getVater | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setVater | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getKinder | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| addKind | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
6 | |||
| removeKind | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
12 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Satag\AmicronEntityBundle\Entity; |
| 6 | |
| 7 | use Doctrine\Common\Collections\ArrayCollection; |
| 8 | use Doctrine\Common\Collections\Collection; |
| 9 | use Doctrine\DBAL\Types\Types; |
| 10 | use Doctrine\ORM\Mapping as ORM; |
| 11 | |
| 12 | #[ORM\Entity] |
| 13 | #[ORM\Table(name: 'FILTERDATA')] |
| 14 | #[ORM\Index(columns: ['benutzerlfdnr'], name: 'FILTERDATA_BENUTZERLFDNR_FK')] |
| 15 | #[ORM\Index(columns: ['vaterlfdnr'], name: 'FILTERDATA_VATERLFDNR_FK')] |
| 16 | class Filter |
| 17 | { |
| 18 | final public const int MODUS_ORDNER = 1; |
| 19 | final public const int MODUS_FILTER = 0; |
| 20 | |
| 21 | final public const int ID_ARTIKEL = 1; |
| 22 | final public const int ID_KONTAKTE = 2; |
| 23 | |
| 24 | final public const int ID_OFFENE_POSTEN_KUNDEN = 3; |
| 25 | |
| 26 | final public const int ID_OFFENE_POSTEN_LIEFERANTEN = 4; |
| 27 | |
| 28 | final public const int ID_KUNDEN = 5; |
| 29 | final public const int ID_LIEFERANTEN = 6; |
| 30 | |
| 31 | final public const int ID_MITARBEITER = 7; |
| 32 | |
| 33 | final public const int ID_AUFTRAEGE = 8; |
| 34 | |
| 35 | final public const int ID_BESTELLUNGEN = 9; |
| 36 | |
| 37 | final public const int ID_WERBEAKTIONEN = 11; |
| 38 | final public const int ID_KONTOAUSZUG = 12; |
| 39 | final public const int ID_IMPORTIERTE_AUFTRAEGE = 13; |
| 40 | |
| 41 | final public const int ID_BUCHUNGSLISTE = 14; |
| 42 | |
| 43 | final public const int ID_EMAIL = 15; |
| 44 | final public const int ID_RETOUREN = 16; |
| 45 | |
| 46 | final public const int ID_BELEGE = 17; |
| 47 | |
| 48 | final public const int ID_KOMMISSIONIERLISTE_AUFTRAEGE = 19; |
| 49 | |
| 50 | #[ORM\ManyToOne(targetEntity: Benutzer::class, inversedBy: 'filter')] |
| 51 | #[ORM\JoinColumn(name: 'benutzerlfdnr', referencedColumnName: 'lfdnr')] |
| 52 | private ?Benutzer $benutzer = null; |
| 53 | |
| 54 | #[ORM\Column(name: 'bezeichnung', type: Types::STRING, length: 50, nullable: true)] |
| 55 | private ?string $bezeichnung = null; |
| 56 | |
| 57 | #[ORM\Column(name: 'filterdata', type: Types::TEXT, nullable: true)] |
| 58 | private ?string $filterdata = null; |
| 59 | |
| 60 | #[ORM\Column(name: 'filterid', type: Types::INTEGER, nullable: true)] |
| 61 | private ?int $filterid = null; |
| 62 | |
| 63 | #[ORM\Column(name: 'lfdnr', type: Types::INTEGER, nullable: false)] |
| 64 | #[ORM\Id] |
| 65 | #[ORM\GeneratedValue(strategy: 'SEQUENCE')] |
| 66 | #[ORM\SequenceGenerator(sequenceName: 'GEN_LFDNR', allocationSize: 1, initialValue: 1)] |
| 67 | private ?int $lfdnr = null; |
| 68 | |
| 69 | #[ORM\Column(name: 'ncfilterdata', type: Types::TEXT, nullable: true)] |
| 70 | private ?string $ncfilterdata = null; |
| 71 | |
| 72 | #[ORM\ManyToOne(targetEntity: Filter::class, inversedBy: 'kinder', cascade: ['persist'])] |
| 73 | #[ORM\JoinColumn(name: 'vaterlfdnr', referencedColumnName: 'lfdnr')] |
| 74 | private ?Filter $vater = null; |
| 75 | |
| 76 | /** |
| 77 | * @var Collection<int, Filter> |
| 78 | */ |
| 79 | #[ORM\OneToMany(mappedBy: 'vater', targetEntity: Filter::class, cascade: ['persist', 'remove'], orphanRemoval: true)] |
| 80 | private Collection $kinder; |
| 81 | |
| 82 | #[ORM\Column(name: 'oeffentlich', type: Types::INTEGER, nullable: true)] |
| 83 | private ?int $oeffentlich = null; |
| 84 | |
| 85 | public function __construct(#[ORM\Column(name: 'modus', type: Types::INTEGER, nullable: true)] |
| 86 | private ?int $modus = self::MODUS_ORDNER) |
| 87 | { |
| 88 | $this->kinder = new ArrayCollection(); |
| 89 | } |
| 90 | |
| 91 | public function isOeffentlich(): ?bool |
| 92 | { |
| 93 | return $this->oeffentlich === 1; |
| 94 | } |
| 95 | |
| 96 | public function setOeffentlich(bool $oeffentlich): Filter |
| 97 | { |
| 98 | $this->oeffentlich = $oeffentlich === true ? 1 : null; |
| 99 | |
| 100 | return $this; |
| 101 | } |
| 102 | |
| 103 | public function getBenutzer(): ?Benutzer |
| 104 | { |
| 105 | return $this->benutzer; |
| 106 | } |
| 107 | |
| 108 | public function setBenutzer(?Benutzer $benutzer): self |
| 109 | { |
| 110 | $this->benutzer = $benutzer; |
| 111 | |
| 112 | return $this; |
| 113 | } |
| 114 | |
| 115 | public function getBezeichnung(): ?string |
| 116 | { |
| 117 | return $this->bezeichnung; |
| 118 | } |
| 119 | |
| 120 | public function setBezeichnung(?string $bezeichnung): self |
| 121 | { |
| 122 | $this->bezeichnung = $bezeichnung; |
| 123 | |
| 124 | return $this; |
| 125 | } |
| 126 | |
| 127 | public function getFilterdata(): ?string |
| 128 | { |
| 129 | return $this->filterdata; |
| 130 | } |
| 131 | |
| 132 | public function setFilterdata(?string $filterdata): self |
| 133 | { |
| 134 | $this->filterdata = $filterdata; |
| 135 | |
| 136 | return $this; |
| 137 | } |
| 138 | |
| 139 | public function getFilterid(): ?int |
| 140 | { |
| 141 | return $this->filterid; |
| 142 | } |
| 143 | |
| 144 | public function setFilterid(?int $filterid): self |
| 145 | { |
| 146 | $this->filterid = $filterid; |
| 147 | |
| 148 | return $this; |
| 149 | } |
| 150 | |
| 151 | public function getLfdnr(): ?int |
| 152 | { |
| 153 | return $this->lfdnr; |
| 154 | } |
| 155 | |
| 156 | public function getModus(): ?int |
| 157 | { |
| 158 | return $this->modus; |
| 159 | } |
| 160 | |
| 161 | public function setModus(int $modus): self |
| 162 | { |
| 163 | $this->modus = $modus; |
| 164 | |
| 165 | return $this; |
| 166 | } |
| 167 | |
| 168 | public function getNcfilterdata(): ?string |
| 169 | { |
| 170 | return $this->ncfilterdata; |
| 171 | } |
| 172 | |
| 173 | public function setNcfilterdata(?string $ncfilterdata): self |
| 174 | { |
| 175 | $this->ncfilterdata = $ncfilterdata; |
| 176 | |
| 177 | return $this; |
| 178 | } |
| 179 | |
| 180 | public function getVater(): ?self |
| 181 | { |
| 182 | return $this->vater; |
| 183 | } |
| 184 | |
| 185 | public function setVater(?self $vater): self |
| 186 | { |
| 187 | $this->vater = $vater; |
| 188 | |
| 189 | return $this; |
| 190 | } |
| 191 | |
| 192 | /** |
| 193 | * @return Collection<int, Filter> |
| 194 | */ |
| 195 | public function getKinder(): Collection |
| 196 | { |
| 197 | return $this->kinder; |
| 198 | } |
| 199 | |
| 200 | public function addKind(self $kind): self |
| 201 | { |
| 202 | if (!$this->kinder->contains($kind)) { |
| 203 | $this->kinder[] = $kind; |
| 204 | $kind->setVater($this); |
| 205 | } |
| 206 | |
| 207 | return $this; |
| 208 | } |
| 209 | |
| 210 | public function removeKind(self $kind): self |
| 211 | { |
| 212 | if ($this->kinder->removeElement($kind)) { |
| 213 | // Set the owning side to null (unless already changed) |
| 214 | if ($kind->getVater() === $this) { |
| 215 | $kind->setVater(null); |
| 216 | } |
| 217 | } |
| 218 | |
| 219 | return $this; |
| 220 | } |
| 221 | } |