Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 70 |
|
0.00% |
0 / 43 |
CRAP | |
0.00% |
0 / 1 |
| Kontakt | |
0.00% |
0 / 70 |
|
0.00% |
0 / 43 |
2070 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| __toString | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
2 | |||
| getAdresse | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setAdresse | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
6 | |||
| getAnlass | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setAnlass | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getArt | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setArt | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getAuftrag | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setAuftrag | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getBemerkung | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setBemerkung | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getDatum | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setDatum | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
6 | |||
| getDauer | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setDauer | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getDokument | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setDokument | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getEingangausgang | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setEingangausgang | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getEmail | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setEmail | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getFreifeld1 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setFreifeld1 | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getFreifeld2 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setFreifeld2 | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getKontaktart | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setKontaktart | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getKontaktmit | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setKontaktmit | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getLfdnr | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getMitarbeiter | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setMitarbeiter | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getName | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setName | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getPrioritaet | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setPrioritaet | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getTelereporterprotokoll | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setTelereporterprotokoll | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| isErledigt | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| isMarkiert | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setErledigt | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| setMarkiert | |
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 | use Satag\AmicronEntityBundle\Traits\VorlegbareEntity; |
| 13 | use Symfony\Component\Validator\Constraints as Assert; |
| 14 | |
| 15 | /** |
| 16 | * @see \Satag\AmicronEntityBundle\Tests\Entity\KontaktTest |
| 17 | */ |
| 18 | #[ORM\Entity] |
| 19 | #[ORM\HasLifecycleCallbacks] |
| 20 | #[ORM\Table(name: 'KONTAKTE')] |
| 21 | #[ORM\Index(columns: ['vorlageam'], name: 'KONTAKTE_VORLAGEAM_DIDX')] |
| 22 | #[ORM\Index(columns: ['adressenlfdnr'], name: 'KONTAKTE_ADRESSENLFDNR_FK')] |
| 23 | #[ORM\Index(columns: ['auftraglfdnr'], name: 'KONTAKTE_AUFTRAGLFDNR_FK')] |
| 24 | class Kontakt implements BlameableEntityInterface, \Stringable |
| 25 | { |
| 26 | use BlameableEntity; |
| 27 | use DecimalEntity; |
| 28 | use VorlegbareEntity; |
| 29 | |
| 30 | final public const string ART_KUNDE = 'K'; |
| 31 | final public const string ART_LIEFERANT = 'L'; |
| 32 | final public const string ART_MITARBEITER = 'M'; |
| 33 | final public const string AUSGANG = 'A'; |
| 34 | final public const string EINGANG = 'E'; |
| 35 | final public const string INTERN = 'I'; |
| 36 | final public const int PRIO_HOCH = 1; |
| 37 | final public const int PRIO_NIEDRIG = 3; |
| 38 | final public const int PRIO_NORMAL = 2; |
| 39 | |
| 40 | #[ORM\ManyToOne(targetEntity: Adresse::class, cascade: ['Persist'])] |
| 41 | #[ORM\JoinColumn(name: 'adressenlfdnr', referencedColumnName: 'lfdnr')] |
| 42 | private ?Adresse $adresse = null; |
| 43 | |
| 44 | #[ORM\Column(name: 'anlass', type: Types::STRING, length: 60, nullable: true)] |
| 45 | private ?string $anlass = null; |
| 46 | |
| 47 | #[ORM\Column(name: 'art', type: Types::STRING, length: 1, nullable: true)] |
| 48 | #[Assert\Choice(['K', 'L', 'M'], message: 'Use one of Kontakt::ART_* Constants')] |
| 49 | private ?string $art = null; |
| 50 | |
| 51 | #[ORM\ManyToOne(targetEntity: Auftrag::class, cascade: ['Persist'])] |
| 52 | #[ORM\JoinColumn(name: 'auftraglfdnr', referencedColumnName: 'lfdnr')] |
| 53 | private ?Auftrag $auftrag = null; |
| 54 | |
| 55 | #[ORM\Column(name: 'bemerkung', type: Types::TEXT, nullable: true)] |
| 56 | private ?string $bemerkung = null; |
| 57 | |
| 58 | #[ORM\Column(name: 'datum', type: Types::DATETIME_IMMUTABLE, nullable: true)] |
| 59 | private ?\DateTimeImmutable $datum = null; |
| 60 | |
| 61 | #[ORM\Column(name: 'dauer', type: 'amicron_decimal', precision: 15, scale: 6, nullable: true)] |
| 62 | private ?string $dauer = null; |
| 63 | |
| 64 | #[ORM\ManyToOne(targetEntity: Dokument::class, cascade: ['Persist'])] |
| 65 | #[ORM\JoinColumn(name: 'dokumentlfdnr', referencedColumnName: 'lfdnr')] |
| 66 | private ?Dokument $dokument = null; |
| 67 | |
| 68 | #[ORM\Column(name: 'eingangausgang', type: Types::STRING, length: 1, nullable: true)] |
| 69 | #[Assert\Choice([null, 'E', 'A', 'I'], message: 'Use one of Kontakt::EINGANG, Kontakt::INTERN, Kontakt::AUSGANG Constants')] |
| 70 | private ?string $eingangausgang = null; |
| 71 | |
| 72 | #[ORM\ManyToOne(targetEntity: Email::class, cascade: ['Persist'])] |
| 73 | #[ORM\JoinColumn(name: 'emaillfdnr', referencedColumnName: 'lfdnr')] |
| 74 | private ?Email $email = null; |
| 75 | |
| 76 | #[ORM\Column(name: 'erledigt', type: Types::BOOLEAN, length: 1, nullable: true)] |
| 77 | private ?bool $erledigt = null; |
| 78 | |
| 79 | #[ORM\Column(name: 'freifeld1', type: Types::STRING, length: 255, nullable: true)] |
| 80 | private ?string $freifeld1 = null; |
| 81 | |
| 82 | #[ORM\Column(name: 'freifeld2', type: Types::STRING, length: 255, nullable: true)] |
| 83 | private ?string $freifeld2 = null; |
| 84 | |
| 85 | #[ORM\Column(name: 'kontaktart', type: Types::STRING, length: 20, nullable: true)] |
| 86 | private ?string $kontaktart = null; |
| 87 | |
| 88 | #[ORM\Column(name: 'kontaktmit', type: Types::STRING, length: 80, nullable: true)] |
| 89 | private ?string $kontaktmit = null; |
| 90 | |
| 91 | #[ORM\Column(name: 'lfdnr', type: Types::INTEGER, nullable: false)] |
| 92 | #[ORM\Id] |
| 93 | #[ORM\GeneratedValue(strategy: 'SEQUENCE')] |
| 94 | #[ORM\SequenceGenerator(sequenceName: 'GEN_LFDNR', allocationSize: 1, initialValue: 1)] |
| 95 | public private(set) ?int $lfdnr = null; |
| 96 | |
| 97 | #[ORM\Column(name: 'mark', type: Types::BOOLEAN, length: 1, nullable: true)] |
| 98 | private ?bool $markiert = null; |
| 99 | |
| 100 | #[ORM\Column(name: 'mitarbeiter', type: Types::STRING, length: 3, nullable: true)] |
| 101 | private ?string $mitarbeiter = null; |
| 102 | |
| 103 | #[ORM\Column(name: 'name', type: Types::STRING, length: 60, nullable: true)] |
| 104 | private ?string $name = null; |
| 105 | |
| 106 | #[ORM\Column(name: 'prioritaet', type: Types::INTEGER, nullable: true)] |
| 107 | #[Assert\Choice([1, 2, 3], message: 'Use one of Kontakt::PRIO_* Constants')] |
| 108 | private ?int $prioritaet = null; |
| 109 | |
| 110 | #[ORM\ManyToOne(targetEntity: Telereporterprotokoll::class, cascade: ['Persist'])] |
| 111 | #[ORM\JoinColumn(name: 'trpprotokolllfdnr', referencedColumnName: 'lfdnr')] |
| 112 | private ?Telereporterprotokoll $telereporterprotokoll = null; |
| 113 | |
| 114 | public function __construct( |
| 115 | ) { |
| 116 | $this->setMarkiert(false); |
| 117 | } |
| 118 | |
| 119 | public function __toString(): string |
| 120 | { |
| 121 | return \sprintf( |
| 122 | '\\\\contact:%s', |
| 123 | $this->lfdnr |
| 124 | ); |
| 125 | } |
| 126 | |
| 127 | public function getAdresse(): ?Adresse |
| 128 | { |
| 129 | return $this->adresse; |
| 130 | } |
| 131 | |
| 132 | public function setAdresse(?Adresse $adresse): self |
| 133 | { |
| 134 | $this->adresse = $adresse; |
| 135 | if ($adresse) { |
| 136 | $this->art = $adresse->getArt(); |
| 137 | } |
| 138 | |
| 139 | return $this; |
| 140 | } |
| 141 | |
| 142 | public function getAnlass(): ?string |
| 143 | { |
| 144 | return $this->anlass; |
| 145 | } |
| 146 | |
| 147 | public function setAnlass(?string $anlass): self |
| 148 | { |
| 149 | $this->anlass = $anlass; |
| 150 | |
| 151 | return $this; |
| 152 | } |
| 153 | |
| 154 | public function getArt(): ?string |
| 155 | { |
| 156 | return $this->art; |
| 157 | } |
| 158 | |
| 159 | public function setArt(?string $art): self |
| 160 | { |
| 161 | $this->art = $art; |
| 162 | |
| 163 | return $this; |
| 164 | } |
| 165 | |
| 166 | public function getAuftrag(): ?Auftrag |
| 167 | { |
| 168 | return $this->auftrag; |
| 169 | } |
| 170 | |
| 171 | public function setAuftrag(?Auftrag $auftrag): self |
| 172 | { |
| 173 | $this->auftrag = $auftrag; |
| 174 | |
| 175 | return $this; |
| 176 | } |
| 177 | |
| 178 | public function getBemerkung(): ?string |
| 179 | { |
| 180 | return $this->bemerkung; |
| 181 | } |
| 182 | |
| 183 | public function setBemerkung(?string $bemerkung): self |
| 184 | { |
| 185 | $this->bemerkung = $bemerkung; |
| 186 | |
| 187 | return $this; |
| 188 | } |
| 189 | |
| 190 | public function getDatum(): ?\DateTimeImmutable |
| 191 | { |
| 192 | return $this->datum; |
| 193 | } |
| 194 | |
| 195 | public function setDatum(\DateTimeImmutable|\DateTime|null $datum = null): self |
| 196 | { |
| 197 | $this->datum = $datum instanceof \DateTime |
| 198 | ? \DateTimeImmutable::createFromMutable($datum) |
| 199 | : $datum; |
| 200 | |
| 201 | return $this; |
| 202 | } |
| 203 | |
| 204 | public function getDauer(): ?string |
| 205 | { |
| 206 | return $this->dauer; |
| 207 | } |
| 208 | |
| 209 | public function setDauer(?string $dauer): self |
| 210 | { |
| 211 | $this->dauer = $dauer; |
| 212 | |
| 213 | return $this; |
| 214 | } |
| 215 | |
| 216 | /** |
| 217 | * @return Dokument|null ; |
| 218 | */ |
| 219 | public function getDokument(): ?Dokument |
| 220 | { |
| 221 | return $this->dokument; |
| 222 | } |
| 223 | |
| 224 | public function setDokument(?Dokument $dokument): self |
| 225 | { |
| 226 | $this->dokument = $dokument; |
| 227 | |
| 228 | return $this; |
| 229 | } |
| 230 | |
| 231 | public function getEingangausgang(): ?string |
| 232 | { |
| 233 | return $this->eingangausgang; |
| 234 | } |
| 235 | |
| 236 | public function setEingangausgang(?string $eingangausgang): self |
| 237 | { |
| 238 | $this->eingangausgang = $eingangausgang; |
| 239 | |
| 240 | return $this; |
| 241 | } |
| 242 | |
| 243 | public function getEmail(): ?Email |
| 244 | { |
| 245 | return $this->email; |
| 246 | } |
| 247 | |
| 248 | public function setEmail(?Email $email): self |
| 249 | { |
| 250 | $this->email = $email; |
| 251 | |
| 252 | return $this; |
| 253 | } |
| 254 | |
| 255 | public function getFreifeld1(): ?string |
| 256 | { |
| 257 | return $this->freifeld1; |
| 258 | } |
| 259 | |
| 260 | public function setFreifeld1(?string $freifeld1): self |
| 261 | { |
| 262 | $this->freifeld1 = $freifeld1; |
| 263 | |
| 264 | return $this; |
| 265 | } |
| 266 | |
| 267 | public function getFreifeld2(): ?string |
| 268 | { |
| 269 | return $this->freifeld2; |
| 270 | } |
| 271 | |
| 272 | public function setFreifeld2(?string $freifeld2): self |
| 273 | { |
| 274 | $this->freifeld2 = $freifeld2; |
| 275 | |
| 276 | return $this; |
| 277 | } |
| 278 | |
| 279 | public function getKontaktart(): ?string |
| 280 | { |
| 281 | return $this->kontaktart; |
| 282 | } |
| 283 | |
| 284 | public function setKontaktart(?string $kontaktart): self |
| 285 | { |
| 286 | $this->kontaktart = $kontaktart; |
| 287 | |
| 288 | return $this; |
| 289 | } |
| 290 | |
| 291 | public function getKontaktmit(): ?string |
| 292 | { |
| 293 | return $this->kontaktmit; |
| 294 | } |
| 295 | |
| 296 | public function setKontaktmit(?string $kontaktmit): self |
| 297 | { |
| 298 | $this->kontaktmit = $kontaktmit; |
| 299 | |
| 300 | return $this; |
| 301 | } |
| 302 | |
| 303 | public function getLfdnr(): ?int |
| 304 | { |
| 305 | return $this->lfdnr; |
| 306 | } |
| 307 | |
| 308 | public function getMitarbeiter(): ?string |
| 309 | { |
| 310 | return $this->mitarbeiter; |
| 311 | } |
| 312 | |
| 313 | public function setMitarbeiter(?string $mitarbeiter): self |
| 314 | { |
| 315 | $this->mitarbeiter = $mitarbeiter; |
| 316 | |
| 317 | return $this; |
| 318 | } |
| 319 | |
| 320 | public function getName(): ?string |
| 321 | { |
| 322 | return $this->name; |
| 323 | } |
| 324 | |
| 325 | public function setName(?string $name): self |
| 326 | { |
| 327 | $this->name = $name; |
| 328 | |
| 329 | return $this; |
| 330 | } |
| 331 | |
| 332 | public function getPrioritaet(): ?int |
| 333 | { |
| 334 | return $this->prioritaet; |
| 335 | } |
| 336 | |
| 337 | public function setPrioritaet(?int $prioritaet): self |
| 338 | { |
| 339 | $this->prioritaet = $prioritaet; |
| 340 | |
| 341 | return $this; |
| 342 | } |
| 343 | |
| 344 | public function getTelereporterprotokoll(): ?Telereporterprotokoll |
| 345 | { |
| 346 | return $this->telereporterprotokoll; |
| 347 | } |
| 348 | |
| 349 | public function setTelereporterprotokoll(?Telereporterprotokoll $telereporterprotokoll): self |
| 350 | { |
| 351 | $this->telereporterprotokoll = $telereporterprotokoll; |
| 352 | |
| 353 | return $this; |
| 354 | } |
| 355 | |
| 356 | public function isErledigt(): ?bool |
| 357 | { |
| 358 | return $this->erledigt; |
| 359 | } |
| 360 | |
| 361 | public function isMarkiert(): ?bool |
| 362 | { |
| 363 | return $this->markiert; |
| 364 | } |
| 365 | |
| 366 | public function setErledigt(?bool $erledigt): self |
| 367 | { |
| 368 | $this->erledigt = $erledigt; |
| 369 | |
| 370 | return $this; |
| 371 | } |
| 372 | |
| 373 | public function setMarkiert(bool $markiert): self |
| 374 | { |
| 375 | $this->markiert = $markiert; |
| 376 | |
| 377 | return $this; |
| 378 | } |
| 379 | } |