1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
namespace VasilDakov\Speedy\Model; |
6
|
|
|
|
7
|
|
|
use JMS\Serializer\Annotation as Serializer; |
8
|
|
|
use VasilDakov\Speedy\ToArray; |
9
|
|
|
|
10
|
|
|
/** |
11
|
|
|
* Class Site |
12
|
|
|
* |
13
|
|
|
* @author Vasil Dakov <[email protected]> |
14
|
|
|
* @copyright 2009-2022 Neutrino.bg |
15
|
|
|
* @version 1.0 |
16
|
|
|
* @psalm-suppress MissingConstructor |
17
|
|
|
* @Serializer\AccessType("public_method") |
18
|
|
|
*/ |
19
|
|
|
class Site |
20
|
|
|
{ |
21
|
|
|
use ToArray; |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* @var int|null |
25
|
|
|
* @Serializer\Type("integer") |
26
|
|
|
*/ |
27
|
|
|
private ?int $id; |
28
|
|
|
|
29
|
|
|
/** |
30
|
|
|
* @var int|null |
31
|
|
|
* @Serializer\Type("integer") |
32
|
|
|
*/ |
33
|
|
|
private ?int $countryId; |
34
|
|
|
|
35
|
|
|
/** |
36
|
|
|
* @var int|null |
37
|
|
|
* @Serializer\Type("integer") |
38
|
|
|
*/ |
39
|
|
|
private ?int $mainSiteId; |
40
|
|
|
|
41
|
|
|
/** |
42
|
|
|
* @var string|null |
43
|
|
|
* @Serializer\Type("string") |
44
|
|
|
*/ |
45
|
|
|
private ?string $type; |
46
|
|
|
|
47
|
|
|
/** |
48
|
|
|
* @var string|null |
49
|
|
|
* @Serializer\Type("string") |
50
|
|
|
*/ |
51
|
|
|
private ?string $typeEn; |
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* @var string|null |
55
|
|
|
* @Serializer\Type("string") |
56
|
|
|
*/ |
57
|
|
|
private ?string $name; |
58
|
|
|
|
59
|
|
|
/** |
60
|
|
|
* @var string|null |
61
|
|
|
* @Serializer\Type("string") |
62
|
|
|
*/ |
63
|
|
|
private ?string $nameEn; |
64
|
|
|
|
65
|
|
|
/** |
66
|
|
|
* @var string|null |
67
|
|
|
* @Serializer\Type("string") |
68
|
|
|
*/ |
69
|
|
|
private ?string $municipality; |
70
|
|
|
|
71
|
|
|
/** |
72
|
|
|
* @var string|null |
73
|
|
|
* @Serializer\Type("string") |
74
|
|
|
*/ |
75
|
|
|
private ?string $municipalityEn; |
76
|
|
|
|
77
|
|
|
/** |
78
|
|
|
* @var string|null |
79
|
|
|
* @Serializer\Type("string") |
80
|
|
|
*/ |
81
|
|
|
private ?string $region; |
82
|
|
|
|
83
|
|
|
/** |
84
|
|
|
* @var string|null |
85
|
|
|
* @Serializer\Type("string") |
86
|
|
|
*/ |
87
|
|
|
private ?string $regionEn; |
88
|
|
|
|
89
|
|
|
/** |
90
|
|
|
* @var string|null |
91
|
|
|
* @Serializer\Type("string") |
92
|
|
|
*/ |
93
|
|
|
private ?string $postCode; |
94
|
|
|
|
95
|
|
|
/** |
96
|
|
|
* @var int|null |
97
|
|
|
* @Serializer\Type("integer") |
98
|
|
|
*/ |
99
|
|
|
private ?int $addressNomenclature; |
100
|
|
|
|
101
|
|
|
/** |
102
|
|
|
* @var float|null |
103
|
|
|
* @Serializer\Type("float") |
104
|
|
|
*/ |
105
|
|
|
private ?float $x; |
106
|
|
|
|
107
|
|
|
/** |
108
|
|
|
* @var float|null |
109
|
|
|
* @Serializer\Type("float") |
110
|
|
|
*/ |
111
|
|
|
private ?float $y; |
112
|
|
|
|
113
|
|
|
/** |
114
|
|
|
* @var string|null |
115
|
|
|
* @Serializer\Type("string") |
116
|
|
|
*/ |
117
|
|
|
private ?string $servingDays; |
118
|
|
|
|
119
|
|
|
/** |
120
|
|
|
* @var int|null |
121
|
|
|
* @Serializer\Type("integer") |
122
|
|
|
*/ |
123
|
|
|
private ?int $servingOfficeId; |
124
|
|
|
|
125
|
|
|
/** |
126
|
|
|
* @var int|null |
127
|
|
|
* @Serializer\Type("integer") |
128
|
|
|
*/ |
129
|
|
|
private ?int $servingHubOfficeId; |
130
|
|
|
|
131
|
|
|
/** |
132
|
|
|
* @return int|null |
133
|
|
|
*/ |
134
|
1 |
|
public function getId(): ?int |
135
|
|
|
{ |
136
|
1 |
|
return $this->id; |
137
|
|
|
} |
138
|
|
|
|
139
|
|
|
/** |
140
|
|
|
* @param int|null $id |
141
|
|
|
*/ |
142
|
1 |
|
public function setId(?int $id): void |
143
|
|
|
{ |
144
|
1 |
|
$this->id = $id; |
145
|
|
|
} |
146
|
|
|
|
147
|
|
|
/** |
148
|
|
|
* @return int|null |
149
|
|
|
*/ |
150
|
1 |
|
public function getCountryId(): ?int |
151
|
|
|
{ |
152
|
1 |
|
return $this->countryId; |
153
|
|
|
} |
154
|
|
|
|
155
|
|
|
/** |
156
|
|
|
* @param int|null $countryId |
157
|
|
|
*/ |
158
|
1 |
|
public function setCountryId(?int $countryId): void |
159
|
|
|
{ |
160
|
1 |
|
$this->countryId = $countryId; |
161
|
|
|
} |
162
|
|
|
|
163
|
|
|
/** |
164
|
|
|
* @return int|null |
165
|
|
|
*/ |
166
|
1 |
|
public function getMainSiteId(): ?int |
167
|
|
|
{ |
168
|
1 |
|
return $this->mainSiteId; |
169
|
|
|
} |
170
|
|
|
|
171
|
|
|
/** |
172
|
|
|
* @param int|null $mainSiteId |
173
|
|
|
*/ |
174
|
1 |
|
public function setMainSiteId(?int $mainSiteId): void |
175
|
|
|
{ |
176
|
1 |
|
$this->mainSiteId = $mainSiteId; |
177
|
|
|
} |
178
|
|
|
|
179
|
|
|
/** |
180
|
|
|
* @return string|null |
181
|
|
|
*/ |
182
|
1 |
|
public function getType(): ?string |
183
|
|
|
{ |
184
|
1 |
|
return $this->type; |
185
|
|
|
} |
186
|
|
|
|
187
|
|
|
/** |
188
|
|
|
* @param string|null $type |
189
|
|
|
*/ |
190
|
1 |
|
public function setType(?string $type): void |
191
|
|
|
{ |
192
|
1 |
|
$this->type = $type; |
193
|
|
|
} |
194
|
|
|
|
195
|
|
|
/** |
196
|
|
|
* @return string|null |
197
|
|
|
*/ |
198
|
1 |
|
public function getTypeEn(): ?string |
199
|
|
|
{ |
200
|
1 |
|
return $this->typeEn; |
201
|
|
|
} |
202
|
|
|
|
203
|
|
|
/** |
204
|
|
|
* @param string|null $typeEn |
205
|
|
|
*/ |
206
|
1 |
|
public function setTypeEn(?string $typeEn): void |
207
|
|
|
{ |
208
|
1 |
|
$this->typeEn = $typeEn; |
209
|
|
|
} |
210
|
|
|
|
211
|
|
|
/** |
212
|
|
|
* @return string|null |
213
|
|
|
*/ |
214
|
1 |
|
public function getName(): ?string |
215
|
|
|
{ |
216
|
1 |
|
return $this->name; |
217
|
|
|
} |
218
|
|
|
|
219
|
|
|
/** |
220
|
|
|
* @param string|null $name |
221
|
|
|
*/ |
222
|
1 |
|
public function setName(?string $name): void |
223
|
|
|
{ |
224
|
1 |
|
$this->name = $name; |
225
|
|
|
} |
226
|
|
|
|
227
|
|
|
/** |
228
|
|
|
* @return string|null |
229
|
|
|
*/ |
230
|
1 |
|
public function getNameEn(): ?string |
231
|
|
|
{ |
232
|
1 |
|
return $this->nameEn; |
233
|
|
|
} |
234
|
|
|
|
235
|
|
|
/** |
236
|
|
|
* @param string|null $nameEn |
237
|
|
|
*/ |
238
|
1 |
|
public function setNameEn(?string $nameEn): void |
239
|
|
|
{ |
240
|
1 |
|
$this->nameEn = $nameEn; |
241
|
|
|
} |
242
|
|
|
|
243
|
|
|
/** |
244
|
|
|
* @return string|null |
245
|
|
|
*/ |
246
|
1 |
|
public function getMunicipality(): ?string |
247
|
|
|
{ |
248
|
1 |
|
return $this->municipality; |
249
|
|
|
} |
250
|
|
|
|
251
|
|
|
/** |
252
|
|
|
* @param string|null $municipality |
253
|
|
|
*/ |
254
|
1 |
|
public function setMunicipality(?string $municipality): void |
255
|
|
|
{ |
256
|
1 |
|
$this->municipality = $municipality; |
257
|
|
|
} |
258
|
|
|
|
259
|
|
|
/** |
260
|
|
|
* @return string|null |
261
|
|
|
*/ |
262
|
1 |
|
public function getMunicipalityEn(): ?string |
263
|
|
|
{ |
264
|
1 |
|
return $this->municipalityEn; |
265
|
|
|
} |
266
|
|
|
|
267
|
|
|
/** |
268
|
|
|
* @param string|null $municipalityEn |
269
|
|
|
*/ |
270
|
1 |
|
public function setMunicipalityEn(?string $municipalityEn): void |
271
|
|
|
{ |
272
|
1 |
|
$this->municipalityEn = $municipalityEn; |
273
|
|
|
} |
274
|
|
|
|
275
|
|
|
/** |
276
|
|
|
* @return string|null |
277
|
|
|
*/ |
278
|
1 |
|
public function getRegion(): ?string |
279
|
|
|
{ |
280
|
1 |
|
return $this->region; |
281
|
|
|
} |
282
|
|
|
|
283
|
|
|
/** |
284
|
|
|
* @param string|null $region |
285
|
|
|
*/ |
286
|
1 |
|
public function setRegion(?string $region): void |
287
|
|
|
{ |
288
|
1 |
|
$this->region = $region; |
289
|
|
|
} |
290
|
|
|
|
291
|
|
|
/** |
292
|
|
|
* @return string|null |
293
|
|
|
*/ |
294
|
1 |
|
public function getRegionEn(): ?string |
295
|
|
|
{ |
296
|
1 |
|
return $this->regionEn; |
297
|
|
|
} |
298
|
|
|
|
299
|
|
|
/** |
300
|
|
|
* @param string|null $regionEn |
301
|
|
|
*/ |
302
|
1 |
|
public function setRegionEn(?string $regionEn): void |
303
|
|
|
{ |
304
|
1 |
|
$this->regionEn = $regionEn; |
305
|
|
|
} |
306
|
|
|
|
307
|
|
|
/** |
308
|
|
|
* @return string|null |
309
|
|
|
*/ |
310
|
1 |
|
public function getPostCode(): ?string |
311
|
|
|
{ |
312
|
1 |
|
return $this->postCode; |
313
|
|
|
} |
314
|
|
|
|
315
|
|
|
/** |
316
|
|
|
* @param string|null $postCode |
317
|
|
|
*/ |
318
|
1 |
|
public function setPostCode(?string $postCode): void |
319
|
|
|
{ |
320
|
1 |
|
$this->postCode = $postCode; |
321
|
|
|
} |
322
|
|
|
|
323
|
|
|
/** |
324
|
|
|
* @return int|null |
325
|
|
|
*/ |
326
|
1 |
|
public function getAddressNomenclature(): ?int |
327
|
|
|
{ |
328
|
1 |
|
return $this->addressNomenclature; |
329
|
|
|
} |
330
|
|
|
|
331
|
|
|
/** |
332
|
|
|
* @param int|null $addressNomenclature |
333
|
|
|
*/ |
334
|
1 |
|
public function setAddressNomenclature(?int $addressNomenclature): void |
335
|
|
|
{ |
336
|
1 |
|
$this->addressNomenclature = $addressNomenclature; |
337
|
|
|
} |
338
|
|
|
|
339
|
|
|
/** |
340
|
|
|
* @return float|int |
341
|
|
|
*/ |
342
|
1 |
|
public function getX() |
343
|
|
|
{ |
344
|
1 |
|
return $this->x; |
345
|
|
|
} |
346
|
|
|
|
347
|
|
|
/** |
348
|
|
|
* @param float|int $x |
349
|
|
|
*/ |
350
|
1 |
|
public function setX($x): void |
351
|
|
|
{ |
352
|
1 |
|
$this->x = $x; |
353
|
|
|
} |
354
|
|
|
|
355
|
|
|
/** |
356
|
|
|
* @return float|null |
357
|
|
|
*/ |
358
|
1 |
|
public function getY(): ?float |
359
|
|
|
{ |
360
|
1 |
|
return $this->y; |
361
|
|
|
} |
362
|
|
|
|
363
|
|
|
/** |
364
|
|
|
* @param float|null $y |
365
|
|
|
*/ |
366
|
1 |
|
public function setY(?float $y): void |
367
|
|
|
{ |
368
|
1 |
|
$this->y = $y; |
369
|
|
|
} |
370
|
|
|
|
371
|
|
|
/** |
372
|
|
|
* @return string|null |
373
|
|
|
*/ |
374
|
1 |
|
public function getServingDays(): ?string |
375
|
|
|
{ |
376
|
1 |
|
return $this->servingDays; |
377
|
|
|
} |
378
|
|
|
|
379
|
|
|
/** |
380
|
|
|
* @param string|null $servingDays |
381
|
|
|
*/ |
382
|
1 |
|
public function setServingDays(?string $servingDays): void |
383
|
|
|
{ |
384
|
1 |
|
$this->servingDays = $servingDays; |
385
|
|
|
} |
386
|
|
|
|
387
|
|
|
/** |
388
|
|
|
* @return int|null |
389
|
|
|
*/ |
390
|
1 |
|
public function getServingOfficeId(): ?int |
391
|
|
|
{ |
392
|
1 |
|
return $this->servingOfficeId; |
393
|
|
|
} |
394
|
|
|
|
395
|
|
|
/** |
396
|
|
|
* @param int|null $servingOfficeId |
397
|
|
|
*/ |
398
|
1 |
|
public function setServingOfficeId(?int $servingOfficeId): void |
399
|
|
|
{ |
400
|
1 |
|
$this->servingOfficeId = $servingOfficeId; |
401
|
|
|
} |
402
|
|
|
|
403
|
|
|
/** |
404
|
|
|
* @return int|null |
405
|
|
|
*/ |
406
|
1 |
|
public function getServingHubOfficeId(): ?int |
407
|
|
|
{ |
408
|
1 |
|
return $this->servingHubOfficeId; |
409
|
|
|
} |
410
|
|
|
|
411
|
|
|
/** |
412
|
|
|
* @param int|null $servingHubOfficeId |
413
|
|
|
*/ |
414
|
1 |
|
public function setServingHubOfficeId(?int $servingHubOfficeId): void |
415
|
|
|
{ |
416
|
1 |
|
$this->servingHubOfficeId = $servingHubOfficeId; |
417
|
|
|
} |
418
|
|
|
|
419
|
|
|
/** |
420
|
|
|
* @return array |
421
|
|
|
*/ |
422
|
1 |
|
public function toArray(): array |
423
|
|
|
{ |
424
|
1 |
|
return [ ]; |
425
|
|
|
} |
426
|
|
|
} |
427
|
|
|
|