Completed
Push — master ( e4bbaa...28180f )
by Joachim
13:50
created

Product::addSegment()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 3
nc 2
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 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->manufacturers->exists(function($key, ManufacturerInterface $element) use ($manufacturer) {
400
            return $element->getExternalId() === $manufacturer->getExternalId();
401
        })) {
402
            $this->manufacturers->add($manufacturer);
403
        }
404
405
        return $this;
406
    }
407
408
    public function removeManufacturer(ManufacturerInterface $manufacturer) : bool
409
    {
410
        return $this->manufacturers->removeElement($manufacturer);
411
    }
412
413
    public function addPrice(PriceInterface $price) : ProductInterface
414
    {
415
        if(!$this->prices->contains($price)) {
416
            $this->prices->add($price);
417
        }
418
419
        return $this;
420
    }
421
422
    public function addProductRelation(ProductRelationInterface $productRelation) : ProductInterface
423
    {
424
        if(!$this->productRelations->contains($productRelation)) {
425
            $this->productRelations->add($productRelation);
426
        }
427
428
        return $this;
429
    }
430
431
    public function addSegment(SegmentInterface $segment) : ProductInterface
432
    {
433
        if(!$this->segments->contains($segment)) {
434
            $this->segments->add($segment);
435
        }
436
437
        return $this;
438
    }
439
440
    public function addVariant(VariantInterface $variant) : ProductInterface
441
    {
442
        if(!$this->variants->contains($variant)) {
443
            $this->variants->add($variant);
444
        }
445
446
        return $this;
447
    }
448
449
    public function addVariantGroup(VariantGroupInterface $variantGroup) : ProductInterface
450
    {
451
        if(!$this->variantGroups->contains($variantGroup)) {
452
            $this->variantGroups->add($variantGroup);
453
        }
454
455
        return $this;
456
    }
457
458
    /**
459
     * @return int
460
     */
461
    public function getId(): int
462
    {
463
        return (int)$this->id;
464
    }
465
466
    /**
467
     * @param int $id
468
     * @return Product
469
     */
470
    public function setId(int $id)
471
    {
472
        $this->id = $id;
473
        return $this;
474
    }
475
476
    /**
477
     * @return int
478
     */
479
    public function getExternalId(): int
480
    {
481
        return (int)$this->externalId;
482
    }
483
484
    /**
485
     * @param int $externalId
486
     * @return Product
487
     */
488
    public function setExternalId(int $externalId)
489
    {
490
        $this->externalId = $externalId;
491
        return $this;
492
    }
493
494
    /**
495
     * @return null|string
496
     */
497
    public function getBarCodeNumber()
498
    {
499
        return $this->barCodeNumber;
500
    }
501
502
    /**
503
     * @param null|string $barCodeNumber
504
     * @return Product
505
     */
506
    public function setBarCodeNumber($barCodeNumber)
507
    {
508
        $this->barCodeNumber = $barCodeNumber;
509
        return $this;
510
    }
511
512
    /**
513
     * @return array|null
514
     */
515
    public function getCategoryIdList()
516
    {
517
        return $this->categoryIdList;
518
    }
519
520
    /**
521
     * @param array|null $categoryIdList
522
     * @return Product
523
     */
524
    public function setCategoryIdList($categoryIdList)
525
    {
526
        $this->categoryIdList = $categoryIdList;
527
        return $this;
528
    }
529
530
    /**
531
     * @return null|string
532
     */
533
    public function getComments()
534
    {
535
        return $this->comments;
536
    }
537
538
    /**
539
     * @param null|string $comments
540
     * @return Product
541
     */
542
    public function setComments($comments)
543
    {
544
        $this->comments = $comments;
545
        return $this;
546
    }
547
548
    /**
549
     * @return float|null
550
     */
551
    public function getCostPrice()
552
    {
553
        return $this->costPrice;
554
    }
555
556
    /**
557
     * @param float|null $costPrice
558
     * @return Product
559
     */
560
    public function setCostPrice($costPrice)
561
    {
562
        $this->costPrice = $costPrice;
563
        return $this;
564
    }
565
566
    /**
567
     * @return \DateTimeImmutable|null
568
     */
569
    public function getCreated()
570
    {
571
        return $this->created;
572
    }
573
574
    /**
575
     * @param \DateTimeImmutable|null $created
576
     * @return Product
577
     */
578
    public function setCreated($created)
579
    {
580
        $this->created = $created;
581
        return $this;
582
    }
583
584
    /**
585
     * @return null|string
586
     */
587
    public function getCreatedBy()
588
    {
589
        return $this->createdBy;
590
    }
591
592
    /**
593
     * @param null|string $createdBy
594
     * @return Product
595
     */
596
    public function setCreatedBy($createdBy)
597
    {
598
        $this->createdBy = $createdBy;
599
        return $this;
600
    }
601
602
    /**
603
     * @return int|null
604
     */
605
    public function getDefaultCategoryId()
606
    {
607
        return $this->defaultCategoryId;
608
    }
609
610
    /**
611
     * @param int|null $defaultCategoryId
612
     * @return Product
613
     */
614
    public function setDefaultCategoryId($defaultCategoryId)
615
    {
616
        $this->defaultCategoryId = $defaultCategoryId;
617
        return $this;
618
    }
619
620
    /**
621
     * @return array|null
622
     */
623
    public function getDisabledVariantIdList()
624
    {
625
        return $this->disabledVariantIdList;
626
    }
627
628
    /**
629
     * @param array|null $disabledVariantIdList
630
     * @return Product
631
     */
632
    public function setDisabledVariantIdList($disabledVariantIdList)
633
    {
634
        $this->disabledVariantIdList = $disabledVariantIdList;
635
        return $this;
636
    }
637
638
    /**
639
     * @return null|string
640
     */
641
    public function getEdbPriserProductNumber()
642
    {
643
        return $this->edbPriserProductNumber;
644
    }
645
646
    /**
647
     * @param null|string $edbPriserProductNumber
648
     * @return Product
649
     */
650
    public function setEdbPriserProductNumber($edbPriserProductNumber)
651
    {
652
        $this->edbPriserProductNumber = $edbPriserProductNumber;
653
        return $this;
654
    }
655
656
    /**
657
     * @return null|string
658
     */
659
    public function getFileSaleLink()
660
    {
661
        return $this->fileSaleLink;
662
    }
663
664
    /**
665
     * @param null|string $fileSaleLink
666
     * @return Product
667
     */
668
    public function setFileSaleLink($fileSaleLink)
669
    {
670
        $this->fileSaleLink = $fileSaleLink;
671
        return $this;
672
    }
673
674
    /**
675
     * @return null|string
676
     */
677
    public function getGoogleFeedCategory()
678
    {
679
        return $this->googleFeedCategory;
680
    }
681
682
    /**
683
     * @param null|string $googleFeedCategory
684
     * @return Product
685
     */
686
    public function setGoogleFeedCategory($googleFeedCategory)
687
    {
688
        $this->googleFeedCategory = $googleFeedCategory;
689
        return $this;
690
    }
691
692
    /**
693
     * @return bool|null
694
     */
695
    public function getisGiftCertificate()
696
    {
697
        return $this->isGiftCertificate;
698
    }
699
700
    /**
701
     * @param bool|null $isGiftCertificate
702
     * @return Product
703
     */
704
    public function setIsGiftCertificate($isGiftCertificate)
705
    {
706
        $this->isGiftCertificate = $isGiftCertificate;
707
        return $this;
708
    }
709
710
    /**
711
     * @return bool|null
712
     */
713
    public function getisModified()
714
    {
715
        return $this->isModified;
716
    }
717
718
    /**
719
     * @param bool|null $isModified
720
     * @return Product
721
     */
722
    public function setIsModified($isModified)
723
    {
724
        $this->isModified = $isModified;
725
        return $this;
726
    }
727
728
    /**
729
     * @return bool|null
730
     */
731
    public function getisRateVariants()
732
    {
733
        return $this->isRateVariants;
734
    }
735
736
    /**
737
     * @param bool|null $isRateVariants
738
     * @return Product
739
     */
740
    public function setIsRateVariants($isRateVariants)
741
    {
742
        $this->isRateVariants = $isRateVariants;
743
        return $this;
744
    }
745
746
    /**
747
     * @return bool|null
748
     */
749
    public function getisReviewVariants()
750
    {
751
        return $this->isReviewVariants;
752
    }
753
754
    /**
755
     * @param bool|null $isReviewVariants
756
     * @return Product
757
     */
758
    public function setIsReviewVariants($isReviewVariants)
759
    {
760
        $this->isReviewVariants = $isReviewVariants;
761
        return $this;
762
    }
763
764
    /**
765
     * @return bool|null
766
     */
767
    public function getisVariantMaster()
768
    {
769
        return $this->isVariantMaster;
770
    }
771
772
    /**
773
     * @param bool|null $isVariantMaster
774
     * @return Product
775
     */
776
    public function setIsVariantMaster($isVariantMaster)
777
    {
778
        $this->isVariantMaster = $isVariantMaster;
779
        return $this;
780
    }
781
782
    /**
783
     * @return null|string
784
     */
785
    public function getLocationNumber()
786
    {
787
        return $this->locationNumber;
788
    }
789
790
    /**
791
     * @param null|string $locationNumber
792
     * @return Product
793
     */
794
    public function setLocationNumber($locationNumber)
795
    {
796
        $this->locationNumber = $locationNumber;
797
        return $this;
798
    }
799
800
    /**
801
     * @return array|null
802
     */
803
    public function getManufacturereIdList()
804
    {
805
        return $this->manufacturereIdList;
806
    }
807
808
    /**
809
     * @param array|null $manufacturereIdList
810
     * @return Product
811
     */
812
    public function setManufacturereIdList($manufacturereIdList)
813
    {
814
        $this->manufacturereIdList = $manufacturereIdList;
815
        return $this;
816
    }
817
818
    /**
819
     * @return int|null
820
     */
821
    public function getMaxBuyAmount()
822
    {
823
        return $this->maxBuyAmount;
824
    }
825
826
    /**
827
     * @param int|null $maxBuyAmount
828
     * @return Product
829
     */
830
    public function setMaxBuyAmount($maxBuyAmount)
831
    {
832
        $this->maxBuyAmount = $maxBuyAmount;
833
        return $this;
834
    }
835
836
    /**
837
     * @return int|null
838
     */
839
    public function getMinBuyAmount()
840
    {
841
        return $this->minBuyAmount;
842
    }
843
844
    /**
845
     * @param int|null $minBuyAmount
846
     * @return Product
847
     */
848
    public function setMinBuyAmount($minBuyAmount)
849
    {
850
        $this->minBuyAmount = $minBuyAmount;
851
        return $this;
852
    }
853
854
    /**
855
     * @return int|null
856
     */
857
    public function getMinBuyAmountB2B()
858
    {
859
        return $this->minBuyAmountB2B;
860
    }
861
862
    /**
863
     * @param int|null $minBuyAmountB2B
864
     * @return Product
865
     */
866
    public function setMinBuyAmountB2B($minBuyAmountB2B)
867
    {
868
        $this->minBuyAmountB2B = $minBuyAmountB2B;
869
        return $this;
870
    }
871
872
    /**
873
     * @return null|string
874
     */
875
    public function getNumber()
876
    {
877
        return $this->number;
878
    }
879
880
    /**
881
     * @param null|string $number
882
     * @return Product
883
     */
884
    public function setNumber($number)
885
    {
886
        $this->number = $number;
887
        return $this;
888
    }
889
890
    /**
891
     * @return null|string
892
     */
893
    public function getPicture()
894
    {
895
        return $this->picture;
896
    }
897
898
    /**
899
     * @param null|string $picture
900
     * @return Product
901
     */
902
    public function setPicture($picture)
903
    {
904
        $this->picture = $picture;
905
        return $this;
906
    }
907
908
    /**
909
     * @return int|null
910
     */
911
    public function getSalesCount()
912
    {
913
        return $this->salesCount;
914
    }
915
916
    /**
917
     * @param int|null $salesCount
918
     * @return Product
919
     */
920
    public function setSalesCount($salesCount)
921
    {
922
        $this->salesCount = $salesCount;
923
        return $this;
924
    }
925
926
    /**
927
     * @return array|null
928
     */
929
    public function getSegmentIdList()
930
    {
931
        return $this->segmentIdList;
932
    }
933
934
    /**
935
     * @param array|null $segmentIdList
936
     * @return Product
937
     */
938
    public function setSegmentIdList($segmentIdList)
939
    {
940
        $this->segmentIdList = $segmentIdList;
941
        return $this;
942
    }
943
944
    /**
945
     * @return int|null
946
     */
947
    public function getSortOrder()
948
    {
949
        return $this->sortOrder;
950
    }
951
952
    /**
953
     * @param int|null $sortOrder
954
     * @return Product
955
     */
956
    public function setSortOrder($sortOrder)
957
    {
958
        $this->sortOrder = $sortOrder;
959
        return $this;
960
    }
961
962
    /**
963
     * @return int|null
964
     */
965
    public function getStockCount()
966
    {
967
        return $this->stockCount;
968
    }
969
970
    /**
971
     * @param int|null $stockCount
972
     * @return Product
973
     */
974
    public function setStockCount($stockCount)
975
    {
976
        $this->stockCount = $stockCount;
977
        return $this;
978
    }
979
980
    /**
981
     * @return int|null
982
     */
983
    public function getStockLimit()
984
    {
985
        return $this->stockLimit;
986
    }
987
988
    /**
989
     * @param int|null $stockLimit
990
     * @return Product
991
     */
992
    public function setStockLimit($stockLimit)
993
    {
994
        $this->stockLimit = $stockLimit;
995
        return $this;
996
    }
997
998
    /**
999
     * @return int|null
1000
     */
1001
    public function getTypeId()
1002
    {
1003
        return $this->typeId;
1004
    }
1005
1006
    /**
1007
     * @param int|null $typeId
1008
     * @return Product
1009
     */
1010
    public function setTypeId($typeId)
1011
    {
1012
        $this->typeId = $typeId;
1013
        return $this;
1014
    }
1015
1016
    /**
1017
     * @return \DateTimeImmutable|null
1018
     */
1019
    public function getUpdated()
1020
    {
1021
        return $this->updated;
1022
    }
1023
1024
    /**
1025
     * @param \DateTimeImmutable|null $updated
1026
     * @return Product
1027
     */
1028
    public function setUpdated($updated)
1029
    {
1030
        $this->updated = $updated;
1031
        return $this;
1032
    }
1033
1034
    /**
1035
     * @return null|string
1036
     */
1037
    public function getUpdatedBy()
1038
    {
1039
        return $this->updatedBy;
1040
    }
1041
1042
    /**
1043
     * @param null|string $updatedBy
1044
     * @return Product
1045
     */
1046
    public function setUpdatedBy($updatedBy)
1047
    {
1048
        $this->updatedBy = $updatedBy;
1049
        return $this;
1050
    }
1051
1052
    /**
1053
     * @return array|null
1054
     */
1055
    public function getVariantGroupIdList()
1056
    {
1057
        return $this->variantGroupIdList;
1058
    }
1059
1060
    /**
1061
     * @param array|null $variantGroupIdList
1062
     * @return Product
1063
     */
1064
    public function setVariantGroupIdList($variantGroupIdList)
1065
    {
1066
        $this->variantGroupIdList = $variantGroupIdList;
1067
        return $this;
1068
    }
1069
1070
    /**
1071
     * @return array|null
1072
     */
1073
    public function getVariantIdList()
1074
    {
1075
        return $this->variantIdList;
1076
    }
1077
1078
    /**
1079
     * @param array|null $variantIdList
1080
     * @return Product
1081
     */
1082
    public function setVariantIdList($variantIdList)
1083
    {
1084
        $this->variantIdList = $variantIdList;
1085
        return $this;
1086
    }
1087
1088
    /**
1089
     * @return int|null
1090
     */
1091
    public function getVariantMasterId()
1092
    {
1093
        return $this->variantMasterId;
1094
    }
1095
1096
    /**
1097
     * @param int|null $variantMasterId
1098
     * @return Product
1099
     */
1100
    public function setVariantMasterId($variantMasterId)
1101
    {
1102
        $this->variantMasterId = $variantMasterId;
1103
        return $this;
1104
    }
1105
1106
    /**
1107
     * @return null|string
1108
     */
1109
    public function getVendorNumber()
1110
    {
1111
        return $this->vendorNumber;
1112
    }
1113
1114
    /**
1115
     * @param null|string $vendorNumber
1116
     * @return Product
1117
     */
1118
    public function setVendorNumber($vendorNumber)
1119
    {
1120
        $this->vendorNumber = $vendorNumber;
1121
        return $this;
1122
    }
1123
1124
    /**
1125
     * @return int|null
1126
     */
1127
    public function getWeight()
1128
    {
1129
        return $this->weight;
1130
    }
1131
1132
    /**
1133
     * @param int|null $weight
1134
     * @return Product
1135
     */
1136
    public function setWeight($weight)
1137
    {
1138
        $this->weight = $weight;
1139
        return $this;
1140
    }
1141
1142
    /**
1143
     * @return ArrayCollection|Category[]
1144
     */
1145
    public function getCategories()
1146
    {
1147
        return $this->categories;
1148
    }
1149
1150
    /**
1151
     * @param ArrayCollection|Category[] $categories
1152
     * @return Product
1153
     */
1154
    public function setCategories($categories)
1155
    {
1156
        $this->categories = $categories;
1157
        return $this;
1158
    }
1159
1160
    /**
1161
     * @return ArrayCollection|Variant[]
1162
     */
1163
    public function getDisabledVariants()
1164
    {
1165
        return $this->disabledVariants;
1166
    }
1167
1168
    /**
1169
     * @param ArrayCollection|Variant[] $disabledVariants
1170
     * @return Product
1171
     */
1172
    public function setDisabledVariants($disabledVariants)
1173
    {
1174
        $this->disabledVariants = $disabledVariants;
1175
        return $this;
1176
    }
1177
1178
    /**
1179
     * @return ArrayCollection|Manufacturer[]
1180
     */
1181
    public function getManufacturers()
1182
    {
1183
        return $this->manufacturers;
1184
    }
1185
1186
    /**
1187
     * @param ArrayCollection|Manufacturer[] $manufacturers
1188
     * @return Product
1189
     */
1190
    public function setManufacturers($manufacturers)
1191
    {
1192
        $this->manufacturers = $manufacturers;
1193
        return $this;
1194
    }
1195
1196
    /**
1197
     * @return ArrayCollection|Medium[]
1198
     */
1199
    public function getMedia()
1200
    {
1201
        return $this->media;
1202
    }
1203
1204
    /**
1205
     * @param ArrayCollection|Medium[] $media
1206
     * @return Product
1207
     */
1208
    public function setMedia($media)
1209
    {
1210
        $this->media = $media;
1211
        return $this;
1212
    }
1213
1214
    /**
1215
     * @return ArrayCollection|Price[]
1216
     */
1217
    public function getPrices()
1218
    {
1219
        return $this->prices;
1220
    }
1221
1222
    /**
1223
     * @param ArrayCollection|Price[] $prices
1224
     * @return Product
1225
     */
1226
    public function setPrices($prices)
1227
    {
1228
        $this->prices = $prices;
1229
        return $this;
1230
    }
1231
1232
    /**
1233
     * @return ArrayCollection|ProductRelation[]
1234
     */
1235
    public function getProductRelations()
1236
    {
1237
        return $this->productRelations;
1238
    }
1239
1240
    /**
1241
     * @param ArrayCollection|ProductRelation[] $productRelations
1242
     * @return Product
1243
     */
1244
    public function setProductRelations($productRelations)
1245
    {
1246
        $this->productRelations = $productRelations;
1247
        return $this;
1248
    }
1249
1250
    /**
1251
     * @return ProductType
1252
     */
1253
    public function getProductType(): ProductType
1254
    {
1255
        return $this->productType;
1256
    }
1257
1258
    /**
1259
     * @param ProductType $productType
1260
     * @return Product
1261
     */
1262
    public function setProductType(ProductType $productType)
1263
    {
1264
        $this->productType = $productType;
1265
        return $this;
1266
    }
1267
1268
    /**
1269
     * @return ArrayCollection|Segment[]
1270
     */
1271
    public function getSegments()
1272
    {
1273
        return $this->segments;
1274
    }
1275
1276
    /**
1277
     * @param ArrayCollection|Segment[] $segments
1278
     * @return Product
1279
     */
1280
    public function setSegments($segments)
1281
    {
1282
        $this->segments = $segments;
1283
        return $this;
1284
    }
1285
1286
    /**
1287
     * @return ArrayCollection|VariantGroup[]
1288
     */
1289
    public function getVariantGroups()
1290
    {
1291
        return $this->variantGroups;
1292
    }
1293
1294
    /**
1295
     * @param ArrayCollection|VariantGroup[] $variantGroups
1296
     * @return Product
1297
     */
1298
    public function setVariantGroups($variantGroups)
1299
    {
1300
        $this->variantGroups = $variantGroups;
1301
        return $this;
1302
    }
1303
1304
    /**
1305
     * @return ArrayCollection|Variant[]
1306
     */
1307
    public function getVariants()
1308
    {
1309
        return $this->variants;
1310
    }
1311
1312
    /**
1313
     * @param ArrayCollection|Variant[] $variants
1314
     * @return Product
1315
     */
1316
    public function setVariants($variants)
1317
    {
1318
        $this->variants = $variants;
1319
        return $this;
1320
    }
1321
}
1322