|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
declare(strict_types=1); |
|
4
|
|
|
|
|
5
|
|
|
namespace VasilDakov\Speedy\Model; |
|
6
|
|
|
|
|
7
|
|
|
use Doctrine\Common\Collections\ArrayCollection; |
|
8
|
|
|
use JMS\Serializer\Annotation as Serializer; |
|
9
|
|
|
|
|
10
|
|
|
/** |
|
11
|
|
|
* Class Content. |
|
12
|
|
|
* |
|
13
|
|
|
* @Serializer\AccessType("public_method") |
|
14
|
|
|
* |
|
15
|
|
|
* @author Vasil Dakov <[email protected]> |
|
16
|
|
|
* @copyright 2009-2022 Neutrino.bg |
|
17
|
|
|
* |
|
18
|
|
|
* @version 1.0 |
|
19
|
|
|
* |
|
20
|
|
|
* @psalm-suppress MissingConstructor |
|
21
|
|
|
*/ |
|
22
|
|
|
class Content |
|
23
|
|
|
{ |
|
24
|
|
|
/** |
|
25
|
|
|
* @Serializer\Type("int") |
|
26
|
|
|
*/ |
|
27
|
|
|
private int $parcelsCount; |
|
28
|
|
|
|
|
29
|
|
|
/** |
|
30
|
|
|
* @Serializer\Type("float") |
|
31
|
|
|
*/ |
|
32
|
|
|
private float $declaredWeight; |
|
33
|
|
|
|
|
34
|
|
|
/** |
|
35
|
|
|
* @Serializer\Type("float") |
|
36
|
|
|
*/ |
|
37
|
|
|
private float $measuredWeight; |
|
38
|
|
|
|
|
39
|
|
|
/** |
|
40
|
|
|
* @Serializer\Type("float") |
|
41
|
|
|
*/ |
|
42
|
|
|
private float $calculationWeight; |
|
43
|
|
|
|
|
44
|
|
|
/** |
|
45
|
|
|
* @Serializer\Type("string") |
|
46
|
|
|
*/ |
|
47
|
|
|
private string $contents; |
|
48
|
|
|
|
|
49
|
|
|
/** |
|
50
|
|
|
* @Serializer\Type("string") |
|
51
|
|
|
*/ |
|
52
|
|
|
private string $package; |
|
53
|
|
|
|
|
54
|
|
|
/** |
|
55
|
|
|
* @Serializer\Type("bool") |
|
56
|
|
|
*/ |
|
57
|
|
|
private bool $documents; |
|
58
|
|
|
|
|
59
|
|
|
/** |
|
60
|
|
|
* @Serializer\Type("bool") |
|
61
|
|
|
*/ |
|
62
|
|
|
private bool $palletized; |
|
63
|
|
|
|
|
64
|
|
|
/** |
|
65
|
|
|
* @Serializer\Type("ArrayCollection<VasilDakov\Speedy\Model\Parcel>") |
|
66
|
|
|
*/ |
|
67
|
|
|
private ArrayCollection $parcels; |
|
68
|
|
|
|
|
69
|
|
|
/** |
|
70
|
|
|
* @Serializer\Type("bool") |
|
71
|
|
|
*/ |
|
72
|
|
|
private bool $pendingParcels; |
|
73
|
|
|
|
|
74
|
1 |
|
public function getParcelsCount(): int |
|
75
|
|
|
{ |
|
76
|
1 |
|
return $this->parcelsCount; |
|
77
|
|
|
} |
|
78
|
|
|
|
|
79
|
1 |
|
public function setParcelsCount(int $parcelsCount): void |
|
80
|
|
|
{ |
|
81
|
1 |
|
$this->parcelsCount = $parcelsCount; |
|
82
|
|
|
} |
|
83
|
|
|
|
|
84
|
1 |
|
public function getDeclaredWeight(): float |
|
85
|
|
|
{ |
|
86
|
1 |
|
return $this->declaredWeight; |
|
87
|
|
|
} |
|
88
|
|
|
|
|
89
|
1 |
|
public function setDeclaredWeight(float $declaredWeight): void |
|
90
|
|
|
{ |
|
91
|
1 |
|
$this->declaredWeight = $declaredWeight; |
|
92
|
|
|
} |
|
93
|
|
|
|
|
94
|
1 |
|
public function getMeasuredWeight(): float |
|
95
|
|
|
{ |
|
96
|
1 |
|
return $this->measuredWeight; |
|
97
|
|
|
} |
|
98
|
|
|
|
|
99
|
1 |
|
public function setMeasuredWeight(float $measuredWeight): void |
|
100
|
|
|
{ |
|
101
|
1 |
|
$this->measuredWeight = $measuredWeight; |
|
102
|
|
|
} |
|
103
|
|
|
|
|
104
|
1 |
|
public function getCalculationWeight(): float |
|
105
|
|
|
{ |
|
106
|
1 |
|
return $this->calculationWeight; |
|
107
|
|
|
} |
|
108
|
|
|
|
|
109
|
1 |
|
public function setCalculationWeight(float $calculationWeight): void |
|
110
|
|
|
{ |
|
111
|
1 |
|
$this->calculationWeight = $calculationWeight; |
|
112
|
|
|
} |
|
113
|
|
|
|
|
114
|
1 |
|
public function getContents(): string |
|
115
|
|
|
{ |
|
116
|
1 |
|
return $this->contents; |
|
117
|
|
|
} |
|
118
|
|
|
|
|
119
|
1 |
|
public function setContents(string $contents): void |
|
120
|
|
|
{ |
|
121
|
1 |
|
$this->contents = $contents; |
|
122
|
|
|
} |
|
123
|
|
|
|
|
124
|
1 |
|
public function getPackage(): string |
|
125
|
|
|
{ |
|
126
|
1 |
|
return $this->package; |
|
127
|
|
|
} |
|
128
|
|
|
|
|
129
|
1 |
|
public function setPackage(string $package): void |
|
130
|
|
|
{ |
|
131
|
1 |
|
$this->package = $package; |
|
132
|
|
|
} |
|
133
|
|
|
|
|
134
|
1 |
|
public function isDocuments(): bool |
|
135
|
|
|
{ |
|
136
|
1 |
|
return $this->documents; |
|
137
|
|
|
} |
|
138
|
|
|
|
|
139
|
1 |
|
public function setDocuments(bool $documents): void |
|
140
|
|
|
{ |
|
141
|
1 |
|
$this->documents = $documents; |
|
142
|
|
|
} |
|
143
|
|
|
|
|
144
|
1 |
|
public function isPalletized(): bool |
|
145
|
|
|
{ |
|
146
|
1 |
|
return $this->palletized; |
|
147
|
|
|
} |
|
148
|
|
|
|
|
149
|
1 |
|
public function setPalletized(bool $palletized): void |
|
150
|
|
|
{ |
|
151
|
1 |
|
$this->palletized = $palletized; |
|
152
|
|
|
} |
|
153
|
|
|
|
|
154
|
|
|
public function getParcels(): ArrayCollection |
|
155
|
|
|
{ |
|
156
|
|
|
return $this->parcels; |
|
157
|
|
|
} |
|
158
|
|
|
|
|
159
|
1 |
|
public function setParcels(ArrayCollection $parcels): void |
|
160
|
|
|
{ |
|
161
|
1 |
|
$this->parcels = $parcels; |
|
162
|
|
|
} |
|
163
|
|
|
|
|
164
|
1 |
|
public function isPendingParcels(): bool |
|
165
|
|
|
{ |
|
166
|
1 |
|
return $this->pendingParcels; |
|
167
|
|
|
} |
|
168
|
|
|
|
|
169
|
1 |
|
public function setPendingParcels(bool $pendingParcels): void |
|
170
|
|
|
{ |
|
171
|
1 |
|
$this->pendingParcels = $pendingParcels; |
|
172
|
|
|
} |
|
173
|
|
|
|
|
174
|
1 |
|
public function toArray(): array |
|
175
|
|
|
{ |
|
176
|
1 |
|
return []; |
|
177
|
|
|
} |
|
178
|
|
|
} |
|
179
|
|
|
|