src/Entity/Prod.php line 27

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\DBAL\Types\Types;
  4. use Doctrine\ORM\Mapping\Index;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use App\Repository\ProdRepository;
  7. use App\Entity\Translation\ProdTranslation;
  8. use App\Env;
  9. use Gedmo\Mapping\Annotation\TranslationEntity;
  10. use Doctrine\Common\Collections\ArrayCollection;
  11. use Gedmo\Mapping\Annotation\Locale as GedmoLocale;
  12. use Gedmo\Mapping\Annotation\Translatable as GedmoTranslatable;
  13. #[ORM\Entity(repositoryClassProdRepository::class)]
  14. #[TranslationEntity(class: ProdTranslation::class)]
  15. #[Index(name"prod_cat"columns: ["cat"])]
  16. #[Index(name"prod_art"columns: ["art"])]
  17. #[Index(name"prod_prior"columns: ["prior"])]
  18. #[Index(name"prod_pop"columns: ["pop""visible"])]
  19. #[Index(name"prod_action"columns: ["action""visible"])]
  20. #[Index(name"prod_mix"columns: ["mix""visible"])]
  21. #[Index(name"prod_new"columns: ["new""visible"])]
  22. #[Index(name"prod_sale"columns: ["sale""visible"])]
  23. #[Index(name"prod_tags"columns: ["tags"])]
  24. class Prod implements EntityInterface
  25. {
  26.     #[ORM\Id]
  27.     #[ORM\GeneratedValue]
  28.     #[ORM\Column]
  29.     private ?int $id null;
  30.     #[ORM\Column(type'integer')]
  31.     private int $cat 0;
  32.     #[ORM\Column(length255)]
  33.     private ?string $intname null;
  34.     #[GedmoTranslatable]
  35.     #[ORM\Column(length255)]
  36.     private ?string $name null;
  37.     #[ORM\Column(length255)]
  38.     private ?string $art null;
  39.     #[GedmoTranslatable]
  40.     #[ORM\Column(typeTypes::TEXT)]
  41.     private ?string $short null;
  42.     #[GedmoTranslatable]
  43.     #[ORM\Column(typeTypes::TEXT)]
  44.     private ?string $cont null;
  45.     #[ORM\Column]
  46.     private ?float $price null;
  47.     #[ORM\Column]
  48.     private ?float $price2 null;
  49.     #[ORM\Column]
  50.     private ?float $price3 null;
  51.     #[ORM\Column]
  52.     private ?float $price4 null;
  53.     #[ORM\Column]
  54.     private ?float $priceopt null;
  55.     #[ORM\Column]
  56.     private ?float $priceopt2 null;
  57.     #[ORM\Column]
  58.     private ?float $priceopt3 null;
  59.     #[ORM\Column]
  60.     private ?float $priceopt4 null;
  61.     #[ORM\Column]
  62.     private ?float $skidka null;
  63.     #[ORM\Column]
  64.     private ?float $skidka2 null;
  65.     #[ORM\Column]
  66.     private ?float $skidka3 null;
  67.     #[ORM\Column]
  68.     private ?float $skidka4 null;
  69.     #[ORM\Column]
  70.     private ?float $skidkaopt null;
  71.     #[ORM\Column]
  72.     private ?float $skidkaopt2 null;
  73.     #[ORM\Column]
  74.     private ?float $skidkaopt3 null;
  75.     #[ORM\Column]
  76.     private ?float $skidkaopt4 null;
  77.     #[ORM\Column]
  78.     private array $numdiscount = [];
  79.     #[ORM\Column]
  80.     private array $numdiscount2 = [];
  81.     #[ORM\Column]
  82.     private array $numdiscount3 = [];
  83.     #[ORM\Column]
  84.     private array $numdiscount4 = [];
  85.     #[ORM\Column]
  86.     private array $numdiscountopt = [];
  87.     #[ORM\Column]
  88.     private array $numdiscountopt2 = [];
  89.     #[ORM\Column]
  90.     private array $numdiscountopt3 = [];
  91.     #[ORM\Column]
  92.     private array $numdiscountopt4 = [];
  93.     #[ORM\Column]
  94.     private ?int $num null;
  95.     #[ORM\Column]
  96.     private ?int $num2 null;
  97.     #[ORM\Column]
  98.     private ?int $num3 null;
  99.     #[ORM\Column]
  100.     private ?int $num4 null;
  101.     #[ORM\Column(length255)]
  102.     #[GedmoTranslatable]
  103.     private ?string $inpack null;
  104.     #[ORM\Column(length255)]
  105.     #[GedmoTranslatable]
  106.     private ?string $inpack2 null;
  107.     #[ORM\Column(length255)]
  108.     #[GedmoTranslatable]
  109.     private ?string $inpack3 null;
  110.     #[ORM\Column(length255)]
  111.     #[GedmoTranslatable]
  112.     private ?string $inpack4 null;
  113.     #[ORM\Column]
  114.     private ?int $weight null;
  115.     #[ORM\Column]
  116.     private ?int $weight2 null;
  117.     #[ORM\Column]
  118.     private ?int $weight3 null;
  119.     #[ORM\Column]
  120.     private ?int $weight4 null;
  121.     #[ORM\Column]
  122.     private ?bool $visible null;
  123.     #[ORM\Column]
  124.     private ?bool $pop null;
  125.     #[ORM\Column]
  126.     private ?bool $action null;
  127.     #[ORM\Column]
  128.     private ?bool $mix null;
  129.     #[ORM\Column]
  130.     private ?bool $main null;
  131.     #[ORM\Column]
  132.     private ?bool $new null;
  133.     #[ORM\Column]
  134.     private ?bool $sale null;
  135.     #[ORM\Column]
  136.     private ?bool $onsale null;
  137.     #[ORM\Column]
  138.     private ?int $prior null;
  139.     #[GedmoTranslatable]
  140.     #[ORM\Column(length1000)]
  141.     private ?string $title null;
  142.     #[GedmoTranslatable]
  143.     #[ORM\Column(length1000)]
  144.     private ?string $descr null;
  145.     #[GedmoTranslatable]
  146.     #[ORM\Column(length1000)]
  147.     private ?string $kw null;
  148.     #[GedmoTranslatable]
  149.     #[ORM\Column(length1000)]
  150.     private ?string $h1 null;
  151.     #[ORM\Column]
  152.     private ?int $rating null;
  153.     #[ORM\Column(length255)]
  154.     private ?string $spec null;
  155.     #[ORM\Column]
  156.     private ?int $ordered null;
  157.     #[ORM\Column(length255)]
  158.     private ?string $izm null;
  159.     #[ORM\Column(length255)]
  160.     private ?string $pic null;
  161.     #[ORM\Column]
  162.     private ?int $views null;
  163.     #[ORM\Column]
  164.     private ?bool $justuploaded null;
  165.     #[ORM\Column]
  166.     private ?int $uploaded null;
  167.     #[ORM\Column]
  168.     private ?int $changed null;
  169.     #[ORM\Column]
  170.     private ?array $colors;
  171.     #[ORM\Column(length255)]
  172.     private ?string $sku null;
  173.     #[ORM\Column(length255)]
  174.     private ?string $model null;
  175.     #[ORM\Column(length1000)]
  176.     private ?string $chars null;
  177.     #[ORM\Column(length1000)]
  178.     private ?string $tags null;
  179.     public $prices = [];
  180.     public $photos = [];
  181.     public $childs = [];
  182.     #[GedmoLocale]
  183.     private $locale;
  184.     #[ORM\OneToMany(targetEntityProdTranslation::class, mappedBy'object'cascade: ['persist''remove'])]
  185.     private $translations;
  186.     #[ORM\Column(length255nullabletrue)]
  187.     private ?string $externalId null;
  188.     public function __construct()
  189.     {
  190.         $this->colors = [];
  191.         $this->translations = new ArrayCollection();
  192.     }
  193.     public function setLocale($locale)
  194.     {
  195.         $this->locale $locale;
  196.     }
  197.     public function getTranslations()
  198.     {
  199.         return $this->translations;
  200.     }
  201.     public function addTranslation(ProdTranslation $t)
  202.     {
  203.         if (!$this->translations->contains($t)) {
  204.             $this->translations[] = $t;
  205.             $t->setObject($this);
  206.         }
  207.     }
  208.     
  209.     public function getId(): ?int
  210.     {
  211.         return $this->id;
  212.     }
  213.     public function getCat(): int
  214.     {
  215.         return $this->cat;
  216.     }
  217.     public function setCat(int $cat): self
  218.     {
  219.         $this->cat $cat;
  220.         return $this;
  221.     }
  222.     public function getIntname(): ?string
  223.     {
  224.         return $this->intname;
  225.     }
  226.     public function setIntname(string $intname): self
  227.     {
  228.         $this->intname $intname;
  229.         return $this;
  230.     }
  231.     public function getName(): ?string
  232.     {
  233.         return $this->name;
  234.     }
  235.     public function setName(string $name): self
  236.     {
  237.         $this->name $name;
  238.         return $this;
  239.     }
  240.     public function getArt(): ?string
  241.     {
  242.         return $this->art;
  243.     }
  244.     public function setArt(string $art): self
  245.     {
  246.         $this->art $art;
  247.         return $this;
  248.     }
  249.     public function getShort(): ?string
  250.     {
  251.         return $this->short;
  252.     }
  253.     public function setShort(string $short): self
  254.     {
  255.         $this->short $short;
  256.         return $this;
  257.     }
  258.     public function getCont(): ?string
  259.     {
  260.         return str_replace(["|"], ["<br>"], $this->cont);
  261.     }
  262.     public function setCont(string $cont): self
  263.     {
  264.         $this->cont $cont;
  265.         return $this;
  266.     }
  267.     public function setPrices(array $prices)
  268.     {
  269.         $this->prices $prices;
  270.     }
  271.     public function getPrices(): array
  272.     {
  273.         return $this->prices;
  274.     }
  275.     public function getPrice(): ?float
  276.     {
  277.         return Env::is_opt() ? $this->priceopt $this->price;
  278.     }
  279.     public function setPrice(float $price): self
  280.     {
  281.         $this->price $price;
  282.         return $this;
  283.     }
  284.     public function getPrice2(): ?float
  285.     {
  286.         return Env::is_opt() ? $this->priceopt2 $this->price2;
  287.     }
  288.     public function setPrice2(float $price2): self
  289.     {
  290.         $this->price2 $price2;
  291.         return $this;
  292.     }
  293.     public function getPrice3(): ?float
  294.     {
  295.         return Env::is_opt() ? $this->priceopt3 $this->price3;
  296.     }
  297.     public function setPrice3(float $price3): self
  298.     {
  299.         $this->price3 $price3;
  300.         return $this;
  301.     }
  302.     public function getPrice4(): ?float
  303.     {
  304.         return Env::is_opt() ? $this->priceopt4 $this->price4;
  305.     }
  306.     public function setPrice4(float $price4): self
  307.     {
  308.         $this->price4 $price4;
  309.         return $this;
  310.     }
  311.     public function getPriceopt(): ?float
  312.     {
  313.         return $this->priceopt;
  314.     }
  315.     public function setPriceopt(float $priceopt): self
  316.     {
  317.         $this->priceopt $priceopt;
  318.         return $this;
  319.     }
  320.     public function getPriceopt2(): ?float
  321.     {
  322.         return $this->priceopt2;
  323.     }
  324.     public function setPriceopt2(float $priceopt2): self
  325.     {
  326.         $this->priceopt2 $priceopt2;
  327.         return $this;
  328.     }
  329.     public function getPriceopt3(): ?float
  330.     {
  331.         return $this->priceopt3;
  332.     }
  333.     public function setPriceopt3(float $priceopt3): self
  334.     {
  335.         $this->priceopt3 $priceopt3;
  336.         return $this;
  337.     }
  338.     public function getPriceopt4(): ?float
  339.     {
  340.         return $this->priceopt4;
  341.     }
  342.     public function setPriceopt4(float $priceopt4): self
  343.     {
  344.         $this->priceopt4 $priceopt4;
  345.         return $this;
  346.     }
  347.     public function getSkidka(): ?float
  348.     {
  349.         return Env::is_opt() ? $this->skidkaopt $this->skidka;
  350.     }
  351.     public function setSkidka(float $skidka): self
  352.     {
  353.         $this->skidka $skidka;
  354.         return $this;
  355.     }
  356.     public function getSkidka2(): ?float
  357.     {
  358.         return Env::is_opt() ? $this->skidkaopt2 $this->skidka2;
  359.     }
  360.     public function setSkidka2(float $skidka2): self
  361.     {
  362.         $this->skidka2 $skidka2;
  363.         return $this;
  364.     }
  365.     public function getSkidka3(): ?float
  366.     {
  367.         return Env::is_opt() ? $this->skidkaopt3 $this->skidka3;
  368.     }
  369.     public function setSkidka3(float $skidka3): self
  370.     {
  371.         $this->skidka3 $skidka3;
  372.         return $this;
  373.     }
  374.     public function getSkidka4(): ?float
  375.     {
  376.         return Env::is_opt() ? $this->skidkaopt4 $this->skidka4;
  377.     }
  378.     public function setSkidka4(float $skidka4): self
  379.     {
  380.         $this->skidka4 $skidka4;
  381.         return $this;
  382.     }
  383.     public function getSkidkaopt(): ?float
  384.     {
  385.         return $this->skidkaopt;
  386.     }
  387.     public function setSkidkaopt(float $skidkaopt): self
  388.     {
  389.         $this->skidkaopt $skidkaopt;
  390.         return $this;
  391.     }
  392.     public function getSkidkaopt2(): ?float
  393.     {
  394.         return $this->skidkaopt2;
  395.     }
  396.     public function setSkidkaopt2(float $skidkaopt2): self
  397.     {
  398.         $this->skidkaopt2 $skidkaopt2;
  399.         return $this;
  400.     }
  401.     public function getSkidkaopt3(): ?float
  402.     {
  403.         return $this->skidkaopt3;
  404.     }
  405.     public function setSkidkaopt3(float $skidkaopt3): self
  406.     {
  407.         $this->skidkaopt3 $skidkaopt3;
  408.         return $this;
  409.     }
  410.     public function getSkidkaopt4(): ?float
  411.     {
  412.         return $this->skidkaopt4;
  413.     }
  414.     public function setSkidkaopt4(float $skidkaopt4): self
  415.     {
  416.         $this->skidkaopt4 $skidkaopt4;
  417.         return $this;
  418.     }
  419.     public function getNumdiscount(): array
  420.     {
  421.         return Env::is_opt() ? $this->numdiscountopt $this->numdiscount;
  422.     }
  423.     public function setNumdiscount(array $numdiscount): self
  424.     {
  425.         $this->numdiscount $numdiscount;
  426.         return $this;
  427.     }
  428.     public function getNumdiscount2(): array
  429.     {
  430.         return Env::is_opt() ? $this->numdiscountopt2 $this->numdiscount2;
  431.     }
  432.     public function setNumdiscount2(array $numdiscount2): self
  433.     {
  434.         $this->numdiscount2 $numdiscount2;
  435.         return $this;
  436.     }
  437.     public function getNumdiscount3(): array
  438.     {
  439.         return Env::is_opt() ? $this->numdiscountopt3 $this->numdiscount3;
  440.     }
  441.     public function setNumdiscount3(array $numdiscount3): self
  442.     {
  443.         $this->numdiscount3 $numdiscount3;
  444.         return $this;
  445.     }
  446.     public function getNumdiscount4(): array
  447.     {
  448.         return Env::is_opt() ? $this->numdiscountopt4 $this->numdiscount4;
  449.     }
  450.     public function setNumdiscount4(array $numdiscount4): self
  451.     {
  452.         $this->numdiscount4 $numdiscount4;
  453.         return $this;
  454.     }
  455.     public function getNumdiscountopt(): array
  456.     {
  457.         return $this->numdiscountopt;
  458.     }
  459.     public function setNumdiscountopt(array $numdiscountopt): self
  460.     {
  461.         $this->numdiscountopt $numdiscountopt;
  462.         return $this;
  463.     }
  464.     public function getNumdiscountopt2(): array
  465.     {
  466.         return $this->numdiscountopt2;
  467.     }
  468.     public function setNumdiscountopt2(array $numdiscountopt2): self
  469.     {
  470.         $this->numdiscountopt2 $numdiscountopt2;
  471.         return $this;
  472.     }
  473.     public function getNumdiscountopt3(): array
  474.     {
  475.         return $this->numdiscountopt3;
  476.     }
  477.     public function setNumdiscountopt3(array $numdiscountopt3): self
  478.     {
  479.         $this->numdiscountopt3 $numdiscountopt3;
  480.         return $this;
  481.     }
  482.     public function getNumdiscountopt4(): array
  483.     {
  484.         return $this->numdiscountopt4;
  485.     }
  486.     public function setNumdiscountopt4(array $numdiscountopt4): self
  487.     {
  488.         $this->numdiscountopt4 $numdiscountopt4;
  489.         return $this;
  490.     }
  491.     public function getNum(): ?int
  492.     {
  493.         return $this->num;
  494.     }
  495.     public function setNum(int $num): self
  496.     {
  497.         $this->num $num;
  498.         return $this;
  499.     }
  500.     public function getNum2(): ?int
  501.     {
  502.         return $this->num2;
  503.     }
  504.     public function setNum2(int $num2): self
  505.     {
  506.         $this->num2 $num2;
  507.         return $this;
  508.     }
  509.     public function getNum3(): ?int
  510.     {
  511.         return $this->num3;
  512.     }
  513.     public function setNum3(int $num3): self
  514.     {
  515.         $this->num3 $num3;
  516.         return $this;
  517.     }
  518.     public function getNum4(): ?int
  519.     {
  520.         return $this->num4;
  521.     }
  522.     public function setNum4(int $num4): self
  523.     {
  524.         $this->num4 $num4;
  525.         return $this;
  526.     }
  527.     public function getInpack(): ?string
  528.     {
  529.         return $this->inpack;
  530.     }
  531.     public function setInpack(string $inpack): self
  532.     {
  533.         $this->inpack $inpack;
  534.         return $this;
  535.     }
  536.     public function getInpack2(): ?string
  537.     {
  538.         return $this->inpack2;
  539.     }
  540.     public function setInpack2(string $inpack2): self
  541.     {
  542.         $this->inpack2 $inpack2;
  543.         return $this;
  544.     }
  545.     public function getInpack3(): ?string
  546.     {
  547.         return $this->inpack3;
  548.     }
  549.     public function setInpack3(string $inpack3): self
  550.     {
  551.         $this->inpack3 $inpack3;
  552.         return $this;
  553.     }
  554.     public function getInpack4(): ?string
  555.     {
  556.         return $this->inpack4;
  557.     }
  558.     public function setInpack4(string $inpack4): self
  559.     {
  560.         $this->inpack4 $inpack4;
  561.         return $this;
  562.     }
  563.     public function getWeight(): ?int
  564.     {
  565.         return $this->weight;
  566.     }
  567.     public function setWeight(int $weight): self
  568.     {
  569.         $this->weight $weight;
  570.         return $this;
  571.     }
  572.     public function getWeight2(): ?int
  573.     {
  574.         return $this->weight2;
  575.     }
  576.     public function setWeight2(int $weight2): self
  577.     {
  578.         $this->weight2 $weight2;
  579.         return $this;
  580.     }
  581.     public function getWeight3(): ?int
  582.     {
  583.         return $this->weight3;
  584.     }
  585.     public function setWeight3(int $weight3): self
  586.     {
  587.         $this->weight3 $weight3;
  588.         return $this;
  589.     }
  590.     public function getWeight4(): ?int
  591.     {
  592.         return $this->weight4;
  593.     }
  594.     public function setWeight4(int $weight4): self
  595.     {
  596.         $this->weight4 $weight4;
  597.         return $this;
  598.     }
  599.     public function isVisible(): ?bool
  600.     {
  601.         return $this->visible;
  602.     }
  603.     public function setVisible(bool $visible): self
  604.     {
  605.         $this->visible $visible;
  606.         return $this;
  607.     }
  608.     public function isPop(): ?bool
  609.     {
  610.         return $this->pop;
  611.     }
  612.     public function setPop(bool $pop): self
  613.     {
  614.         $this->pop $pop;
  615.         return $this;
  616.     }
  617.     public function isAction(): ?bool
  618.     {
  619.         return $this->action;
  620.     }
  621.     public function setAction(bool $action): self
  622.     {
  623.         $this->action $action;
  624.         return $this;
  625.     }
  626.     public function isMix(): ?bool
  627.     {
  628.         return $this->mix;
  629.     }
  630.     public function setMix(bool $mix): self
  631.     {
  632.         $this->mix $mix;
  633.         return $this;
  634.     }
  635.     public function isMain(): ?bool
  636.     {
  637.         return $this->main;
  638.     }
  639.     public function setMain(bool $main): self
  640.     {
  641.         $this->main $main;
  642.         return $this;
  643.     }
  644.     public function isNew(): ?bool
  645.     {
  646.         return $this->new;
  647.     }
  648.     public function setNew(bool $new): self
  649.     {
  650.         $this->new $new;
  651.         return $this;
  652.     }
  653.     public function isSale(): ?bool
  654.     {
  655.         return $this->sale;
  656.     }
  657.     public function setSale(bool $sale): self
  658.     {
  659.         $this->sale $sale;
  660.         return $this;
  661.     }
  662.     public function isOnsale(): ?bool
  663.     {
  664.         return $this->onsale;
  665.     }
  666.     public function setOnsale(bool $onsale): self
  667.     {
  668.         $this->onsale $onsale;
  669.         return $this;
  670.     }
  671.     public function getPrior(): ?int
  672.     {
  673.         return $this->prior;
  674.     }
  675.     public function setPrior(int $prior): self
  676.     {
  677.         $this->prior $prior;
  678.         return $this;
  679.     }
  680.     public function getTitle(): ?string
  681.     {
  682.         return $this->title;
  683.     }
  684.     public function setTitle(string $title): self
  685.     {
  686.         $this->title $title;
  687.         return $this;
  688.     }
  689.     public function getDescr(): ?string
  690.     {
  691.         return $this->descr;
  692.     }
  693.     public function setDescr(string $descr): self
  694.     {
  695.         $this->descr $descr;
  696.         return $this;
  697.     }
  698.     public function getKw(): ?string
  699.     {
  700.         return $this->kw;
  701.     }
  702.     public function setKw(string $kw): self
  703.     {
  704.         $this->kw $kw;
  705.         return $this;
  706.     }
  707.     public function getH1(): ?string
  708.     {
  709.         return $this->h1;
  710.     }
  711.     public function setH1(string $h1): self
  712.     {
  713.         $this->h1 $h1;
  714.         return $this;
  715.     }
  716.     public function getRating(): ?int
  717.     {
  718.         return $this->rating;
  719.     }
  720.     public function setRating(int $rating): self
  721.     {
  722.         $this->rating $rating;
  723.         return $this;
  724.     }
  725.     public function getSpec(): ?string
  726.     {
  727.         return $this->spec;
  728.     }
  729.     public function setSpec(string $spec): self
  730.     {
  731.         $this->spec $spec;
  732.         return $this;
  733.     }
  734.     public function getOrdered(): ?int
  735.     {
  736.         return $this->ordered;
  737.     }
  738.     public function setOrdered(int $ordered): self
  739.     {
  740.         $this->ordered $ordered;
  741.         return $this;
  742.     }
  743.     public function getIzm(): ?string
  744.     {
  745.         return $this->izm;
  746.     }
  747.     public function setIzm(string $izm): self
  748.     {
  749.         $this->izm $izm;
  750.         return $this;
  751.     }
  752.     public function getPic(): ?string
  753.     {
  754.         return $this->pic;
  755.     }
  756.     public function setPic(string $pic): self
  757.     {
  758.         $this->pic $pic;
  759.         return $this;
  760.     }
  761.     public function getViews(): ?int
  762.     {
  763.         return $this->views;
  764.     }
  765.     public function setViews(int $views): self
  766.     {
  767.         $this->views $views;
  768.         return $this;
  769.     }
  770.     public function isJustuploaded(): ?bool
  771.     {
  772.         return $this->justuploaded;
  773.     }
  774.     public function setJustuploaded(bool $justuploaded): self
  775.     {
  776.         $this->justuploaded $justuploaded;
  777.         return $this;
  778.     }
  779.     public function getUploaded(): ?int
  780.     {
  781.         return $this->uploaded;
  782.     }
  783.     public function setUploaded(int $uploaded): self
  784.     {
  785.         $this->uploaded $uploaded;
  786.         return $this;
  787.     }
  788.     public function getChanged(): ?int
  789.     {
  790.         return $this->changed;
  791.     }
  792.     public function setChanged(int $changed): self
  793.     {
  794.         $this->changed $changed;
  795.         return $this;
  796.     }
  797.     public function getColors(): array
  798.     {
  799.         if (!$this->colors) {
  800.             return [];
  801.         }
  802.         if(!in_array($this->getId(), $this->colors)) {
  803.             $this->colors = [];
  804.             array_push($this->colors$this->getId());
  805.         }
  806.         sort($this->colors);
  807.         return $this->colors;
  808.     }
  809.     public function setColors(array $colors): self
  810.     {
  811.         $this->colors $colors;
  812.         return $this;
  813.     }
  814.     public function getSku(): ?string
  815.     {
  816.         return $this->sku;
  817.     }
  818.     public function setSku(string $sku): self
  819.     {
  820.         $this->sku $sku;
  821.         return $this;
  822.     }
  823.     public function getModel(): ?string
  824.     {
  825.         return $this->model;
  826.     }
  827.     public function setModel(string $model): self
  828.     {
  829.         $this->model $model;
  830.         return $this;
  831.     }
  832.     public function getChars(): ?string
  833.     {
  834.         return $this->chars;
  835.     }
  836.     public function setChars(string $chars): self
  837.     {
  838.         $this->chars $chars;
  839.         return $this;
  840.     }
  841.     public function getTags(): ?string
  842.     {
  843.         return $this->tags;
  844.     }
  845.     public function setTags(string $tags): self
  846.     {
  847.         $this->tags $tags;
  848.         return $this;
  849.     }
  850.     public function getExternalId(): ?string
  851.     {
  852.         return $this->externalId;
  853.     }
  854.     public function setExternalId(?string $externalId): self
  855.     {
  856.         $this->externalId $externalId;
  857.         return $this;
  858.     }
  859. }