Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
15 / 15
100.00% covered (success)
100.00%
10 / 10
CRAP
100.00% covered (success)
100.00%
1 / 1
Lagerbestand
100.00% covered (success)
100.00%
15 / 15
100.00% covered (success)
100.00%
10 / 10
10
100.00% covered (success)
100.00%
1 / 1
 setLfdnr
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getLfdnr
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setBestand
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getBestand
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setMindestbestand
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getMindestbestand
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setArtikel
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getArtikel
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setLager
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getLager
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5namespace Satag\AmicronEntityBundle\Entity;
6
7use Doctrine\DBAL\Types\Types;
8use Doctrine\ORM\Mapping as ORM;
9use Satag\AmicronEntityBundle\Traits\BlameableEntity;
10use Satag\AmicronEntityBundle\Traits\BlameableEntityInterface;
11use Satag\AmicronEntityBundle\Traits\DecimalEntity;
12
13/**
14 * @see \Satag\AmicronEntityBundle\Tests\Entity\LagerbestandTest
15 */
16#[ORM\Entity]
17#[ORM\Table(name: 'LAGERBESTAND')]
18#[ORM\Index(columns: ['artikellfdnr'], name: 'LAGERBESTAND_ARTIKELLFDNR_FK')]
19#[ORM\Index(columns: ['lagerlfdnr'], name: 'LAGERBESTAND_LAGERLFDNR_FK')]
20#[ORM\UniqueConstraint(name: 'LAGERBESTAND_UK', columns: ['artikellfdnr', 'lagerlfdnr'])]
21class Lagerbestand implements BlameableEntityInterface
22{
23    use BlameableEntity;
24    use DecimalEntity;
25
26    #[ORM\Column(name: 'lfdnr', type: Types::INTEGER, nullable: false)]
27    #[ORM\Id]
28    #[ORM\GeneratedValue(strategy: 'SEQUENCE')]
29    #[ORM\SequenceGenerator(sequenceName: 'GEN_LFDNR', allocationSize: 1, initialValue: 1)]
30    protected int $lfdnr;
31
32    #[ORM\Column(name: 'bestand', type: 'amicron_decimal', precision: 15, scale: 6, nullable: true)]
33    protected ?string $bestand = null;
34
35    #[ORM\Column(name: 'bestandmindest', type: 'amicron_decimal', precision: 15, scale: 6, nullable: true)]
36    protected ?string $mindestbestand = null;
37
38    #[ORM\ManyToOne(targetEntity: Artikel::class, cascade: ['persist'])]
39    #[ORM\JoinColumn(name: 'artikellfdnr', referencedColumnName: 'lfdnr')]
40    protected ?Artikel $artikel = null;
41
42    #[ORM\ManyToOne(targetEntity: Lager::class, cascade: ['persist'])]
43    #[ORM\JoinColumn(name: 'lagerlfdnr', referencedColumnName: 'lfdnr')]
44    protected ?Lager $lager = null;
45
46    public function setLfdnr(int $lfdnr): self
47    {
48        $this->lfdnr = $lfdnr;
49
50        return $this;
51    }
52
53    public function getLfdnr(): int
54    {
55        return $this->lfdnr;
56    }
57
58    /**
59     * @return $this
60     */
61    public function setBestand(?string $bestand): self
62    {
63        $this->bestand = $bestand;
64
65        return $this;
66    }
67
68    public function getBestand(): ?string
69    {
70        return $this->bestand;
71    }
72
73    /**
74     * @return $this
75     */
76    public function setMindestbestand(?string $mindestbestand): self
77    {
78        $this->mindestbestand = $mindestbestand;
79
80        return $this;
81    }
82
83    public function getMindestbestand(): ?string
84    {
85        return $this->mindestbestand;
86    }
87
88    public function setArtikel(?Artikel $artikel): self
89    {
90        $this->artikel = $artikel;
91
92        return $this;
93    }
94
95    public function getArtikel(): ?Artikel
96    {
97        return $this->artikel;
98    }
99
100    public function setLager(?Lager $lager): self
101    {
102        $this->lager = $lager;
103
104        return $this;
105    }
106
107    public function getLager(): ?Lager
108    {
109        return $this->lager;
110    }
111}