|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/* |
|
4
|
|
|
* This file is part of EC-CUBE |
|
5
|
|
|
* |
|
6
|
|
|
* Copyright(c) LOCKON CO.,LTD. All Rights Reserved. |
|
7
|
|
|
* |
|
8
|
|
|
* http://www.lockon.co.jp/ |
|
9
|
|
|
* |
|
10
|
|
|
* For the full copyright and license information, please view the LICENSE |
|
11
|
|
|
* file that was distributed with this source code. |
|
12
|
|
|
*/ |
|
13
|
|
|
|
|
14
|
|
|
namespace Eccube\Entity; |
|
15
|
|
|
|
|
16
|
|
|
use Doctrine\ORM\Mapping as ORM; |
|
17
|
|
|
|
|
18
|
|
|
/** |
|
19
|
|
|
* ProductClass |
|
20
|
|
|
* |
|
21
|
|
|
* @ORM\Table(name="dtb_product_class", indexes={@ORM\Index(name="dtb_product_class_price02_idx", columns={"price02"}), @ORM\Index(name="dtb_product_class_stock_stock_unlimited_idx", columns={"stock", "stock_unlimited"})}) |
|
22
|
|
|
* @ORM\InheritanceType("SINGLE_TABLE") |
|
23
|
|
|
* @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255) |
|
24
|
|
|
* @ORM\HasLifecycleCallbacks() |
|
25
|
|
|
* @ORM\Entity(repositoryClass="Eccube\Repository\ProductClassRepository") |
|
26
|
|
|
*/ |
|
27
|
|
|
class ProductClass extends \Eccube\Entity\AbstractEntity |
|
28
|
|
|
{ |
|
29
|
|
|
private $price01_inc_tax = null; |
|
30
|
|
|
private $price02_inc_tax = null; |
|
31
|
|
|
private $tax_rate = false; |
|
32
|
|
|
|
|
33
|
|
|
/** |
|
34
|
|
|
* 商品規格名を含めた商品名を返す. |
|
35
|
|
|
* |
|
36
|
|
|
* @return string |
|
37
|
|
|
*/ |
|
38
|
|
|
public function formatedProductName() |
|
39
|
|
|
{ |
|
40
|
|
|
$productName = $this->getProduct()->getName(); |
|
41
|
|
|
if ($this->hasClassCategory1()) { |
|
42
|
|
|
$productName .= ' - '.$this->getClassCategory1()->getName(); |
|
43
|
|
|
} |
|
44
|
|
|
if ($this->hasClassCategory2()) { |
|
45
|
|
|
$productName .= ' - '.$this->getClassCategory2()->getName(); |
|
46
|
|
|
} |
|
47
|
|
|
|
|
48
|
|
|
return $productName; |
|
49
|
|
|
} |
|
50
|
|
|
|
|
51
|
|
|
/** |
|
52
|
|
|
* Is Enable |
|
53
|
|
|
* |
|
54
|
|
|
* @return bool |
|
55
|
|
|
*/ |
|
56
|
80 |
|
public function isEnable() |
|
57
|
|
|
{ |
|
58
|
80 |
|
return $this->getProduct()->isEnable(); |
|
59
|
|
|
} |
|
60
|
|
|
|
|
61
|
|
|
/** |
|
62
|
|
|
* Set price01 IncTax |
|
63
|
|
|
* |
|
64
|
|
|
* @param string $price01_inc_tax |
|
65
|
|
|
* |
|
66
|
|
|
* @return ProductClass |
|
67
|
|
|
*/ |
|
68
|
460 |
|
public function setPrice01IncTax($price01_inc_tax) |
|
69
|
|
|
{ |
|
70
|
460 |
|
$this->price01_inc_tax = $price01_inc_tax; |
|
71
|
|
|
|
|
72
|
460 |
|
return $this; |
|
73
|
|
|
} |
|
74
|
|
|
|
|
75
|
|
|
/** |
|
76
|
|
|
* Get price01 IncTax |
|
77
|
|
|
* |
|
78
|
|
|
* @return string |
|
79
|
|
|
*/ |
|
80
|
7 |
|
public function getPrice01IncTax() |
|
81
|
|
|
{ |
|
82
|
7 |
|
return $this->price01_inc_tax; |
|
83
|
|
|
} |
|
84
|
|
|
|
|
85
|
|
|
/** |
|
86
|
|
|
* Set price02 IncTax |
|
87
|
|
|
* |
|
88
|
|
|
* |
|
89
|
|
|
* @return ProductClass |
|
90
|
|
|
*/ |
|
91
|
460 |
|
public function setPrice02IncTax($price02_inc_tax) |
|
92
|
|
|
{ |
|
93
|
460 |
|
$this->price02_inc_tax = $price02_inc_tax; |
|
94
|
|
|
|
|
95
|
460 |
|
return $this; |
|
96
|
|
|
} |
|
97
|
|
|
|
|
98
|
|
|
/** |
|
99
|
|
|
* Get price02 IncTax |
|
100
|
|
|
* |
|
101
|
|
|
* @return string |
|
102
|
|
|
*/ |
|
103
|
101 |
|
public function getPrice02IncTax() |
|
104
|
|
|
{ |
|
105
|
101 |
|
return $this->price02_inc_tax; |
|
106
|
|
|
} |
|
107
|
|
|
|
|
108
|
|
|
/** |
|
109
|
|
|
* Get StockFind |
|
110
|
|
|
* |
|
111
|
|
|
* @return bool |
|
112
|
|
|
*/ |
|
113
|
48 |
|
public function getStockFind() |
|
114
|
|
|
{ |
|
115
|
48 |
|
if ($this->getStock() > 0 || $this->isStockUnlimited()) { |
|
116
|
48 |
|
return true; |
|
117
|
|
|
} else { |
|
118
|
3 |
|
return false; |
|
119
|
|
|
} |
|
120
|
|
|
} |
|
121
|
|
|
|
|
122
|
|
|
/** |
|
123
|
|
|
* Set tax_rate |
|
124
|
|
|
* |
|
125
|
|
|
* @param string $tax_rate |
|
126
|
|
|
* |
|
127
|
|
|
* @return ProductClass |
|
128
|
|
|
*/ |
|
129
|
41 |
|
public function setTaxRate($tax_rate) |
|
130
|
|
|
{ |
|
131
|
41 |
|
$this->tax_rate = $tax_rate; |
|
|
|
|
|
|
132
|
|
|
|
|
133
|
41 |
|
return $this; |
|
134
|
|
|
} |
|
135
|
|
|
|
|
136
|
|
|
/** |
|
137
|
|
|
* Get tax_rate |
|
138
|
|
|
* |
|
139
|
|
|
* @return boolean |
|
140
|
|
|
*/ |
|
141
|
46 |
|
public function getTaxRate() |
|
142
|
|
|
{ |
|
143
|
46 |
|
return $this->tax_rate; |
|
144
|
|
|
} |
|
145
|
|
|
|
|
146
|
|
|
/** |
|
147
|
|
|
* Has ClassCategory1 |
|
148
|
|
|
* |
|
149
|
|
|
* @return boolean |
|
150
|
|
|
*/ |
|
151
|
196 |
|
public function hasClassCategory1() |
|
152
|
|
|
{ |
|
153
|
196 |
|
return isset($this->ClassCategory1); |
|
154
|
|
|
} |
|
155
|
|
|
|
|
156
|
|
|
/** |
|
157
|
|
|
* Has ClassCategory1 |
|
158
|
|
|
* |
|
159
|
|
|
* @return boolean |
|
160
|
|
|
*/ |
|
161
|
196 |
|
public function hasClassCategory2() |
|
162
|
|
|
{ |
|
163
|
196 |
|
return isset($this->ClassCategory2); |
|
164
|
|
|
} |
|
165
|
|
|
|
|
166
|
|
|
/** |
|
167
|
|
|
* @var int |
|
168
|
|
|
* |
|
169
|
|
|
* @ORM\Column(name="id", type="integer", options={"unsigned":true}) |
|
170
|
|
|
* @ORM\Id |
|
171
|
|
|
* @ORM\GeneratedValue(strategy="IDENTITY") |
|
172
|
|
|
*/ |
|
173
|
|
|
private $id; |
|
174
|
|
|
|
|
175
|
|
|
/** |
|
176
|
|
|
* @var string|null |
|
177
|
|
|
* |
|
178
|
|
|
* @ORM\Column(name="product_code", type="string", length=255, nullable=true) |
|
179
|
|
|
*/ |
|
180
|
|
|
private $code; |
|
181
|
|
|
|
|
182
|
|
|
/** |
|
183
|
|
|
* @var string|null |
|
184
|
|
|
* |
|
185
|
|
|
* @ORM\Column(name="stock", type="decimal", precision=10, scale=0, nullable=true) |
|
186
|
|
|
*/ |
|
187
|
|
|
private $stock; |
|
188
|
|
|
|
|
189
|
|
|
/** |
|
190
|
|
|
* @var boolean |
|
191
|
|
|
* |
|
192
|
|
|
* @ORM\Column(name="stock_unlimited", type="boolean", options={"default":false}) |
|
193
|
|
|
*/ |
|
194
|
|
|
private $stock_unlimited = false; |
|
195
|
|
|
|
|
196
|
|
|
/** |
|
197
|
|
|
* @var string|null |
|
198
|
|
|
* |
|
199
|
|
|
* @ORM\Column(name="sale_limit", type="decimal", precision=10, scale=0, nullable=true, options={"unsigned":true}) |
|
200
|
|
|
*/ |
|
201
|
|
|
private $sale_limit; |
|
202
|
|
|
|
|
203
|
|
|
/** |
|
204
|
|
|
* @var string|null |
|
205
|
|
|
* |
|
206
|
|
|
* @ORM\Column(name="price01", type="decimal", precision=12, scale=2, nullable=true, options={"unsigned":true}) |
|
207
|
|
|
*/ |
|
208
|
|
|
private $price01; |
|
209
|
|
|
|
|
210
|
|
|
/** |
|
211
|
|
|
* @var string |
|
212
|
|
|
* |
|
213
|
|
|
* @ORM\Column(name="price02", type="decimal", precision=12, scale=2, options={"unsigned":true}) |
|
214
|
|
|
*/ |
|
215
|
|
|
private $price02; |
|
216
|
|
|
|
|
217
|
|
|
/** |
|
218
|
|
|
* @var string|null |
|
219
|
|
|
* |
|
220
|
|
|
* @ORM\Column(name="delivery_fee", type="decimal", precision=12, scale=2, nullable=true, options={"unsigned":true}) |
|
221
|
|
|
*/ |
|
222
|
|
|
private $delivery_fee; |
|
223
|
|
|
|
|
224
|
|
|
/** |
|
225
|
|
|
* @var boolean |
|
226
|
|
|
* |
|
227
|
|
|
* @ORM\Column(name="visible", type="boolean", options={"default":true}) |
|
228
|
|
|
*/ |
|
229
|
|
|
private $visible; |
|
230
|
|
|
|
|
231
|
|
|
/** |
|
232
|
|
|
* @var \DateTime |
|
233
|
|
|
* |
|
234
|
|
|
* @ORM\Column(name="create_date", type="datetimetz") |
|
235
|
|
|
*/ |
|
236
|
|
|
private $create_date; |
|
237
|
|
|
|
|
238
|
|
|
/** |
|
239
|
|
|
* @var \DateTime |
|
240
|
|
|
* |
|
241
|
|
|
* @ORM\Column(name="update_date", type="datetimetz") |
|
242
|
|
|
*/ |
|
243
|
|
|
private $update_date; |
|
244
|
|
|
|
|
245
|
|
|
/** |
|
246
|
|
|
* @var string|null |
|
247
|
|
|
* |
|
248
|
|
|
* @ORM\Column(name="currency_code", type="string", nullable=true) |
|
249
|
|
|
*/ |
|
250
|
|
|
private $currency_code; |
|
251
|
|
|
|
|
252
|
|
|
/** |
|
253
|
|
|
* @var string |
|
254
|
|
|
* |
|
255
|
|
|
* @ORM\Column(name="point_rate", type="decimal", precision=10, scale=0, options={"unsigned":true}, nullable=true) |
|
256
|
|
|
*/ |
|
257
|
|
|
private $point_rate; |
|
258
|
|
|
|
|
259
|
|
|
/** |
|
260
|
|
|
* @var \Eccube\Entity\ProductStock |
|
261
|
|
|
* |
|
262
|
|
|
* @ORM\OneToOne(targetEntity="Eccube\Entity\ProductStock", mappedBy="ProductClass", cascade={"persist","remove"}) |
|
263
|
|
|
*/ |
|
264
|
|
|
private $ProductStock; |
|
265
|
|
|
|
|
266
|
|
|
/** |
|
267
|
|
|
* @var \Eccube\Entity\TaxRule |
|
268
|
|
|
* |
|
269
|
|
|
* @ORM\OneToOne(targetEntity="Eccube\Entity\TaxRule", mappedBy="ProductClass", cascade={"persist","remove"}) |
|
270
|
|
|
*/ |
|
271
|
|
|
private $TaxRule; |
|
272
|
|
|
|
|
273
|
|
|
/** |
|
274
|
|
|
* @var \Eccube\Entity\Product |
|
275
|
|
|
* |
|
276
|
|
|
* @ORM\ManyToOne(targetEntity="Eccube\Entity\Product", inversedBy="ProductClasses") |
|
277
|
|
|
* @ORM\JoinColumns({ |
|
278
|
|
|
* @ORM\JoinColumn(name="product_id", referencedColumnName="id") |
|
279
|
|
|
* }) |
|
280
|
|
|
*/ |
|
281
|
|
|
private $Product; |
|
282
|
|
|
|
|
283
|
|
|
/** |
|
284
|
|
|
* @var \Eccube\Entity\Master\SaleType |
|
285
|
|
|
* |
|
286
|
|
|
* @ORM\ManyToOne(targetEntity="Eccube\Entity\Master\SaleType") |
|
287
|
|
|
* @ORM\JoinColumns({ |
|
288
|
|
|
* @ORM\JoinColumn(name="sale_type_id", referencedColumnName="id") |
|
289
|
|
|
* }) |
|
290
|
|
|
*/ |
|
291
|
|
|
private $SaleType; |
|
292
|
|
|
|
|
293
|
|
|
/** |
|
294
|
|
|
* @var \Eccube\Entity\ClassCategory |
|
295
|
|
|
* |
|
296
|
|
|
* @ORM\ManyToOne(targetEntity="Eccube\Entity\ClassCategory") |
|
297
|
|
|
* @ORM\JoinColumns({ |
|
298
|
|
|
* @ORM\JoinColumn(name="class_category_id1", referencedColumnName="id", nullable=true) |
|
299
|
|
|
* }) |
|
300
|
|
|
*/ |
|
301
|
|
|
private $ClassCategory1; |
|
302
|
|
|
|
|
303
|
|
|
/** |
|
304
|
|
|
* @var \Eccube\Entity\ClassCategory |
|
305
|
|
|
* |
|
306
|
|
|
* @ORM\ManyToOne(targetEntity="Eccube\Entity\ClassCategory") |
|
307
|
|
|
* @ORM\JoinColumns({ |
|
308
|
|
|
* @ORM\JoinColumn(name="class_category_id2", referencedColumnName="id", nullable=true) |
|
309
|
|
|
* }) |
|
310
|
|
|
*/ |
|
311
|
|
|
private $ClassCategory2; |
|
312
|
|
|
|
|
313
|
|
|
/** |
|
314
|
|
|
* @var \Eccube\Entity\DeliveryDuration |
|
315
|
|
|
* |
|
316
|
|
|
* @ORM\ManyToOne(targetEntity="Eccube\Entity\DeliveryDuration") |
|
317
|
|
|
* @ORM\JoinColumns({ |
|
318
|
|
|
* @ORM\JoinColumn(name="delivery_duration_id", referencedColumnName="id") |
|
319
|
|
|
* }) |
|
320
|
|
|
*/ |
|
321
|
|
|
private $DeliveryDuration; |
|
322
|
|
|
|
|
323
|
|
|
/** |
|
324
|
|
|
* @var \Eccube\Entity\Member |
|
325
|
|
|
* |
|
326
|
|
|
* @ORM\ManyToOne(targetEntity="Eccube\Entity\Member") |
|
327
|
|
|
* @ORM\JoinColumns({ |
|
328
|
|
|
* @ORM\JoinColumn(name="creator_id", referencedColumnName="id") |
|
329
|
|
|
* }) |
|
330
|
|
|
*/ |
|
331
|
|
|
private $Creator; |
|
332
|
|
|
|
|
333
|
3 |
|
public function __clone() |
|
334
|
|
|
{ |
|
335
|
3 |
|
$this->id = null; |
|
336
|
|
|
} |
|
337
|
|
|
|
|
338
|
|
|
/** |
|
339
|
|
|
* Get id. |
|
340
|
|
|
* |
|
341
|
|
|
* @return int |
|
342
|
|
|
*/ |
|
343
|
431 |
|
public function getId() |
|
344
|
|
|
{ |
|
345
|
431 |
|
return $this->id; |
|
346
|
|
|
} |
|
347
|
|
|
|
|
348
|
|
|
/** |
|
349
|
|
|
* Set code. |
|
350
|
|
|
* |
|
351
|
|
|
* @param string|null $code |
|
352
|
|
|
* |
|
353
|
|
|
* @return ProductClass |
|
354
|
|
|
*/ |
|
355
|
403 |
|
public function setCode($code = null) |
|
356
|
|
|
{ |
|
357
|
403 |
|
$this->code = $code; |
|
358
|
|
|
|
|
359
|
403 |
|
return $this; |
|
360
|
|
|
} |
|
361
|
|
|
|
|
362
|
|
|
/** |
|
363
|
|
|
* Get code. |
|
364
|
|
|
* |
|
365
|
|
|
* @return string|null |
|
366
|
|
|
*/ |
|
367
|
297 |
|
public function getCode() |
|
368
|
|
|
{ |
|
369
|
297 |
|
return $this->code; |
|
370
|
|
|
} |
|
371
|
|
|
|
|
372
|
|
|
/** |
|
373
|
|
|
* Set stock. |
|
374
|
|
|
* |
|
375
|
|
|
* @param string|null $stock |
|
376
|
|
|
* |
|
377
|
|
|
* @return ProductClass |
|
378
|
|
|
*/ |
|
379
|
424 |
|
public function setStock($stock = null) |
|
380
|
|
|
{ |
|
381
|
424 |
|
$this->stock = $stock; |
|
382
|
|
|
|
|
383
|
424 |
|
return $this; |
|
384
|
|
|
} |
|
385
|
|
|
|
|
386
|
|
|
/** |
|
387
|
|
|
* Get stock. |
|
388
|
|
|
* |
|
389
|
|
|
* @return string|null |
|
390
|
|
|
*/ |
|
391
|
275 |
|
public function getStock() |
|
392
|
|
|
{ |
|
393
|
275 |
|
return $this->stock; |
|
394
|
|
|
} |
|
395
|
|
|
|
|
396
|
|
|
/** |
|
397
|
|
|
* Set stockUnlimited. |
|
398
|
|
|
* |
|
399
|
|
|
* @param boolean $stockUnlimited |
|
400
|
|
|
* |
|
401
|
|
|
* @return ProductClass |
|
402
|
|
|
*/ |
|
403
|
406 |
|
public function setStockUnlimited($stockUnlimited) |
|
404
|
|
|
{ |
|
405
|
406 |
|
$this->stock_unlimited = $stockUnlimited; |
|
406
|
|
|
|
|
407
|
406 |
|
return $this; |
|
408
|
|
|
} |
|
409
|
|
|
|
|
410
|
|
|
/** |
|
411
|
|
|
* Get stockUnlimited. |
|
412
|
|
|
* |
|
413
|
|
|
* @return boolean |
|
414
|
|
|
*/ |
|
415
|
307 |
|
public function isStockUnlimited() |
|
416
|
|
|
{ |
|
417
|
307 |
|
return $this->stock_unlimited; |
|
418
|
|
|
} |
|
419
|
|
|
|
|
420
|
|
|
/** |
|
421
|
|
|
* Set saleLimit. |
|
422
|
|
|
* |
|
423
|
|
|
* @param string|null $saleLimit |
|
424
|
|
|
* |
|
425
|
|
|
* @return ProductClass |
|
426
|
|
|
*/ |
|
427
|
33 |
|
public function setSaleLimit($saleLimit = null) |
|
428
|
|
|
{ |
|
429
|
33 |
|
$this->sale_limit = $saleLimit; |
|
430
|
|
|
|
|
431
|
33 |
|
return $this; |
|
432
|
|
|
} |
|
433
|
|
|
|
|
434
|
|
|
/** |
|
435
|
|
|
* Get saleLimit. |
|
436
|
|
|
* |
|
437
|
|
|
* @return string|null |
|
438
|
|
|
*/ |
|
439
|
126 |
|
public function getSaleLimit() |
|
440
|
|
|
{ |
|
441
|
126 |
|
return $this->sale_limit; |
|
442
|
|
|
} |
|
443
|
|
|
|
|
444
|
|
|
/** |
|
445
|
|
|
* Set price01. |
|
446
|
|
|
* |
|
447
|
|
|
* @param string|null $price01 |
|
448
|
|
|
* |
|
449
|
|
|
* @return ProductClass |
|
450
|
|
|
*/ |
|
451
|
44 |
|
public function setPrice01($price01 = null) |
|
452
|
|
|
{ |
|
453
|
44 |
|
$this->price01 = $price01; |
|
454
|
|
|
|
|
455
|
44 |
|
return $this; |
|
456
|
|
|
} |
|
457
|
|
|
|
|
458
|
|
|
/** |
|
459
|
|
|
* Get price01. |
|
460
|
|
|
* |
|
461
|
|
|
* @return string|null |
|
462
|
|
|
*/ |
|
463
|
478 |
|
public function getPrice01() |
|
464
|
|
|
{ |
|
465
|
478 |
|
return $this->price01; |
|
466
|
|
|
} |
|
467
|
|
|
|
|
468
|
|
|
/** |
|
469
|
|
|
* Set price02. |
|
470
|
|
|
* |
|
471
|
|
|
* @param string $price02 |
|
472
|
|
|
* |
|
473
|
|
|
* @return ProductClass |
|
474
|
|
|
*/ |
|
475
|
426 |
|
public function setPrice02($price02) |
|
476
|
|
|
{ |
|
477
|
426 |
|
$this->price02 = $price02; |
|
478
|
|
|
|
|
479
|
426 |
|
return $this; |
|
480
|
|
|
} |
|
481
|
|
|
|
|
482
|
|
|
/** |
|
483
|
|
|
* Get price02. |
|
484
|
|
|
* |
|
485
|
|
|
* @return string |
|
486
|
|
|
*/ |
|
487
|
478 |
|
public function getPrice02() |
|
488
|
|
|
{ |
|
489
|
478 |
|
return $this->price02; |
|
490
|
|
|
} |
|
491
|
|
|
|
|
492
|
|
|
/** |
|
493
|
|
|
* Set deliveryFee. |
|
494
|
|
|
* |
|
495
|
|
|
* @param string|null $deliveryFee |
|
496
|
|
|
* |
|
497
|
|
|
* @return ProductClass |
|
498
|
|
|
*/ |
|
499
|
25 |
|
public function setDeliveryFee($deliveryFee = null) |
|
500
|
|
|
{ |
|
501
|
25 |
|
$this->delivery_fee = $deliveryFee; |
|
502
|
|
|
|
|
503
|
25 |
|
return $this; |
|
504
|
|
|
} |
|
505
|
|
|
|
|
506
|
|
|
/** |
|
507
|
|
|
* Get deliveryFee. |
|
508
|
|
|
* |
|
509
|
|
|
* @return string|null |
|
510
|
|
|
*/ |
|
511
|
45 |
|
public function getDeliveryFee() |
|
512
|
|
|
{ |
|
513
|
45 |
|
return $this->delivery_fee; |
|
514
|
|
|
} |
|
515
|
|
|
|
|
516
|
|
|
/** |
|
517
|
|
|
* @return boolean |
|
518
|
|
|
*/ |
|
519
|
228 |
|
public function isVisible() |
|
520
|
|
|
{ |
|
521
|
228 |
|
return $this->visible; |
|
522
|
|
|
} |
|
523
|
|
|
|
|
524
|
|
|
/** |
|
525
|
|
|
* @param boolean $visible |
|
526
|
|
|
* |
|
527
|
|
|
* @return ProductClass |
|
528
|
|
|
*/ |
|
529
|
411 |
|
public function setVisible($visible) |
|
530
|
|
|
{ |
|
531
|
411 |
|
$this->visible = $visible; |
|
532
|
|
|
|
|
533
|
411 |
|
return $this; |
|
534
|
|
|
} |
|
535
|
|
|
|
|
536
|
|
|
/** |
|
537
|
|
|
* Set createDate. |
|
538
|
|
|
* |
|
539
|
|
|
* @param \DateTime $createDate |
|
540
|
|
|
* |
|
541
|
|
|
* @return ProductClass |
|
542
|
|
|
*/ |
|
543
|
405 |
|
public function setCreateDate($createDate) |
|
544
|
|
|
{ |
|
545
|
405 |
|
$this->create_date = $createDate; |
|
546
|
|
|
|
|
547
|
405 |
|
return $this; |
|
548
|
|
|
} |
|
549
|
|
|
|
|
550
|
|
|
/** |
|
551
|
|
|
* Get createDate. |
|
552
|
|
|
* |
|
553
|
|
|
* @return \DateTime |
|
554
|
|
|
*/ |
|
555
|
|
|
public function getCreateDate() |
|
556
|
|
|
{ |
|
557
|
|
|
return $this->create_date; |
|
558
|
|
|
} |
|
559
|
|
|
|
|
560
|
|
|
/** |
|
561
|
|
|
* Set updateDate. |
|
562
|
|
|
* |
|
563
|
|
|
* @param \DateTime $updateDate |
|
564
|
|
|
* |
|
565
|
|
|
* @return ProductClass |
|
566
|
|
|
*/ |
|
567
|
409 |
|
public function setUpdateDate($updateDate) |
|
568
|
|
|
{ |
|
569
|
409 |
|
$this->update_date = $updateDate; |
|
570
|
|
|
|
|
571
|
409 |
|
return $this; |
|
572
|
|
|
} |
|
573
|
|
|
|
|
574
|
|
|
/** |
|
575
|
|
|
* Get updateDate. |
|
576
|
|
|
* |
|
577
|
|
|
* @return \DateTime |
|
578
|
|
|
*/ |
|
579
|
|
|
public function getUpdateDate() |
|
580
|
|
|
{ |
|
581
|
|
|
return $this->update_date; |
|
582
|
|
|
} |
|
583
|
|
|
|
|
584
|
|
|
/** |
|
585
|
|
|
* Get currencyCode. |
|
586
|
|
|
* |
|
587
|
|
|
* @return string |
|
588
|
|
|
*/ |
|
589
|
|
|
public function getCurrencyCode() |
|
590
|
|
|
{ |
|
591
|
|
|
return $this->currency_code; |
|
592
|
|
|
} |
|
593
|
|
|
|
|
594
|
|
|
/** |
|
595
|
|
|
* Set currencyCode. |
|
596
|
|
|
* |
|
597
|
|
|
* @param string|null $currencyCode |
|
598
|
|
|
* |
|
599
|
|
|
* @return $this |
|
600
|
|
|
*/ |
|
601
|
405 |
|
public function setCurrencyCode($currencyCode = null) |
|
602
|
|
|
{ |
|
603
|
405 |
|
$this->currency_code = $currencyCode; |
|
604
|
|
|
|
|
605
|
405 |
|
return $this; |
|
606
|
|
|
} |
|
607
|
|
|
|
|
608
|
|
|
/** |
|
609
|
|
|
* Set productStock. |
|
610
|
|
|
* |
|
611
|
|
|
* @param \Eccube\Entity\ProductStock|null $productStock |
|
612
|
|
|
* |
|
613
|
|
|
* @return ProductClass |
|
614
|
|
|
*/ |
|
615
|
406 |
|
public function setProductStock(\Eccube\Entity\ProductStock $productStock = null) |
|
616
|
|
|
{ |
|
617
|
406 |
|
$this->ProductStock = $productStock; |
|
618
|
|
|
|
|
619
|
406 |
|
return $this; |
|
620
|
|
|
} |
|
621
|
|
|
|
|
622
|
|
|
/** |
|
623
|
|
|
* Get productStock. |
|
624
|
|
|
* |
|
625
|
|
|
* @return \Eccube\Entity\ProductStock|null |
|
626
|
|
|
*/ |
|
627
|
35 |
|
public function getProductStock() |
|
628
|
|
|
{ |
|
629
|
35 |
|
return $this->ProductStock; |
|
630
|
|
|
} |
|
631
|
|
|
|
|
632
|
|
|
/** |
|
633
|
|
|
* Set taxRule. |
|
634
|
|
|
* |
|
635
|
|
|
* @param \Eccube\Entity\TaxRule|null $taxRule |
|
636
|
|
|
* |
|
637
|
|
|
* @return ProductClass |
|
638
|
|
|
*/ |
|
639
|
10 |
|
public function setTaxRule(\Eccube\Entity\TaxRule $taxRule = null) |
|
640
|
|
|
{ |
|
641
|
10 |
|
$this->TaxRule = $taxRule; |
|
642
|
|
|
|
|
643
|
10 |
|
return $this; |
|
644
|
|
|
} |
|
645
|
|
|
|
|
646
|
|
|
/** |
|
647
|
|
|
* Get taxRule. |
|
648
|
|
|
* |
|
649
|
|
|
* @return \Eccube\Entity\TaxRule|null |
|
650
|
|
|
*/ |
|
651
|
22 |
|
public function getTaxRule() |
|
652
|
|
|
{ |
|
653
|
22 |
|
return $this->TaxRule; |
|
654
|
|
|
} |
|
655
|
|
|
|
|
656
|
|
|
/** |
|
657
|
|
|
* Set product. |
|
658
|
|
|
* |
|
659
|
|
|
* @param \Eccube\Entity\Product|null $product |
|
660
|
|
|
* |
|
661
|
|
|
* @return ProductClass |
|
662
|
|
|
*/ |
|
663
|
410 |
|
public function setProduct(\Eccube\Entity\Product $product = null) |
|
664
|
|
|
{ |
|
665
|
410 |
|
$this->Product = $product; |
|
666
|
|
|
|
|
667
|
410 |
|
return $this; |
|
668
|
|
|
} |
|
669
|
|
|
|
|
670
|
|
|
/** |
|
671
|
|
|
* Get product. |
|
672
|
|
|
* |
|
673
|
|
|
* @return \Eccube\Entity\Product|null |
|
674
|
|
|
*/ |
|
675
|
460 |
|
public function getProduct() |
|
676
|
|
|
{ |
|
677
|
460 |
|
return $this->Product; |
|
678
|
|
|
} |
|
679
|
|
|
|
|
680
|
|
|
/** |
|
681
|
|
|
* Set saleType. |
|
682
|
|
|
* |
|
683
|
|
|
* @param \Eccube\Entity\Master\SaleType|null $saleType |
|
684
|
|
|
* |
|
685
|
|
|
* @return ProductClass |
|
686
|
|
|
*/ |
|
687
|
405 |
|
public function setSaleType(\Eccube\Entity\Master\SaleType $saleType = null) |
|
688
|
|
|
{ |
|
689
|
405 |
|
$this->SaleType = $saleType; |
|
690
|
|
|
|
|
691
|
405 |
|
return $this; |
|
692
|
|
|
} |
|
693
|
|
|
|
|
694
|
|
|
/** |
|
695
|
|
|
* Get saleType. |
|
696
|
|
|
* |
|
697
|
|
|
* @return \Eccube\Entity\Master\SaleType|null |
|
698
|
|
|
*/ |
|
699
|
148 |
|
public function getSaleType() |
|
700
|
|
|
{ |
|
701
|
148 |
|
return $this->SaleType; |
|
702
|
|
|
} |
|
703
|
|
|
|
|
704
|
|
|
/** |
|
705
|
|
|
* Set classCategory1. |
|
706
|
|
|
* |
|
707
|
|
|
* @param \Eccube\Entity\ClassCategory|null $classCategory1 |
|
708
|
|
|
* |
|
709
|
|
|
* @return ProductClass |
|
710
|
|
|
*/ |
|
711
|
408 |
|
public function setClassCategory1(\Eccube\Entity\ClassCategory $classCategory1 = null) |
|
712
|
|
|
{ |
|
713
|
408 |
|
$this->ClassCategory1 = $classCategory1; |
|
714
|
|
|
|
|
715
|
408 |
|
return $this; |
|
716
|
|
|
} |
|
717
|
|
|
|
|
718
|
|
|
/** |
|
719
|
|
|
* Get classCategory1. |
|
720
|
|
|
* |
|
721
|
|
|
* @return \Eccube\Entity\ClassCategory|null |
|
722
|
|
|
*/ |
|
723
|
321 |
|
public function getClassCategory1() |
|
724
|
|
|
{ |
|
725
|
321 |
|
return $this->ClassCategory1; |
|
726
|
|
|
} |
|
727
|
|
|
|
|
728
|
|
|
/** |
|
729
|
|
|
* Set classCategory2. |
|
730
|
|
|
* |
|
731
|
|
|
* @param \Eccube\Entity\ClassCategory|null $classCategory2 |
|
732
|
|
|
* |
|
733
|
|
|
* @return ProductClass |
|
734
|
|
|
*/ |
|
735
|
276 |
|
public function setClassCategory2(\Eccube\Entity\ClassCategory $classCategory2 = null) |
|
736
|
|
|
{ |
|
737
|
276 |
|
$this->ClassCategory2 = $classCategory2; |
|
738
|
|
|
|
|
739
|
276 |
|
return $this; |
|
740
|
|
|
} |
|
741
|
|
|
|
|
742
|
|
|
/** |
|
743
|
|
|
* Get classCategory2. |
|
744
|
|
|
* |
|
745
|
|
|
* @return \Eccube\Entity\ClassCategory|null |
|
746
|
|
|
*/ |
|
747
|
261 |
|
public function getClassCategory2() |
|
748
|
|
|
{ |
|
749
|
261 |
|
return $this->ClassCategory2; |
|
750
|
|
|
} |
|
751
|
|
|
|
|
752
|
|
|
/** |
|
753
|
|
|
* Set deliveryDuration. |
|
754
|
|
|
* |
|
755
|
|
|
* @param \Eccube\Entity\DeliveryDuration|null $deliveryDuration |
|
756
|
|
|
* |
|
757
|
|
|
* @return ProductClass |
|
758
|
|
|
*/ |
|
759
|
394 |
|
public function setDeliveryDuration(\Eccube\Entity\DeliveryDuration $deliveryDuration = null) |
|
760
|
|
|
{ |
|
761
|
394 |
|
$this->DeliveryDuration = $deliveryDuration; |
|
762
|
|
|
|
|
763
|
394 |
|
return $this; |
|
764
|
|
|
} |
|
765
|
|
|
|
|
766
|
|
|
/** |
|
767
|
|
|
* Get deliveryDuration. |
|
768
|
|
|
* |
|
769
|
|
|
* @return \Eccube\Entity\DeliveryDuration|null |
|
770
|
|
|
*/ |
|
771
|
96 |
|
public function getDeliveryDuration() |
|
772
|
|
|
{ |
|
773
|
96 |
|
return $this->DeliveryDuration; |
|
774
|
|
|
} |
|
775
|
|
|
|
|
776
|
|
|
/** |
|
777
|
|
|
* Set creator. |
|
778
|
|
|
* |
|
779
|
|
|
* @param \Eccube\Entity\Member|null $creator |
|
780
|
|
|
* |
|
781
|
|
|
* @return ProductClass |
|
782
|
|
|
*/ |
|
783
|
409 |
|
public function setCreator(\Eccube\Entity\Member $creator = null) |
|
784
|
|
|
{ |
|
785
|
409 |
|
$this->Creator = $creator; |
|
786
|
|
|
|
|
787
|
409 |
|
return $this; |
|
788
|
|
|
} |
|
789
|
|
|
|
|
790
|
|
|
/** |
|
791
|
|
|
* Get creator. |
|
792
|
|
|
* |
|
793
|
|
|
* @return \Eccube\Entity\Member|null |
|
794
|
|
|
*/ |
|
795
|
|
|
public function getCreator() |
|
796
|
|
|
{ |
|
797
|
|
|
return $this->Creator; |
|
798
|
|
|
} |
|
799
|
|
|
|
|
800
|
|
|
/** |
|
801
|
|
|
* Set pointRate |
|
802
|
|
|
* |
|
803
|
|
|
* @param string $pointRate |
|
804
|
|
|
* |
|
805
|
|
|
* @return ProductClass |
|
806
|
|
|
*/ |
|
807
|
|
|
public function setPointRate($pointRate) |
|
808
|
|
|
{ |
|
809
|
|
|
$this->point_rate = $pointRate; |
|
810
|
|
|
|
|
811
|
|
|
return $this; |
|
812
|
|
|
} |
|
813
|
|
|
|
|
814
|
|
|
/** |
|
815
|
|
|
* Get pointRate |
|
816
|
|
|
* |
|
817
|
|
|
* @return string |
|
818
|
|
|
*/ |
|
819
|
|
|
public function getPointRate() |
|
820
|
|
|
{ |
|
821
|
|
|
return $this->point_rate; |
|
822
|
|
|
} |
|
823
|
|
|
} |
|
824
|
|
|
|
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.