Passed
Branch master (350f1b)
by Jan
04:53
created

DevicePart::getIDString()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
/**
3
 * This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
4
 *
5
 * Copyright (C) 2019 - 2020 Jan Böhmer (https://github.com/jbtronics)
6
 *
7
 * This program is free software: you can redistribute it and/or modify
8
 * it under the terms of the GNU Affero General Public License as published
9
 * by the Free Software Foundation, either version 3 of the License, or
10
 * (at your option) any later version.
11
 *
12
 * This program is distributed in the hope that it will be useful,
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 * GNU Affero General Public License for more details.
16
 *
17
 * You should have received a copy of the GNU Affero General Public License
18
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
19
 */
20
21
declare(strict_types=1);
22
23
/**
24
 * part-db version 0.1
25
 * Copyright (C) 2005 Christoph Lechner
26
 * http://www.cl-projects.de/.
27
 *
28
 * part-db version 0.2+
29
 * Copyright (C) 2009 K. Jacobs and others (see authors.php)
30
 * http://code.google.com/p/part-db/
31
 *
32
 * Part-DB Version 0.4+
33
 * Copyright (C) 2016 - 2019 Jan Böhmer
34
 * https://github.com/jbtronics
35
 *
36
 * This program is free software; you can redistribute it and/or
37
 * modify it under the terms of the GNU General Public License
38
 * as published by the Free Software Foundation; either version 2
39
 * of the License, or (at your option) any later version.
40
 *
41
 * This program is distributed in the hope that it will be useful,
42
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
43
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
44
 * GNU General Public License for more details.
45
 *
46
 * You should have received a copy of the GNU General Public License
47
 * along with this program; if not, write to the Free Software
48
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
49
 */
50
51
namespace App\Entity\Devices;
52
53
use App\Entity\Base\AbstractDBElement;
54
use App\Entity\Parts\Part;
55
use Doctrine\ORM\Mapping as ORM;
56
57
/**
58
 * Class DevicePart.
59
 *
60
 * @ORM\Table("`device_parts`")
61
 * @ORM\Entity()
62
 */
63
class DevicePart extends AbstractDBElement
64
{
65
    /**
66
     * @var int
67
     * @ORM\Column(type="integer", name="quantity")
68
     */
69
    protected $quantity;
70
71
    /**
72
     * @var string
73
     * @ORM\Column(type="text", name="mountnames")
74
     */
75
    protected $mountnames;
76
    /**
77
     * @var Device
78
     * @ORM\ManyToOne(targetEntity="Device", inversedBy="parts")
79
     * @ORM\JoinColumn(name="id_device", referencedColumnName="id")
80
     */
81
    protected $device;
82
83
    /**
84
     * @var Part
85
     * @ORM\ManyToOne(targetEntity="App\Entity\Parts\Part")
86
     * @ORM\JoinColumn(name="id_part", referencedColumnName="id")
87
     */
88
    protected $part;
89
}
90