1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace ControleOnline\Entity; |
4
|
|
|
|
5
|
|
|
use Doctrine\ORM\Mapping as ORM; |
|
|
|
|
6
|
|
|
|
7
|
|
|
|
8
|
|
|
|
9
|
|
|
use ApiPlatform\Core\Annotation\ApiResource; |
|
|
|
|
10
|
|
|
use Symfony\Component\Serializer\Annotation\Groups; |
|
|
|
|
11
|
|
|
use ApiPlatform\Core\Annotation\ApiFilter; |
|
|
|
|
12
|
|
|
use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter; |
|
|
|
|
13
|
|
|
|
14
|
|
|
|
15
|
|
|
/** |
16
|
|
|
* @ORM\EntityListeners({ControleOnline\Listener\LogListener::class}) |
17
|
|
|
* @ApiResource( |
18
|
|
|
* attributes={ |
19
|
|
|
* "formats"={"jsonld", "json", "html", "jsonhal", "csv"={"text/csv"}}, |
20
|
|
|
* "access_control"="is_granted('ROLE_CLIENT')" |
21
|
|
|
* }, |
22
|
|
|
* normalizationContext ={"groups"={"display:read"}}, |
23
|
|
|
* denormalizationContext={"groups"={"display:write"}}, |
24
|
|
|
* attributes ={"access_control"="is_granted('ROLE_CLIENT')"}, |
25
|
|
|
* collectionOperations ={ |
26
|
|
|
* "get" ={ |
27
|
|
|
* "access_control"="is_granted('ROLE_CLIENT')", |
28
|
|
|
* }, |
29
|
|
|
* "post" ={ |
30
|
|
|
* "access_control"="is_granted('ROLE_CLIENT')", |
31
|
|
|
* }, |
32
|
|
|
* }, |
33
|
|
|
* itemOperations ={ |
34
|
|
|
* "get" ={ |
35
|
|
|
* "access_control"="is_granted('ROLE_CLIENT')", |
36
|
|
|
* }, |
37
|
|
|
* "put" ={ |
38
|
|
|
* "access_control"="is_granted('ROLE_CLIENT')", |
39
|
|
|
* }, |
40
|
|
|
* "delete" ={ |
41
|
|
|
* "access_control"="is_granted('ROLE_CLIENT')", |
42
|
|
|
* }, |
43
|
|
|
* } |
44
|
|
|
* ) |
45
|
|
|
* @ApiFilter( |
46
|
|
|
* SearchFilter::class, properties={ |
47
|
|
|
* "displayQueue.queue.orderProductQueue.status.realStatus": "exact", |
48
|
|
|
* "displayQueue.queue.orderProductQueue.status.status": "exact", |
49
|
|
|
* } |
50
|
|
|
* ) |
51
|
|
|
* @ORM\Table(name="display", indexes={@ORM\Index(name="company_id", columns={"company_id"})}) |
52
|
|
|
* @ORM\Entity |
53
|
|
|
*/ |
54
|
|
|
|
55
|
|
|
class Display |
56
|
|
|
{ |
57
|
|
|
/** |
58
|
|
|
* @var int |
59
|
|
|
* |
60
|
|
|
* @ORM\Column(name="id", type="integer", nullable=false) |
61
|
|
|
* @ORM\Id |
62
|
|
|
* @ORM\GeneratedValue(strategy="IDENTITY") |
63
|
|
|
* @Groups({"display_queue:read","order:read","order_details:read","order:write","display:read", "display:write"}) |
64
|
|
|
*/ |
65
|
|
|
private $id; |
66
|
|
|
|
67
|
|
|
/** |
68
|
|
|
* @var string |
69
|
|
|
* |
70
|
|
|
* @ORM\Column(name="display", type="string", length=50, nullable=false) |
71
|
|
|
* @Groups({"display_queue:read","order:read","order_details:read","order:write","display:read", "display:write"}) |
72
|
|
|
*/ |
73
|
|
|
private $display; |
74
|
|
|
|
75
|
|
|
/** |
76
|
|
|
* @var string |
77
|
|
|
* |
78
|
|
|
* @ORM\Column(name="display_type", type="string", length=0, nullable=false, options={"default"="'display'"}) |
79
|
|
|
* @Groups({"display_queue:read","order:read","order_details:read","order:write","display:read", "display:write"}) |
80
|
|
|
*/ |
81
|
|
|
private $displayType = '\'display\''; |
82
|
|
|
|
83
|
|
|
/** |
84
|
|
|
* @var \People |
|
|
|
|
85
|
|
|
* |
86
|
|
|
* @ORM\ManyToOne(targetEntity="People") |
87
|
|
|
* @ORM\JoinColumns({ |
88
|
|
|
* @ORM\JoinColumn(name="company_id", referencedColumnName="id") |
89
|
|
|
* }) |
90
|
|
|
* @Groups({"display_queue:read","order:read","order_details:read","order:write","display:read", "display:write"}) |
91
|
|
|
*/ |
92
|
|
|
private $company; |
93
|
|
|
|
94
|
|
|
|
95
|
|
|
/** |
96
|
|
|
* @var \Doctrine\Common\Collections\Collection |
|
|
|
|
97
|
|
|
* |
98
|
|
|
* @ORM\OneToMany(targetEntity="ControleOnline\Entity\DisplayQueue", mappedBy="display") |
99
|
|
|
*/ |
100
|
|
|
private $displayQueue; |
101
|
|
|
|
102
|
|
|
/** |
103
|
|
|
* @var ControleOnline\Entity\Status |
|
|
|
|
104
|
|
|
* |
105
|
|
|
* @ORM\ManyToOne(targetEntity="ControleOnline\Entity\Status") |
106
|
|
|
* @ORM\JoinColumns({ |
107
|
|
|
* @ORM\JoinColumn(name="status_in_id", referencedColumnName="id") |
108
|
|
|
* }) |
109
|
|
|
* @Groups({"order:read","order_details:read","order:write","order_product_queue:read", "order_product_queue:write"}) |
110
|
|
|
*/ |
111
|
|
|
|
112
|
|
|
|
113
|
|
|
#[ApiFilter(filterClass: SearchFilter::class, properties: ['status_in' => 'exact'])] |
114
|
|
|
|
115
|
|
|
private $status_in; |
116
|
|
|
/** |
117
|
|
|
* @var ControleOnline\Entity\Status |
118
|
|
|
* |
119
|
|
|
* @ORM\ManyToOne(targetEntity="ControleOnline\Entity\Status") |
120
|
|
|
* @ORM\JoinColumns({ |
121
|
|
|
* @ORM\JoinColumn(name="status_working_id", referencedColumnName="id") |
122
|
|
|
* }) |
123
|
|
|
* @Groups({"order:read","order_details:read","order:write","order_product_queue:read", "order_product_queue:write"}) |
124
|
|
|
*/ |
125
|
|
|
|
126
|
|
|
|
127
|
|
|
#[ApiFilter(filterClass: SearchFilter::class, properties: ['status_working' => 'exact'])] |
128
|
|
|
|
129
|
|
|
private $status_working; |
130
|
|
|
/** |
131
|
|
|
* @var ControleOnline\Entity\Status |
132
|
|
|
* |
133
|
|
|
* @ORM\ManyToOne(targetEntity="ControleOnline\Entity\Status") |
134
|
|
|
* @ORM\JoinColumns({ |
135
|
|
|
* @ORM\JoinColumn(name="status_out_id", referencedColumnName="id") |
136
|
|
|
* }) |
137
|
|
|
* @Groups({"order:read","order_details:read","order:write","order_product_queue:read", "order_product_queue:write"}) |
138
|
|
|
*/ |
139
|
|
|
|
140
|
|
|
|
141
|
|
|
#[ApiFilter(filterClass: SearchFilter::class, properties: ['status_out' => 'exact'])] |
142
|
|
|
|
143
|
|
|
private $status_out; |
144
|
|
|
|
145
|
|
|
|
146
|
|
|
/** |
147
|
|
|
* Get the value of id |
148
|
|
|
*/ |
149
|
|
|
public function getId() |
150
|
|
|
{ |
151
|
|
|
return $this->id; |
152
|
|
|
} |
153
|
|
|
|
154
|
|
|
/** |
155
|
|
|
* Set the value of id |
156
|
|
|
*/ |
157
|
|
|
public function setId($id): self |
158
|
|
|
{ |
159
|
|
|
$this->id = $id; |
160
|
|
|
|
161
|
|
|
return $this; |
162
|
|
|
} |
163
|
|
|
|
164
|
|
|
/** |
165
|
|
|
* Get the value of display |
166
|
|
|
*/ |
167
|
|
|
public function getDisplay() |
168
|
|
|
{ |
169
|
|
|
return $this->display; |
170
|
|
|
} |
171
|
|
|
|
172
|
|
|
/** |
173
|
|
|
* Set the value of display |
174
|
|
|
*/ |
175
|
|
|
public function setDisplay($display): self |
176
|
|
|
{ |
177
|
|
|
$this->display = $display; |
178
|
|
|
|
179
|
|
|
return $this; |
180
|
|
|
} |
181
|
|
|
|
182
|
|
|
/** |
183
|
|
|
* Get the value of displayType |
184
|
|
|
*/ |
185
|
|
|
public function getDisplayType() |
186
|
|
|
{ |
187
|
|
|
return $this->displayType; |
188
|
|
|
} |
189
|
|
|
|
190
|
|
|
/** |
191
|
|
|
* Set the value of displayType |
192
|
|
|
*/ |
193
|
|
|
public function setDisplayType($displayType): self |
194
|
|
|
{ |
195
|
|
|
$this->displayType = $displayType; |
196
|
|
|
|
197
|
|
|
return $this; |
198
|
|
|
} |
199
|
|
|
|
200
|
|
|
/** |
201
|
|
|
* Get the value of company |
202
|
|
|
*/ |
203
|
|
|
public function getCompany() |
204
|
|
|
{ |
205
|
|
|
return $this->company; |
206
|
|
|
} |
207
|
|
|
|
208
|
|
|
/** |
209
|
|
|
* Set the value of company |
210
|
|
|
*/ |
211
|
|
|
public function setCompany($company): self |
212
|
|
|
{ |
213
|
|
|
$this->company = $company; |
214
|
|
|
|
215
|
|
|
return $this; |
216
|
|
|
} |
217
|
|
|
|
218
|
|
|
|
219
|
|
|
|
220
|
|
|
/** |
221
|
|
|
* Add DisplayQueue |
222
|
|
|
* |
223
|
|
|
* @param \ControleOnline\Entity\DisplayQueue $invoice_tax |
224
|
|
|
* @return Order |
225
|
|
|
*/ |
226
|
|
|
public function addADisplayQueue(\ControleOnline\Entity\DisplayQueue $displayQueue) |
227
|
|
|
{ |
228
|
|
|
$this->displayQueue[] = $displayQueue; |
229
|
|
|
|
230
|
|
|
return $this; |
|
|
|
|
231
|
|
|
} |
232
|
|
|
|
233
|
|
|
/** |
234
|
|
|
* Remove DisplayQueue |
235
|
|
|
* |
236
|
|
|
* @param \ControleOnline\Entity\DisplayQueue $invoice_tax |
237
|
|
|
*/ |
238
|
|
|
public function removeDisplayQueue(\ControleOnline\Entity\DisplayQueue $displayQueue) |
239
|
|
|
{ |
240
|
|
|
$this->displayQueue->removeElement($displayQueue); |
241
|
|
|
} |
242
|
|
|
|
243
|
|
|
/** |
244
|
|
|
* Get DisplayQueue |
245
|
|
|
* |
246
|
|
|
* @return \Doctrine\Common\Collections\Collection |
247
|
|
|
*/ |
248
|
|
|
public function getDisplayQueue() |
249
|
|
|
{ |
250
|
|
|
return $this->displayQueue; |
251
|
|
|
} |
252
|
|
|
|
253
|
|
|
/** |
254
|
|
|
* Get the value of status_in |
255
|
|
|
*/ |
256
|
|
|
public function getStatusIn() |
257
|
|
|
{ |
258
|
|
|
return $this->status_in; |
259
|
|
|
} |
260
|
|
|
|
261
|
|
|
/** |
262
|
|
|
* Set the value of status_in |
263
|
|
|
*/ |
264
|
|
|
public function setStatusIn($status_in): self |
265
|
|
|
{ |
266
|
|
|
$this->status_in = $status_in; |
267
|
|
|
|
268
|
|
|
return $this; |
269
|
|
|
} |
270
|
|
|
|
271
|
|
|
/** |
272
|
|
|
* Get the value of status_working |
273
|
|
|
*/ |
274
|
|
|
public function getStatusWorking() |
275
|
|
|
{ |
276
|
|
|
return $this->status_working; |
277
|
|
|
} |
278
|
|
|
|
279
|
|
|
/** |
280
|
|
|
* Set the value of status_working |
281
|
|
|
*/ |
282
|
|
|
public function setStatusWorking($status_working): self |
283
|
|
|
{ |
284
|
|
|
$this->status_working = $status_working; |
285
|
|
|
|
286
|
|
|
return $this; |
287
|
|
|
} |
288
|
|
|
|
289
|
|
|
/** |
290
|
|
|
* Get the value of status_out |
291
|
|
|
*/ |
292
|
|
|
public function getStatusOut() |
293
|
|
|
{ |
294
|
|
|
return $this->status_out; |
295
|
|
|
} |
296
|
|
|
|
297
|
|
|
/** |
298
|
|
|
* Set the value of status_out |
299
|
|
|
*/ |
300
|
|
|
public function setStatusOut($status_out): self |
301
|
|
|
{ |
302
|
|
|
$this->status_out = $status_out; |
303
|
|
|
|
304
|
|
|
return $this; |
305
|
|
|
} |
306
|
|
|
} |
307
|
|
|
|
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