Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
85.00% |
17 / 20 |
|
92.31% |
12 / 13 |
CRAP | |
0.00% |
0 / 1 |
| AbstractTerminZuordnung | |
85.00% |
17 / 20 |
|
92.31% |
12 / 13 |
15.76 | |
0.00% |
0 / 1 |
| __construct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getLfdnr | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getZieltyp | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setZieltyp | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getMaster | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setMaster | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getText | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setText | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| getAngelegtam | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setAngelegtam | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
2 | |||
| getTermin | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setTermin | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| setAdresse | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
6 | |||
| 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 | |
| 10 | /** |
| 11 | * Terminezuord2. => 45 = "TerminTermin", 50 = "TerminKontakt", 60 = "TerminEmail". |
| 12 | */ |
| 13 | #[ORM\InheritanceType('SINGLE_TABLE')] |
| 14 | #[ORM\DiscriminatorColumn(name: 'ZIELTYP', type: 'integer')] |
| 15 | #[ORM\DiscriminatorMap([10 => 'TerminAufgabeAdresse'])] |
| 16 | #[ORM\Entity] |
| 17 | #[ORM\Table(name: 'TERMINEZUORD2')] |
| 18 | #[ORM\Index(columns: ['terminelfdnr'], name: 'TERMINEZUORD2_TERMINELFDNR_FK')] |
| 19 | #[ORM\UniqueConstraint(name: 'TERMINEZUORD2_UK', columns: ['zieltyp', 'ziellfdnr', 'terminelfdnr'])] |
| 20 | abstract class AbstractTerminZuordnung |
| 21 | { |
| 22 | #[ORM\Column(name: 'lfdnr', type: Types::INTEGER, nullable: false)] |
| 23 | #[ORM\Id] |
| 24 | #[ORM\GeneratedValue(strategy: 'SEQUENCE')] |
| 25 | #[ORM\SequenceGenerator(sequenceName: 'GEN_LFDNR', allocationSize: 1, initialValue: 1)] |
| 26 | public private(set) ?int $lfdnr = null; |
| 27 | |
| 28 | protected int $zieltyp; |
| 29 | |
| 30 | #[ORM\Column(name: 'master', type: Types::INTEGER, nullable: false)] |
| 31 | protected int $master = 0; |
| 32 | |
| 33 | #[ORM\Column(name: 'text', type: Types::STRING, length: 255, nullable: true)] |
| 34 | protected ?string $text = null; |
| 35 | |
| 36 | #[ORM\Column(name: 'angelegtam', type: Types::DATETIME_IMMUTABLE, nullable: true)] |
| 37 | protected ?\DateTimeImmutable $angelegtam; |
| 38 | |
| 39 | #[ORM\ManyToOne(targetEntity: AbstractAufgabeTermin::class, cascade: ['persist'])] |
| 40 | #[ORM\JoinColumn(name: 'terminelfdnr', referencedColumnName: 'lfdnr')] |
| 41 | private ?AbstractAufgabeTermin $termin = null; |
| 42 | |
| 43 | public function __construct( |
| 44 | ) { |
| 45 | $this->angelegtam = new \DateTimeImmutable(); |
| 46 | } |
| 47 | |
| 48 | public function getLfdnr(): ?int |
| 49 | { |
| 50 | return $this->lfdnr; |
| 51 | } |
| 52 | |
| 53 | public function getZieltyp(): int |
| 54 | { |
| 55 | return $this->zieltyp; |
| 56 | } |
| 57 | |
| 58 | public function setZieltyp(int $zieltyp): self |
| 59 | { |
| 60 | $this->zieltyp = $zieltyp; |
| 61 | |
| 62 | return $this; |
| 63 | } |
| 64 | |
| 65 | public function getMaster(): ?int |
| 66 | { |
| 67 | return $this->master; |
| 68 | } |
| 69 | |
| 70 | public function setMaster(int $master): self |
| 71 | { |
| 72 | $this->master = $master; |
| 73 | |
| 74 | return $this; |
| 75 | } |
| 76 | |
| 77 | public function getText(): ?string |
| 78 | { |
| 79 | return $this->text; |
| 80 | } |
| 81 | |
| 82 | public function setText(?string $text): self |
| 83 | { |
| 84 | $this->text = $text; |
| 85 | |
| 86 | return $this; |
| 87 | } |
| 88 | |
| 89 | public function getAngelegtam(): ?\DateTimeImmutable |
| 90 | { |
| 91 | return $this->angelegtam; |
| 92 | } |
| 93 | |
| 94 | public function setAngelegtam(\DateTimeImmutable|\DateTime|null $angelegtam): static |
| 95 | { |
| 96 | $this->angelegtam = $angelegtam instanceof \DateTime ? \DateTimeImmutable::createFromMutable($angelegtam) : $angelegtam; |
| 97 | |
| 98 | return $this; |
| 99 | } |
| 100 | |
| 101 | public function getTermin(): ?AbstractAufgabeTermin |
| 102 | { |
| 103 | return $this->termin; |
| 104 | } |
| 105 | |
| 106 | public function setTermin(?AbstractAufgabeTermin $termin): self |
| 107 | { |
| 108 | $this->termin = $termin; |
| 109 | |
| 110 | return $this; |
| 111 | } |
| 112 | |
| 113 | public function setAdresse(?Adresse $adresse): self |
| 114 | { |
| 115 | if ($this instanceof TerminAufgabeAdresse) { |
| 116 | $this->setAdresse($adresse); |
| 117 | } |
| 118 | |
| 119 | return $this; |
| 120 | } |
| 121 | } |