1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Waredesk\Models\Product; |
4
|
|
|
|
5
|
|
|
use DateTime; |
6
|
|
|
use Waredesk\Collections\Products\Variants\Codes; |
7
|
|
|
use Waredesk\Collections\Products\Variants\Options; |
8
|
|
|
use Waredesk\Collections\Products\Variants\Prices; |
9
|
|
|
|
10
|
|
|
class Variant |
11
|
|
|
{ |
12
|
|
|
private $id; |
13
|
|
|
private $images; |
14
|
|
|
private $options; |
15
|
|
|
private $codes; |
16
|
|
|
private $prices; |
17
|
|
|
private $description; |
18
|
|
|
private $notes; |
19
|
|
|
private $weight_unit; |
20
|
|
|
private $length_unit; |
21
|
|
|
private $weight; |
22
|
|
|
private $width; |
23
|
|
|
private $height; |
24
|
|
|
private $depth; |
25
|
|
|
private $creation_datetime; |
26
|
|
|
private $modification_datetime; |
27
|
|
|
|
28
|
|
|
public function __construct() |
29
|
|
|
{ |
30
|
|
|
$this->options = new Options(); |
31
|
|
|
$this->codes = new Codes(); |
32
|
|
|
$this->prices = new Prices(); |
33
|
|
|
} |
34
|
|
|
|
35
|
|
|
public function getId(): ?int |
36
|
|
|
{ |
37
|
|
|
return $this->id; |
38
|
|
|
} |
39
|
|
|
|
40
|
|
|
public function setId(int $id) |
41
|
|
|
{ |
42
|
|
|
$this->id = $id; |
43
|
|
|
} |
44
|
|
|
|
45
|
|
|
public function getImages(): ?array |
46
|
|
|
{ |
47
|
|
|
return $this->images; |
48
|
|
|
} |
49
|
|
|
|
50
|
|
|
public function setImages(array $images) |
51
|
|
|
{ |
52
|
|
|
$this->images = $images; |
53
|
|
|
} |
54
|
|
|
|
55
|
|
|
public function getOptions(): ?Options |
56
|
|
|
{ |
57
|
|
|
return $this->options; |
58
|
|
|
} |
59
|
|
|
|
60
|
|
|
public function setOptions(Options $options) |
61
|
|
|
{ |
62
|
|
|
$this->options = $options; |
63
|
|
|
} |
64
|
|
|
|
65
|
|
|
public function getCodes(): ?Codes |
66
|
|
|
{ |
67
|
|
|
return $this->codes; |
68
|
|
|
} |
69
|
|
|
|
70
|
|
|
public function setCodes(Codes $codes) |
71
|
|
|
{ |
72
|
|
|
$this->codes = $codes; |
73
|
|
|
} |
74
|
|
|
|
75
|
|
|
public function getPrices(): ?Prices |
76
|
|
|
{ |
77
|
|
|
return $this->prices; |
78
|
|
|
} |
79
|
|
|
|
80
|
|
|
public function setPrices(Prices $prices) |
81
|
|
|
{ |
82
|
|
|
$this->prices = $prices; |
83
|
|
|
} |
84
|
|
|
|
85
|
|
|
public function getDescription(): ?string |
86
|
|
|
{ |
87
|
|
|
return $this->description; |
88
|
|
|
} |
89
|
|
|
|
90
|
|
|
public function setDescription(string $description) |
91
|
|
|
{ |
92
|
|
|
$this->description = $description; |
93
|
|
|
} |
94
|
|
|
|
95
|
|
|
public function getNotes(): ?string |
96
|
|
|
{ |
97
|
|
|
return $this->notes; |
98
|
|
|
} |
99
|
|
|
|
100
|
|
|
public function setNotes(string $notes) |
101
|
|
|
{ |
102
|
|
|
$this->notes = $notes; |
103
|
|
|
} |
104
|
|
|
|
105
|
|
|
public function getWeightUnit(): ?string |
106
|
|
|
{ |
107
|
|
|
return $this->weight_unit; |
108
|
|
|
} |
109
|
|
|
|
110
|
|
|
public function setWeightUnit(string $weight_unit) |
111
|
|
|
{ |
112
|
|
|
$this->weight_unit = $weight_unit; |
113
|
|
|
} |
114
|
|
|
|
115
|
|
|
public function getLengthUnit(): ?string |
116
|
|
|
{ |
117
|
|
|
return $this->length_unit; |
118
|
|
|
} |
119
|
|
|
|
120
|
|
|
public function setLengthUnit(string $length_unit) |
121
|
|
|
{ |
122
|
|
|
$this->length_unit = $length_unit; |
123
|
|
|
} |
124
|
|
|
|
125
|
|
|
public function getWeight(): ?float |
126
|
|
|
{ |
127
|
|
|
return $this->weight; |
128
|
|
|
} |
129
|
|
|
|
130
|
|
|
public function setWeight(float $weight) |
131
|
|
|
{ |
132
|
|
|
$this->weight = $weight; |
133
|
|
|
} |
134
|
|
|
|
135
|
|
|
public function getWidth(): ?float |
136
|
|
|
{ |
137
|
|
|
return $this->width; |
138
|
|
|
} |
139
|
|
|
|
140
|
|
|
public function setWidth(float $width) |
141
|
|
|
{ |
142
|
|
|
$this->width = $width; |
143
|
|
|
} |
144
|
|
|
|
145
|
|
|
public function getHeight(): ?float |
146
|
|
|
{ |
147
|
|
|
return $this->height; |
148
|
|
|
} |
149
|
|
|
|
150
|
|
|
public function setHeight(float $height) |
151
|
|
|
{ |
152
|
|
|
$this->height = $height; |
153
|
|
|
} |
154
|
|
|
|
155
|
|
|
public function getDepth(): ?float |
156
|
|
|
{ |
157
|
|
|
return $this->depth; |
158
|
|
|
} |
159
|
|
|
|
160
|
|
|
public function setDepth(float $depth) |
161
|
|
|
{ |
162
|
|
|
$this->depth = $depth; |
163
|
|
|
} |
164
|
|
|
|
165
|
|
|
public function getCreationDatetime(): ?DateTime |
166
|
|
|
{ |
167
|
|
|
return $this->creation_datetime; |
168
|
|
|
} |
169
|
|
|
|
170
|
|
|
public function setCreationDatetime(DateTime $creation_datetime) |
171
|
|
|
{ |
172
|
|
|
$this->creation_datetime = $creation_datetime; |
173
|
|
|
} |
174
|
|
|
|
175
|
|
|
public function getModificationDatetime(): ?DateTime |
176
|
|
|
{ |
177
|
|
|
return $this->modification_datetime; |
178
|
|
|
} |
179
|
|
|
|
180
|
|
|
public function setModificationDatetime(DateTime $modification_datetime) |
181
|
|
|
{ |
182
|
|
|
$this->modification_datetime = $modification_datetime; |
183
|
|
|
} |
184
|
|
|
} |
185
|
|
|
|