Completed
Push — master ( dfe6a1...e0ceab )
by Joachim
18:20 queued 03:29
created

Product::setVariantGroupIdList()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Loevgaard\DandomainFoundation\Entity;
4
5
use Doctrine\Common\Collections\ArrayCollection;
6
use Doctrine\ORM\Mapping as ORM;
7
use Knp\DoctrineBehaviors\Model\SoftDeletable\SoftDeletable;
8
use Knp\DoctrineBehaviors\Model\Timestampable\Timestampable;
9
use Knp\DoctrineBehaviors\Model\Translatable\Translatable;
10
use Loevgaard\DandomainFoundation\Entity\Generated\ProductInterface;
11
use Loevgaard\DandomainFoundation\Entity\Generated\ProductTranslationInterface;
12
use Loevgaard\DandomainFoundation\Entity\Generated\VariantInterface;
13
use Loevgaard\DandomainFoundation\Entity\Generated\ProductTrait;
14
use Loevgaard\DandomainFoundation\Entity\Generated\MediumInterface;
15
use Loevgaard\DandomainFoundation\Entity\Generated\CategoryInterface;
16
use Loevgaard\DandomainFoundation\Entity\Generated\ManufacturerInterface;
17
use Loevgaard\DandomainFoundation\Entity\Generated\PriceInterface;
18
use Loevgaard\DandomainFoundation\Entity\Generated\ProductRelationInterface;
19
use Loevgaard\DandomainFoundation\Entity\Generated\SegmentInterface;
20
use Loevgaard\DandomainFoundation\Entity\Generated\VariantGroupInterface;
21
22
/**
23
 * @ORM\Entity()
24
 * @ORM\Table(name="loevgaard_dandomain_products")
25
 * @method ProductTranslationInterface translate(string $locale = null, bool $fallbackToDefault = true)
26
 */
27
class Product extends AbstractEntity implements ProductInterface
28
{
29
    use ProductTrait;
30
    use Timestampable;
31
    use SoftDeletable;
32
    use Translatable;
33
34
    /**
35
     * @var int
36
     *
37
     * @ORM\Id
38
     * @ORM\GeneratedValue
39
     * @ORM\Column(type="integer")
40
     **/
41
    protected $id;
42
43
    /**
44
     * @var int
45
     *
46
     * @ORM\Column(type="integer", unique=true)
47
     */
48
    protected $externalId;
49
50
    /**
51
     * @var string|null
52
     *
53
     * @ORM\Column(nullable=true, type="string", length=191)
54
     */
55
    protected $barCodeNumber;
56
57
    /**
58
     * @var array|null
59
     *
60
     * @ORM\Column(nullable=true, type="json")
61
     */
62
    protected $categoryIdList;
63
64
    /**
65
     * @var string|null
66
     *
67
     * @ORM\Column(nullable=true, type="string", length=191)
68
     */
69
    protected $comments;
70
71
    /**
72
     * @var float|null
73
     *
74
     * @ORM\Column(nullable=true, type="decimal", precision=12, scale=2)
75
     */
76
    protected $costPrice;
77
78
    /**
79
     * @var \DateTimeImmutable|null
80
     *
81
     * @ORM\Column(nullable=true, type="datetime_immutable", options={"comment"="Created info from Dandomain"})
82
     */
83
    protected $created;
84
85
    /**
86
     * @var string|null
87
     *
88
     * @ORM\Column(nullable=true, type="string", length=191, options={"comment"="Created by info from Dandomain"})
89
     */
90
    protected $createdBy;
91
92
    /**
93
     * @var int|null
94
     *
95
     * @ORM\Column(nullable=true, type="integer")
96
     */
97
    protected $defaultCategoryId;
98
99
    /**
100
     * @var array|null
101
     *
102
     * @ORM\Column(nullable=true, type="json")
103
     */
104
    protected $disabledVariantIdList;
105
106
    /**
107
     * @var string|null
108
     *
109
     * @ORM\Column(nullable=true, type="string", length=191)
110
     */
111
    protected $edbPriserProductNumber;
112
113
    /**
114
     * @var string|null
115
     *
116
     * @ORM\Column(nullable=true, type="string", length=191)
117
     */
118
    protected $fileSaleLink;
119
120
    /**
121
     * @var string|null
122
     *
123
     * @ORM\Column(nullable=true, type="string", length=191)
124
     */
125
    protected $googleFeedCategory;
126
127
    /**
128
     * @var bool|null
129
     *
130
     * @ORM\Column(nullable=true, type="boolean")
131
     */
132
    protected $isGiftCertificate;
133
134
    /**
135
     * @var bool|null
136
     *
137
     * @ORM\Column(nullable=true, type="boolean")
138
     */
139
    protected $isModified;
140
141
    /**
142
     * @var bool|null
143
     *
144
     * @ORM\Column(nullable=true, type="boolean")
145
     */
146
    protected $isRateVariants;
147
148
    /**
149
     * @var bool|null
150
     *
151
     * @ORM\Column(nullable=true, type="boolean")
152
     */
153
    protected $isReviewVariants;
154
155
    /**
156
     * @var bool|null
157
     *
158
     * @ORM\Column(nullable=true, type="boolean")
159
     */
160
    protected $isVariantMaster;
161
162
    /**
163
     * @var string|null
164
     *
165
     * @ORM\Column(nullable=true, type="string", length=191)
166
     */
167
    protected $locationNumber;
168
169
    /**
170
     * @var array|null
171
     *
172
     * @ORM\Column(nullable=true, type="json")
173
     */
174
    protected $manufacturereIdList;
175
176
    /**
177
     * @var int|null
178
     *
179
     * @ORM\Column(nullable=true, type="integer")
180
     */
181
    protected $maxBuyAmount;
182
183
    /**
184
     * @var int|null
185
     *
186
     * @ORM\Column(nullable=true, type="integer")
187
     */
188
    protected $minBuyAmount;
189
190
    /**
191
     * @var int|null
192
     *
193
     * @ORM\Column(nullable=true, type="integer")
194
     */
195
    protected $minBuyAmountB2B;
196
197
    /**
198
     * The product number
199
     *
200
     * @var string|null
201
     *
202
     * @ORM\Column(nullable=true, type="string", length=191)
203
     */
204
    protected $number;
205
206
    /**
207
     * @var string|null
208
     *
209
     * @ORM\Column(nullable=true, type="string", length=191)
210
     */
211
    protected $picture;
212
213
    /**
214
     * @var int|null
215
     *
216
     * @ORM\Column(nullable=true, type="integer")
217
     */
218
    protected $salesCount;
219
220
    /**
221
     * @var array|null
222
     *
223
     * @ORM\Column(nullable=true, type="json")
224
     */
225
    protected $segmentIdList;
226
227
    /**
228
     * @var int|null
229
     *
230
     * @ORM\Column(nullable=true, type="integer")
231
     */
232
    protected $sortOrder;
233
234
    /**
235
     * @var int|null
236
     *
237
     * @ORM\Column(nullable=true, type="integer")
238
     */
239
    protected $stockCount;
240
241
    /**
242
     * @var int|null
243
     *
244
     * @ORM\Column(nullable=true, type="integer")
245
     */
246
    protected $stockLimit;
247
248
    /**
249
     * @var int|null
250
     *
251
     * @ORM\Column(nullable=true, type="integer")
252
     */
253
    protected $typeId;
254
255
    /**
256
     * @var \DateTimeImmutable|null
257
     *
258
     * @ORM\Column(nullable=true, type="datetime_immutable", options={"comment"="Updated info from Dandomain"})
259
     */
260
    protected $updated;
261
262
    /**
263
     * @var string|null
264
     *
265
     * @ORM\Column(nullable=true, type="string", length=191, options={"comment"="Updated by info from Dandomain"})
266
     */
267
    protected $updatedBy;
268
269
    /**
270
     * @var array|null
271
     *
272
     * @ORM\Column(nullable=true, type="json")
273
     */
274
    protected $variantGroupIdList;
275
276
    /**
277
     * @var array|null
278
     *
279
     * @ORM\Column(nullable=true, type="json")
280
     */
281
    protected $variantIdList;
282
283
    /**
284
     * @var int|null
285
     *
286
     * @ORM\Column(nullable=true, type="string", length=191)
287
     */
288
    protected $variantMasterId;
289
290
    /**
291
     * @var string|null
292
     *
293
     * @ORM\Column(nullable=true, type="string", length=191)
294
     */
295
    protected $vendorNumber;
296
297
    /**
298
     * @var int|null
299
     *
300
     * @ORM\Column(nullable=true, type="integer")
301
     */
302
    protected $weight;
303
304
    /**
305
     * @var Category[]|ArrayCollection
306
     */
307
    protected $categories;
308
309
    /**
310
     * @var Variant[]|ArrayCollection
311
     */
312
    protected $disabledVariants;
313
314
    /**
315
     * @var Manufacturer[]|ArrayCollection
316
     *
317
     * @ORM\JoinTable(name="loevgaard_dandomain_product_manufacturer")
318
     * @ORM\ManyToMany(cascade={"persist"}, inversedBy="products", targetEntity="Manufacturer")
319
     */
320
    protected $manufacturers;
321
322
    /**
323
     * @var Medium[]|ArrayCollection
324
     */
325
    protected $media;
326
327
    /**
328
     * @var Price[]|ArrayCollection
329
     */
330
    protected $prices;
331
332
    /**
333
     * @var ProductRelation[]|ArrayCollection
334
     */
335
    protected $productRelations;
336
337
    /**
338
     * @var ProductType
339
     */
340
    protected $productType;
341
342
    /**
343
     * @var Segment[]|ArrayCollection
344
     */
345
    protected $segments;
346
347
    /**
348
     * @var VariantGroup[]|ArrayCollection
349
     */
350
    protected $variantGroups;
351
352
    /**
353
     * @var Variant[]|ArrayCollection
354
     */
355
    protected $variants;
356
357
    public function __construct()
358
    {
359
        $this->categories = new ArrayCollection();
360
        $this->disabledVariants = new ArrayCollection();
361
        $this->manufacturers = new ArrayCollection();
362
        $this->media = new ArrayCollection();
363
        $this->prices = new ArrayCollection();
364
        $this->productRelations = new ArrayCollection();
365
        $this->segments = new ArrayCollection();
366
        $this->variants = new ArrayCollection();
367
        $this->variantGroups = new ArrayCollection();
368
    }
369
370
    public function addDisabledVariant(VariantInterface $variant) : ProductInterface
371
    {
372
        if(!$this->disabledVariants->contains($variant)) {
373
            $this->disabledVariants->add($variant);
374
        }
375
376
        return $this;
377
    }
378
379
    public function addMedium(MediumInterface $medium) : ProductInterface
380
    {
381
        if(!$this->media->contains($medium)) {
382
            $this->media->add($medium);
383
        }
384
385
        return $this;
386
    }
387
388
    public function addCategory(CategoryInterface $category) : ProductInterface
389
    {
390
        if(!$this->categories->contains($category)) {
391
            $this->categories->add($category);
392
        }
393
394
        return $this;
395
    }
396
397
    public function addManufacturer(ManufacturerInterface $manufacturer) : ProductInterface
398
    {
399
        if(!$this->hasManufacturer($manufacturer)) {
400
            $this->manufacturers->add($manufacturer);
401
        }
402
403
        return $this;
404
    }
405
406
    public function removeManufacturer(ManufacturerInterface $manufacturer) : bool
407
    {
408
        return $this->manufacturers->removeElement($manufacturer);
409
    }
410
411
    public function hasManufacturer(ManufacturerInterface $manufacturer) : bool
412
    {
413
        return $this->manufacturers->exists(function($key, ManufacturerInterface $element) use ($manufacturer) {
414
            return $element->getExternalId() === $manufacturer->getExternalId();
415
        });
416
    }
417
418
    public function addPrice(PriceInterface $price) : ProductInterface
419
    {
420
        if(!$this->prices->contains($price)) {
421
            $this->prices->add($price);
422
        }
423
424
        return $this;
425
    }
426
427
    public function addProductRelation(ProductRelationInterface $productRelation) : ProductInterface
428
    {
429
        if(!$this->productRelations->contains($productRelation)) {
430
            $this->productRelations->add($productRelation);
431
        }
432
433
        return $this;
434
    }
435
436
    public function addSegment(SegmentInterface $segment) : ProductInterface
437
    {
438
        if(!$this->segments->contains($segment)) {
439
            $this->segments->add($segment);
440
        }
441
442
        return $this;
443
    }
444
445
    public function addVariant(VariantInterface $variant) : ProductInterface
446
    {
447
        if(!$this->variants->contains($variant)) {
448
            $this->variants->add($variant);
449
        }
450
451
        return $this;
452
    }
453
454
    public function addVariantGroup(VariantGroupInterface $variantGroup) : ProductInterface
455
    {
456
        if(!$this->variantGroups->contains($variantGroup)) {
457
            $this->variantGroups->add($variantGroup);
458
        }
459
460
        return $this;
461
    }
462
463
    /**
464
     * @return int
465
     */
466
    public function getId(): int
467
    {
468
        return (int)$this->id;
469
    }
470
471
    /**
472
     * @param int $id
473
     * @return Product
474
     */
475
    public function setId(int $id)
476
    {
477
        $this->id = $id;
478
        return $this;
479
    }
480
481
    /**
482
     * @return int
483
     */
484
    public function getExternalId(): int
485
    {
486
        return (int)$this->externalId;
487
    }
488
489
    /**
490
     * @param int $externalId
491
     * @return Product
492
     */
493
    public function setExternalId(int $externalId)
494
    {
495
        $this->externalId = $externalId;
496
        return $this;
497
    }
498
499
    /**
500
     * @return null|string
501
     */
502
    public function getBarCodeNumber()
503
    {
504
        return $this->barCodeNumber;
505
    }
506
507
    /**
508
     * @param null|string $barCodeNumber
509
     * @return Product
510
     */
511
    public function setBarCodeNumber($barCodeNumber)
512
    {
513
        $this->barCodeNumber = $barCodeNumber;
514
        return $this;
515
    }
516
517
    /**
518
     * @return array|null
519
     */
520
    public function getCategoryIdList()
521
    {
522
        return $this->categoryIdList;
523
    }
524
525
    /**
526
     * @param array|null $categoryIdList
527
     * @return Product
528
     */
529
    public function setCategoryIdList($categoryIdList)
530
    {
531
        $this->categoryIdList = $categoryIdList;
532
        return $this;
533
    }
534
535
    /**
536
     * @return null|string
537
     */
538
    public function getComments()
539
    {
540
        return $this->comments;
541
    }
542
543
    /**
544
     * @param null|string $comments
545
     * @return Product
546
     */
547
    public function setComments($comments)
548
    {
549
        $this->comments = $comments;
550
        return $this;
551
    }
552
553
    /**
554
     * @return float|null
555
     */
556
    public function getCostPrice()
557
    {
558
        return $this->costPrice;
559
    }
560
561
    /**
562
     * @param float|null $costPrice
563
     * @return Product
564
     */
565
    public function setCostPrice($costPrice)
566
    {
567
        $this->costPrice = $costPrice;
568
        return $this;
569
    }
570
571
    /**
572
     * @return \DateTimeImmutable|null
573
     */
574
    public function getCreated()
575
    {
576
        return $this->created;
577
    }
578
579
    /**
580
     * @param \DateTimeImmutable|null $created
581
     * @return Product
582
     */
583
    public function setCreated($created)
584
    {
585
        $this->created = $created;
586
        return $this;
587
    }
588
589
    /**
590
     * @return null|string
591
     */
592
    public function getCreatedBy()
593
    {
594
        return $this->createdBy;
595
    }
596
597
    /**
598
     * @param null|string $createdBy
599
     * @return Product
600
     */
601
    public function setCreatedBy($createdBy)
602
    {
603
        $this->createdBy = $createdBy;
604
        return $this;
605
    }
606
607
    /**
608
     * @return int|null
609
     */
610
    public function getDefaultCategoryId()
611
    {
612
        return $this->defaultCategoryId;
613
    }
614
615
    /**
616
     * @param int|null $defaultCategoryId
617
     * @return Product
618
     */
619
    public function setDefaultCategoryId($defaultCategoryId)
620
    {
621
        $this->defaultCategoryId = $defaultCategoryId;
622
        return $this;
623
    }
624
625
    /**
626
     * @return array|null
627
     */
628
    public function getDisabledVariantIdList()
629
    {
630
        return $this->disabledVariantIdList;
631
    }
632
633
    /**
634
     * @param array|null $disabledVariantIdList
635
     * @return Product
636
     */
637
    public function setDisabledVariantIdList($disabledVariantIdList)
638
    {
639
        $this->disabledVariantIdList = $disabledVariantIdList;
640
        return $this;
641
    }
642
643
    /**
644
     * @return null|string
645
     */
646
    public function getEdbPriserProductNumber()
647
    {
648
        return $this->edbPriserProductNumber;
649
    }
650
651
    /**
652
     * @param null|string $edbPriserProductNumber
653
     * @return Product
654
     */
655
    public function setEdbPriserProductNumber($edbPriserProductNumber)
656
    {
657
        $this->edbPriserProductNumber = $edbPriserProductNumber;
658
        return $this;
659
    }
660
661
    /**
662
     * @return null|string
663
     */
664
    public function getFileSaleLink()
665
    {
666
        return $this->fileSaleLink;
667
    }
668
669
    /**
670
     * @param null|string $fileSaleLink
671
     * @return Product
672
     */
673
    public function setFileSaleLink($fileSaleLink)
674
    {
675
        $this->fileSaleLink = $fileSaleLink;
676
        return $this;
677
    }
678
679
    /**
680
     * @return null|string
681
     */
682
    public function getGoogleFeedCategory()
683
    {
684
        return $this->googleFeedCategory;
685
    }
686
687
    /**
688
     * @param null|string $googleFeedCategory
689
     * @return Product
690
     */
691
    public function setGoogleFeedCategory($googleFeedCategory)
692
    {
693
        $this->googleFeedCategory = $googleFeedCategory;
694
        return $this;
695
    }
696
697
    /**
698
     * @return bool|null
699
     */
700
    public function getisGiftCertificate()
701
    {
702
        return $this->isGiftCertificate;
703
    }
704
705
    /**
706
     * @param bool|null $isGiftCertificate
707
     * @return Product
708
     */
709
    public function setIsGiftCertificate($isGiftCertificate)
710
    {
711
        $this->isGiftCertificate = $isGiftCertificate;
712
        return $this;
713
    }
714
715
    /**
716
     * @return bool|null
717
     */
718
    public function getisModified()
719
    {
720
        return $this->isModified;
721
    }
722
723
    /**
724
     * @param bool|null $isModified
725
     * @return Product
726
     */
727
    public function setIsModified($isModified)
728
    {
729
        $this->isModified = $isModified;
730
        return $this;
731
    }
732
733
    /**
734
     * @return bool|null
735
     */
736
    public function getisRateVariants()
737
    {
738
        return $this->isRateVariants;
739
    }
740
741
    /**
742
     * @param bool|null $isRateVariants
743
     * @return Product
744
     */
745
    public function setIsRateVariants($isRateVariants)
746
    {
747
        $this->isRateVariants = $isRateVariants;
748
        return $this;
749
    }
750
751
    /**
752
     * @return bool|null
753
     */
754
    public function getisReviewVariants()
755
    {
756
        return $this->isReviewVariants;
757
    }
758
759
    /**
760
     * @param bool|null $isReviewVariants
761
     * @return Product
762
     */
763
    public function setIsReviewVariants($isReviewVariants)
764
    {
765
        $this->isReviewVariants = $isReviewVariants;
766
        return $this;
767
    }
768
769
    /**
770
     * @return bool|null
771
     */
772
    public function getisVariantMaster()
773
    {
774
        return $this->isVariantMaster;
775
    }
776
777
    /**
778
     * @param bool|null $isVariantMaster
779
     * @return Product
780
     */
781
    public function setIsVariantMaster($isVariantMaster)
782
    {
783
        $this->isVariantMaster = $isVariantMaster;
784
        return $this;
785
    }
786
787
    /**
788
     * @return null|string
789
     */
790
    public function getLocationNumber()
791
    {
792
        return $this->locationNumber;
793
    }
794
795
    /**
796
     * @param null|string $locationNumber
797
     * @return Product
798
     */
799
    public function setLocationNumber($locationNumber)
800
    {
801
        $this->locationNumber = $locationNumber;
802
        return $this;
803
    }
804
805
    /**
806
     * @return array|null
807
     */
808
    public function getManufacturereIdList()
809
    {
810
        return $this->manufacturereIdList;
811
    }
812
813
    /**
814
     * @param array|null $manufacturereIdList
815
     * @return Product
816
     */
817
    public function setManufacturereIdList($manufacturereIdList)
818
    {
819
        $this->manufacturereIdList = $manufacturereIdList;
820
        return $this;
821
    }
822
823
    /**
824
     * @return int|null
825
     */
826
    public function getMaxBuyAmount()
827
    {
828
        return $this->maxBuyAmount;
829
    }
830
831
    /**
832
     * @param int|null $maxBuyAmount
833
     * @return Product
834
     */
835
    public function setMaxBuyAmount($maxBuyAmount)
836
    {
837
        $this->maxBuyAmount = $maxBuyAmount;
838
        return $this;
839
    }
840
841
    /**
842
     * @return int|null
843
     */
844
    public function getMinBuyAmount()
845
    {
846
        return $this->minBuyAmount;
847
    }
848
849
    /**
850
     * @param int|null $minBuyAmount
851
     * @return Product
852
     */
853
    public function setMinBuyAmount($minBuyAmount)
854
    {
855
        $this->minBuyAmount = $minBuyAmount;
856
        return $this;
857
    }
858
859
    /**
860
     * @return int|null
861
     */
862
    public function getMinBuyAmountB2B()
863
    {
864
        return $this->minBuyAmountB2B;
865
    }
866
867
    /**
868
     * @param int|null $minBuyAmountB2B
869
     * @return Product
870
     */
871
    public function setMinBuyAmountB2B($minBuyAmountB2B)
872
    {
873
        $this->minBuyAmountB2B = $minBuyAmountB2B;
874
        return $this;
875
    }
876
877
    /**
878
     * @return null|string
879
     */
880
    public function getNumber()
881
    {
882
        return $this->number;
883
    }
884
885
    /**
886
     * @param null|string $number
887
     * @return Product
888
     */
889
    public function setNumber($number)
890
    {
891
        $this->number = $number;
892
        return $this;
893
    }
894
895
    /**
896
     * @return null|string
897
     */
898
    public function getPicture()
899
    {
900
        return $this->picture;
901
    }
902
903
    /**
904
     * @param null|string $picture
905
     * @return Product
906
     */
907
    public function setPicture($picture)
908
    {
909
        $this->picture = $picture;
910
        return $this;
911
    }
912
913
    /**
914
     * @return int|null
915
     */
916
    public function getSalesCount()
917
    {
918
        return $this->salesCount;
919
    }
920
921
    /**
922
     * @param int|null $salesCount
923
     * @return Product
924
     */
925
    public function setSalesCount($salesCount)
926
    {
927
        $this->salesCount = $salesCount;
928
        return $this;
929
    }
930
931
    /**
932
     * @return array|null
933
     */
934
    public function getSegmentIdList()
935
    {
936
        return $this->segmentIdList;
937
    }
938
939
    /**
940
     * @param array|null $segmentIdList
941
     * @return Product
942
     */
943
    public function setSegmentIdList($segmentIdList)
944
    {
945
        $this->segmentIdList = $segmentIdList;
946
        return $this;
947
    }
948
949
    /**
950
     * @return int|null
951
     */
952
    public function getSortOrder()
953
    {
954
        return $this->sortOrder;
955
    }
956
957
    /**
958
     * @param int|null $sortOrder
959
     * @return Product
960
     */
961
    public function setSortOrder($sortOrder)
962
    {
963
        $this->sortOrder = $sortOrder;
964
        return $this;
965
    }
966
967
    /**
968
     * @return int|null
969
     */
970
    public function getStockCount()
971
    {
972
        return $this->stockCount;
973
    }
974
975
    /**
976
     * @param int|null $stockCount
977
     * @return Product
978
     */
979
    public function setStockCount($stockCount)
980
    {
981
        $this->stockCount = $stockCount;
982
        return $this;
983
    }
984
985
    /**
986
     * @return int|null
987
     */
988
    public function getStockLimit()
989
    {
990
        return $this->stockLimit;
991
    }
992
993
    /**
994
     * @param int|null $stockLimit
995
     * @return Product
996
     */
997
    public function setStockLimit($stockLimit)
998
    {
999
        $this->stockLimit = $stockLimit;
1000
        return $this;
1001
    }
1002
1003
    /**
1004
     * @return int|null
1005
     */
1006
    public function getTypeId()
1007
    {
1008
        return $this->typeId;
1009
    }
1010
1011
    /**
1012
     * @param int|null $typeId
1013
     * @return Product
1014
     */
1015
    public function setTypeId($typeId)
1016
    {
1017
        $this->typeId = $typeId;
1018
        return $this;
1019
    }
1020
1021
    /**
1022
     * @return \DateTimeImmutable|null
1023
     */
1024
    public function getUpdated()
1025
    {
1026
        return $this->updated;
1027
    }
1028
1029
    /**
1030
     * @param \DateTimeImmutable|null $updated
1031
     * @return Product
1032
     */
1033
    public function setUpdated($updated)
1034
    {
1035
        $this->updated = $updated;
1036
        return $this;
1037
    }
1038
1039
    /**
1040
     * @return null|string
1041
     */
1042
    public function getUpdatedBy()
1043
    {
1044
        return $this->updatedBy;
1045
    }
1046
1047
    /**
1048
     * @param null|string $updatedBy
1049
     * @return Product
1050
     */
1051
    public function setUpdatedBy($updatedBy)
1052
    {
1053
        $this->updatedBy = $updatedBy;
1054
        return $this;
1055
    }
1056
1057
    /**
1058
     * @return array|null
1059
     */
1060
    public function getVariantGroupIdList()
1061
    {
1062
        return $this->variantGroupIdList;
1063
    }
1064
1065
    /**
1066
     * @param array|null $variantGroupIdList
1067
     * @return Product
1068
     */
1069
    public function setVariantGroupIdList($variantGroupIdList)
1070
    {
1071
        $this->variantGroupIdList = $variantGroupIdList;
1072
        return $this;
1073
    }
1074
1075
    /**
1076
     * @return array|null
1077
     */
1078
    public function getVariantIdList()
1079
    {
1080
        return $this->variantIdList;
1081
    }
1082
1083
    /**
1084
     * @param array|null $variantIdList
1085
     * @return Product
1086
     */
1087
    public function setVariantIdList($variantIdList)
1088
    {
1089
        $this->variantIdList = $variantIdList;
1090
        return $this;
1091
    }
1092
1093
    /**
1094
     * @return int|null
1095
     */
1096
    public function getVariantMasterId()
1097
    {
1098
        return $this->variantMasterId;
1099
    }
1100
1101
    /**
1102
     * @param int|null $variantMasterId
1103
     * @return Product
1104
     */
1105
    public function setVariantMasterId($variantMasterId)
1106
    {
1107
        $this->variantMasterId = $variantMasterId;
1108
        return $this;
1109
    }
1110
1111
    /**
1112
     * @return null|string
1113
     */
1114
    public function getVendorNumber()
1115
    {
1116
        return $this->vendorNumber;
1117
    }
1118
1119
    /**
1120
     * @param null|string $vendorNumber
1121
     * @return Product
1122
     */
1123
    public function setVendorNumber($vendorNumber)
1124
    {
1125
        $this->vendorNumber = $vendorNumber;
1126
        return $this;
1127
    }
1128
1129
    /**
1130
     * @return int|null
1131
     */
1132
    public function getWeight()
1133
    {
1134
        return $this->weight;
1135
    }
1136
1137
    /**
1138
     * @param int|null $weight
1139
     * @return Product
1140
     */
1141
    public function setWeight($weight)
1142
    {
1143
        $this->weight = $weight;
1144
        return $this;
1145
    }
1146
1147
    /**
1148
     * @return ArrayCollection|Category[]
1149
     */
1150
    public function getCategories()
1151
    {
1152
        return $this->categories;
1153
    }
1154
1155
    /**
1156
     * @param ArrayCollection|Category[] $categories
1157
     * @return Product
1158
     */
1159
    public function setCategories($categories)
1160
    {
1161
        $this->categories = $categories;
1162
        return $this;
1163
    }
1164
1165
    /**
1166
     * @return ArrayCollection|Variant[]
1167
     */
1168
    public function getDisabledVariants()
1169
    {
1170
        return $this->disabledVariants;
1171
    }
1172
1173
    /**
1174
     * @param ArrayCollection|Variant[] $disabledVariants
1175
     * @return Product
1176
     */
1177
    public function setDisabledVariants($disabledVariants)
1178
    {
1179
        $this->disabledVariants = $disabledVariants;
1180
        return $this;
1181
    }
1182
1183
    /**
1184
     * @return ArrayCollection|Manufacturer[]
1185
     */
1186
    public function getManufacturers()
1187
    {
1188
        return $this->manufacturers;
1189
    }
1190
1191
    /**
1192
     * @param ArrayCollection|Manufacturer[] $manufacturers
1193
     * @return Product
1194
     */
1195
    public function setManufacturers($manufacturers)
1196
    {
1197
        $this->manufacturers = $manufacturers;
1198
        return $this;
1199
    }
1200
1201
    /**
1202
     * @return ArrayCollection|Medium[]
1203
     */
1204
    public function getMedia()
1205
    {
1206
        return $this->media;
1207
    }
1208
1209
    /**
1210
     * @param ArrayCollection|Medium[] $media
1211
     * @return Product
1212
     */
1213
    public function setMedia($media)
1214
    {
1215
        $this->media = $media;
1216
        return $this;
1217
    }
1218
1219
    /**
1220
     * @return ArrayCollection|Price[]
1221
     */
1222
    public function getPrices()
1223
    {
1224
        return $this->prices;
1225
    }
1226
1227
    /**
1228
     * @param ArrayCollection|Price[] $prices
1229
     * @return Product
1230
     */
1231
    public function setPrices($prices)
1232
    {
1233
        $this->prices = $prices;
1234
        return $this;
1235
    }
1236
1237
    /**
1238
     * @return ArrayCollection|ProductRelation[]
1239
     */
1240
    public function getProductRelations()
1241
    {
1242
        return $this->productRelations;
1243
    }
1244
1245
    /**
1246
     * @param ArrayCollection|ProductRelation[] $productRelations
1247
     * @return Product
1248
     */
1249
    public function setProductRelations($productRelations)
1250
    {
1251
        $this->productRelations = $productRelations;
1252
        return $this;
1253
    }
1254
1255
    /**
1256
     * @return ProductType
1257
     */
1258
    public function getProductType(): ProductType
1259
    {
1260
        return $this->productType;
1261
    }
1262
1263
    /**
1264
     * @param ProductType $productType
1265
     * @return Product
1266
     */
1267
    public function setProductType(ProductType $productType)
1268
    {
1269
        $this->productType = $productType;
1270
        return $this;
1271
    }
1272
1273
    /**
1274
     * @return ArrayCollection|Segment[]
1275
     */
1276
    public function getSegments()
1277
    {
1278
        return $this->segments;
1279
    }
1280
1281
    /**
1282
     * @param ArrayCollection|Segment[] $segments
1283
     * @return Product
1284
     */
1285
    public function setSegments($segments)
1286
    {
1287
        $this->segments = $segments;
1288
        return $this;
1289
    }
1290
1291
    /**
1292
     * @return ArrayCollection|VariantGroup[]
1293
     */
1294
    public function getVariantGroups()
1295
    {
1296
        return $this->variantGroups;
1297
    }
1298
1299
    /**
1300
     * @param ArrayCollection|VariantGroup[] $variantGroups
1301
     * @return Product
1302
     */
1303
    public function setVariantGroups($variantGroups)
1304
    {
1305
        $this->variantGroups = $variantGroups;
1306
        return $this;
1307
    }
1308
1309
    /**
1310
     * @return ArrayCollection|Variant[]
1311
     */
1312
    public function getVariants()
1313
    {
1314
        return $this->variants;
1315
    }
1316
1317
    /**
1318
     * @param ArrayCollection|Variant[] $variants
1319
     * @return Product
1320
     */
1321
    public function setVariants($variants)
1322
    {
1323
        $this->variants = $variants;
1324
        return $this;
1325
    }
1326
}
1327