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\Index; |
12
|
|
|
use Doctrine\ORM\Mapping\JoinColumn; |
13
|
|
|
use Doctrine\ORM\Mapping\ManyToOne; |
14
|
|
|
use Doctrine\ORM\Mapping\OneToOne; |
15
|
|
|
use Doctrine\ORM\Mapping\Table; |
16
|
|
|
use Override; |
|
|
|
|
17
|
|
|
use Stu\Component\Building\BuildingFunctionEnum; |
18
|
|
|
use Stu\Orm\Repository\ColonyShipQueueRepository; |
19
|
|
|
|
20
|
|
|
#[Table(name: 'stu_colonies_shipqueue')] |
21
|
|
|
#[Index(name: 'colony_shipqueue_building_function_idx', columns: ['colony_id', 'building_function_id'])] |
22
|
|
|
#[Index(name: 'colony_shipqueue_user_idx', columns: ['user_id'])] |
23
|
|
|
#[Index(name: 'colony_shipqueue_finish_date_idx', columns: ['finish_date'])] |
24
|
|
|
#[Entity(repositoryClass: ColonyShipQueueRepository::class)] |
25
|
|
|
class ColonyShipQueue implements ColonyShipQueueInterface |
26
|
|
|
{ |
27
|
|
|
#[Id] |
28
|
|
|
#[Column(type: 'integer')] |
29
|
|
|
#[GeneratedValue(strategy: 'IDENTITY')] |
30
|
|
|
private int $id; |
31
|
|
|
|
32
|
|
|
#[Column(type: 'integer')] |
33
|
|
|
private int $colony_id = 0; |
|
|
|
|
34
|
|
|
|
35
|
|
|
#[Column(type: 'integer')] |
36
|
|
|
private int $user_id = 0; |
37
|
|
|
|
38
|
|
|
#[Column(type: 'integer')] |
39
|
|
|
private int $rump_id = 0; |
40
|
|
|
|
41
|
|
|
#[Column(type: 'integer')] |
42
|
|
|
private int $buildplan_id = 0; |
|
|
|
|
43
|
|
|
|
44
|
|
|
#[Column(type: 'integer')] |
45
|
|
|
private int $buildtime = 0; |
46
|
|
|
|
47
|
|
|
#[Column(type: 'integer')] |
48
|
|
|
private int $finish_date = 0; |
49
|
|
|
|
50
|
|
|
#[Column(type: 'integer')] |
51
|
|
|
private int $stop_date = 0; |
52
|
|
|
|
53
|
|
|
#[Column(type: 'smallint', enumType: BuildingFunctionEnum::class)] |
54
|
|
|
private BuildingFunctionEnum $building_function_id = BuildingFunctionEnum::BUILDING_FUNCTION_BASE_CAMP; |
55
|
|
|
|
56
|
|
|
#[Column(type: 'integer', nullable: true)] |
57
|
|
|
private ?int $mode = null; |
58
|
|
|
|
59
|
|
|
#[Column(type: 'integer', nullable: true)] |
60
|
|
|
private ?int $ship_id = null; |
|
|
|
|
61
|
|
|
|
62
|
|
|
#[ManyToOne(targetEntity: 'ShipBuildplan')] |
63
|
|
|
#[JoinColumn(name: 'buildplan_id', referencedColumnName: 'id', onDelete: 'CASCADE')] |
64
|
|
|
private ShipBuildplanInterface $shipBuildplan; |
65
|
|
|
|
66
|
|
|
#[ManyToOne(targetEntity: 'ShipRump')] |
67
|
|
|
#[JoinColumn(name: 'rump_id', referencedColumnName: 'id', onDelete: 'CASCADE')] |
68
|
|
|
private ShipRumpInterface $shipRump; |
69
|
|
|
|
70
|
|
|
#[ManyToOne(targetEntity: 'Colony')] |
71
|
|
|
#[JoinColumn(name: 'colony_id', referencedColumnName: 'id', onDelete: 'CASCADE')] |
72
|
|
|
private ColonyInterface $colony; |
73
|
|
|
|
74
|
|
|
#[OneToOne(targetEntity: 'Ship')] |
75
|
|
|
#[JoinColumn(name: 'ship_id', referencedColumnName: 'id', onDelete: 'CASCADE')] |
76
|
|
|
private ?ShipInterface $ship = null; |
77
|
|
|
|
78
|
|
|
#[Override] |
79
|
|
|
public function getId(): int |
80
|
|
|
{ |
81
|
|
|
return $this->id; |
82
|
|
|
} |
83
|
|
|
|
84
|
|
|
#[Override] |
85
|
|
|
public function getColony(): ColonyInterface |
86
|
|
|
{ |
87
|
|
|
return $this->colony; |
88
|
|
|
} |
89
|
|
|
|
90
|
|
|
#[Override] |
91
|
|
|
public function setColony(ColonyInterface $colony): ColonyShipQueueInterface |
92
|
|
|
{ |
93
|
|
|
$this->colony = $colony; |
94
|
|
|
return $this; |
95
|
|
|
} |
96
|
|
|
|
97
|
|
|
#[Override] |
98
|
|
|
public function getUserId(): int |
99
|
|
|
{ |
100
|
|
|
return $this->user_id; |
101
|
|
|
} |
102
|
|
|
|
103
|
|
|
#[Override] |
104
|
|
|
public function setUserId(int $userId): ColonyShipQueueInterface |
105
|
|
|
{ |
106
|
|
|
$this->user_id = $userId; |
107
|
|
|
|
108
|
|
|
return $this; |
109
|
|
|
} |
110
|
|
|
|
111
|
|
|
#[Override] |
112
|
|
|
public function getRumpId(): int |
113
|
|
|
{ |
114
|
|
|
return $this->rump_id; |
115
|
|
|
} |
116
|
|
|
|
117
|
|
|
#[Override] |
118
|
|
|
public function setRumpId(int $shipRumpId): ColonyShipQueueInterface |
119
|
|
|
{ |
120
|
|
|
$this->rump_id = $shipRumpId; |
121
|
|
|
|
122
|
|
|
return $this; |
123
|
|
|
} |
124
|
|
|
|
125
|
|
|
#[Override] |
126
|
|
|
public function getBuildtime(): int |
127
|
|
|
{ |
128
|
|
|
return $this->buildtime; |
129
|
|
|
} |
130
|
|
|
|
131
|
|
|
#[Override] |
132
|
|
|
public function setBuildtime(int $buildtime): ColonyShipQueueInterface |
133
|
|
|
{ |
134
|
|
|
$this->buildtime = $buildtime; |
135
|
|
|
|
136
|
|
|
return $this; |
137
|
|
|
} |
138
|
|
|
|
139
|
|
|
#[Override] |
140
|
|
|
public function getFinishDate(): int |
141
|
|
|
{ |
142
|
|
|
return $this->finish_date; |
143
|
|
|
} |
144
|
|
|
|
145
|
|
|
#[Override] |
146
|
|
|
public function setFinishDate(int $finishDate): ColonyShipQueueInterface |
147
|
|
|
{ |
148
|
|
|
$this->finish_date = $finishDate; |
149
|
|
|
|
150
|
|
|
return $this; |
151
|
|
|
} |
152
|
|
|
|
153
|
|
|
#[Override] |
154
|
|
|
public function getStopDate(): int |
155
|
|
|
{ |
156
|
|
|
return $this->stop_date; |
157
|
|
|
} |
158
|
|
|
|
159
|
|
|
#[Override] |
160
|
|
|
public function setStopDate(int $stopDate): ColonyShipQueueInterface |
161
|
|
|
{ |
162
|
|
|
$this->stop_date = $stopDate; |
163
|
|
|
|
164
|
|
|
return $this; |
165
|
|
|
} |
166
|
|
|
|
167
|
|
|
#[Override] |
168
|
|
|
public function setBuildingFunction(BuildingFunctionEnum $buildingFunction): ColonyShipQueueInterface |
169
|
|
|
{ |
170
|
|
|
$this->building_function_id = $buildingFunction; |
171
|
|
|
|
172
|
|
|
return $this; |
173
|
|
|
} |
174
|
|
|
|
175
|
|
|
#[Override] |
176
|
|
|
public function getRump(): ShipRumpInterface |
177
|
|
|
{ |
178
|
|
|
return $this->shipRump; |
179
|
|
|
} |
180
|
|
|
|
181
|
|
|
#[Override] |
182
|
|
|
public function setRump(ShipRumpInterface $shipRump): ColonyShipQueueInterface |
183
|
|
|
{ |
184
|
|
|
$this->shipRump = $shipRump; |
185
|
|
|
|
186
|
|
|
return $this; |
187
|
|
|
} |
188
|
|
|
|
189
|
|
|
#[Override] |
190
|
|
|
public function getShipBuildplan(): ShipBuildplanInterface |
191
|
|
|
{ |
192
|
|
|
return $this->shipBuildplan; |
193
|
|
|
} |
194
|
|
|
|
195
|
|
|
#[Override] |
196
|
|
|
public function setShipBuildplan(ShipBuildplanInterface $shipBuildplan): ColonyShipQueueInterface |
197
|
|
|
{ |
198
|
|
|
$this->shipBuildplan = $shipBuildplan; |
199
|
|
|
|
200
|
|
|
return $this; |
201
|
|
|
} |
202
|
|
|
|
203
|
|
|
|
204
|
|
|
#[Override] |
205
|
|
|
public function getMode(): ?int |
206
|
|
|
{ |
207
|
|
|
return $this->mode; |
208
|
|
|
} |
209
|
|
|
|
210
|
|
|
#[Override] |
211
|
|
|
public function setMode(?int $mode): ColonyShipQueueInterface |
212
|
|
|
{ |
213
|
|
|
$this->mode = $mode; |
214
|
|
|
return $this; |
215
|
|
|
} |
216
|
|
|
|
217
|
|
|
#[Override] |
218
|
|
|
public function getShip(): ?ShipInterface |
219
|
|
|
{ |
220
|
|
|
return $this->ship; |
221
|
|
|
} |
222
|
|
|
|
223
|
|
|
#[Override] |
224
|
|
|
public function setShip(?ShipInterface $ship): ColonyShipQueueInterface |
225
|
|
|
{ |
226
|
|
|
$this->ship = $ship; |
227
|
|
|
return $this; |
228
|
|
|
} |
229
|
|
|
} |
230
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths