|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
declare(strict_types=1); |
|
4
|
|
|
|
|
5
|
|
|
namespace Stu\Orm\Entity; |
|
6
|
|
|
|
|
7
|
|
|
use Doctrine\ORM\Mapping\Column; |
|
8
|
|
|
use Doctrine\ORM\Mapping\Entity; |
|
9
|
|
|
use Doctrine\ORM\Mapping\GeneratedValue; |
|
10
|
|
|
use Doctrine\ORM\Mapping\Id; |
|
11
|
|
|
use Doctrine\ORM\Mapping\JoinColumn; |
|
12
|
|
|
use Doctrine\ORM\Mapping\ManyToOne; |
|
13
|
|
|
use Doctrine\ORM\Mapping\Table; |
|
14
|
|
|
|
|
15
|
|
|
/** |
|
16
|
|
|
* @Entity(repositoryClass="Stu\Orm\Repository\TorpedoHullRepository") |
|
17
|
|
|
* @Table( |
|
18
|
|
|
* name="stu_torpedo_hull") |
|
19
|
|
|
**/ |
|
20
|
|
|
class TorpedoHull implements TorpedoHullInterface |
|
21
|
|
|
{ |
|
22
|
|
|
/** |
|
23
|
|
|
* @Id |
|
24
|
|
|
* @Column(type="integer") |
|
25
|
|
|
* @GeneratedValue(strategy="IDENTITY") |
|
26
|
|
|
* |
|
27
|
|
|
*/ |
|
28
|
|
|
private int $id; |
|
29
|
|
|
|
|
30
|
|
|
/** |
|
31
|
|
|
* @Column(type="integer") |
|
32
|
|
|
* |
|
33
|
|
|
*/ |
|
34
|
|
|
private int $module_id = 0; |
|
35
|
|
|
|
|
36
|
|
|
/** |
|
37
|
|
|
* @Column(type="integer") |
|
38
|
|
|
* |
|
39
|
|
|
*/ |
|
40
|
|
|
private int $torpedo_type = 0; |
|
41
|
|
|
|
|
42
|
|
|
/** |
|
43
|
|
|
* @Column(type="integer") |
|
44
|
|
|
* |
|
45
|
|
|
*/ |
|
46
|
|
|
private int $modificator = 0; |
|
47
|
|
|
|
|
48
|
|
|
|
|
49
|
|
|
/** |
|
50
|
|
|
* @var TorpedoTypeInterface |
|
51
|
|
|
* |
|
52
|
|
|
* @ManyToOne(targetEntity="TorpedoType") |
|
53
|
|
|
* @JoinColumn(name="torpedo_type", referencedColumnName="id") |
|
54
|
|
|
*/ |
|
55
|
|
|
private $torpedo; |
|
56
|
|
|
|
|
57
|
|
|
/** |
|
58
|
|
|
* @var ModuleInterface |
|
59
|
|
|
* |
|
60
|
|
|
* @ManyToOne(targetEntity="Module") |
|
61
|
|
|
* @JoinColumn(name="module_id", referencedColumnName="id") |
|
62
|
|
|
*/ |
|
63
|
|
|
private $module; |
|
64
|
|
|
|
|
65
|
|
|
public function getId(): int |
|
66
|
|
|
{ |
|
67
|
|
|
return $this->id; |
|
68
|
|
|
} |
|
69
|
|
|
|
|
70
|
|
|
public function getModuleId(): int |
|
71
|
|
|
{ |
|
72
|
|
|
return $this->module_id; |
|
73
|
|
|
} |
|
74
|
|
|
|
|
75
|
|
|
public function setModuleId(int $moduleId): TorpedoHullInterface |
|
76
|
|
|
{ |
|
77
|
|
|
$this->module_id = $moduleId; |
|
78
|
|
|
|
|
79
|
|
|
return $this; |
|
80
|
|
|
} |
|
81
|
|
|
|
|
82
|
|
|
public function getTorpedoType(): int |
|
83
|
|
|
{ |
|
84
|
|
|
return $this->torpedo_type; |
|
85
|
|
|
} |
|
86
|
|
|
|
|
87
|
|
|
public function setTorpedoType(int $torpedoType): TorpedoHullInterface |
|
88
|
|
|
{ |
|
89
|
|
|
$this->torpedo_type = $torpedoType; |
|
90
|
|
|
|
|
91
|
|
|
return $this; |
|
92
|
|
|
} |
|
93
|
|
|
|
|
94
|
|
|
public function getModificator(): int |
|
95
|
|
|
{ |
|
96
|
|
|
return $this->modificator; |
|
97
|
|
|
} |
|
98
|
|
|
|
|
99
|
|
|
public function setModificator(int $Modificator): TorpedoHullInterface |
|
100
|
|
|
{ |
|
101
|
|
|
$this->modificator = $Modificator; |
|
102
|
|
|
|
|
103
|
|
|
return $this; |
|
104
|
|
|
} |
|
105
|
|
|
|
|
106
|
|
|
public function getTorpedo(): TorpedoTypeInterface |
|
107
|
|
|
{ |
|
108
|
|
|
return $this->torpedo; |
|
109
|
|
|
} |
|
110
|
|
|
|
|
111
|
|
|
public function getModule(): ModuleInterface |
|
112
|
|
|
{ |
|
113
|
|
|
return $this->module; |
|
114
|
|
|
} |
|
115
|
|
|
} |
|
116
|
|
|
|