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->numdiscount = [];
  192.         $this->numdiscount2 = [];
  193.         $this->numdiscount3 = [];
  194.         $this->numdiscount4 = [];
  195.         $this->numdiscountopt = [];
  196.         $this->numdiscountopt2 = [];
  197.         $this->numdiscountopt3 = [];
  198.         $this->numdiscountopt4 = [];
  199.         $this->translations = new ArrayCollection();
  200.     }
  201.     public function setLocale($locale)
  202.     {
  203.         $this->locale $locale;
  204.     }
  205.     public function getTranslations()
  206.     {
  207.         return $this->translations;
  208.     }
  209.     public function addTranslation(ProdTranslation $t)
  210.     {
  211.         if (!$this->translations->contains($t)) {
  212.             $this->translations[] = $t;
  213.             $t->setObject($this);
  214.         }
  215.     }
  216.     
  217.     public function getId(): ?int
  218.     {
  219.         return $this->id;
  220.     }
  221.     public function getCat(): int
  222.     {
  223.         return $this->cat;
  224.     }
  225.     public function setCat(int $cat): self
  226.     {
  227.         $this->cat $cat;
  228.         return $this;
  229.     }
  230.     public function getIntname(): ?string
  231.     {
  232.         return $this->intname;
  233.     }
  234.     public function setIntname(string $intname): self
  235.     {
  236.         $this->intname $intname;
  237.         return $this;
  238.     }
  239.     public function getName(): ?string
  240.     {
  241.         return $this->name;
  242.     }
  243.     public function setName(string $name): self
  244.     {
  245.         $this->name $name;
  246.         return $this;
  247.     }
  248.     public function getNameUk(): ?string
  249.     {
  250.         foreach ($this->translations as $translation) {
  251.             if ($translation->getLocale() === 'uk') {
  252.                 return $translation->getContent();
  253.             }
  254.         }
  255.         
  256.         return $this->name;
  257.     }
  258.     public function getNameRu(): ?string
  259.     {
  260.         foreach ($this->translations as $translation) {
  261.             if ($translation->getLocale() === 'ru') {
  262.                 return $translation->getContent();
  263.             }
  264.         }
  265.         return $this->name;
  266.     }
  267.     public function getNamePl(): ?string
  268.     {
  269.         foreach ($this->translations as $translation) {
  270.             if ($translation->getLocale() === 'pl') {
  271.                 return $translation->getContent();
  272.             }
  273.         }
  274.         return $this->name;
  275.     }
  276.     public function getArt(): ?string
  277.     {
  278.         return $this->art;
  279.     }
  280.     public function setArt(string $art): self
  281.     {
  282.         $this->art $art;
  283.         return $this;
  284.     }
  285.     public function getShort(): ?string
  286.     {
  287.         return $this->short;
  288.     }
  289.     public function setShort(string $short): self
  290.     {
  291.         $this->short $short;
  292.         return $this;
  293.     }
  294.     public function getCont(): ?string
  295.     {
  296.         return str_replace(["|"], ["<br>"], $this->cont);
  297.     }
  298.     public function setCont(string $cont): self
  299.     {
  300.         $this->cont $cont;
  301.         return $this;
  302.     }
  303.     public function setPrices(array $prices)
  304.     {
  305.         $this->prices $prices;
  306.     }
  307.     public function getPrices(): array
  308.     {
  309.         return $this->prices;
  310.     }
  311.     public function getPrice(): ?float
  312.     {
  313.         return Env::is_opt() ? $this->priceopt $this->price;
  314.     }
  315.     public function setPrice(float $price): self
  316.     {
  317.         $this->price $price;
  318.         return $this;
  319.     }
  320.     public function getPrice2(): ?float
  321.     {
  322.         return Env::is_opt() ? $this->priceopt2 $this->price2;
  323.     }
  324.     public function setPrice2(float $price2): self
  325.     {
  326.         $this->price2 $price2;
  327.         return $this;
  328.     }
  329.     public function getPrice3(): ?float
  330.     {
  331.         return Env::is_opt() ? $this->priceopt3 $this->price3;
  332.     }
  333.     public function setPrice3(float $price3): self
  334.     {
  335.         $this->price3 $price3;
  336.         return $this;
  337.     }
  338.     public function getPrice4(): ?float
  339.     {
  340.         return Env::is_opt() ? $this->priceopt4 $this->price4;
  341.     }
  342.     public function setPrice4(float $price4): self
  343.     {
  344.         $this->price4 $price4;
  345.         return $this;
  346.     }
  347.     public function getPriceopt(): ?float
  348.     {
  349.         return $this->priceopt;
  350.     }
  351.     public function setPriceopt(float $priceopt): self
  352.     {
  353.         $this->priceopt $priceopt;
  354.         return $this;
  355.     }
  356.     public function getPriceopt2(): ?float
  357.     {
  358.         return $this->priceopt2;
  359.     }
  360.     public function setPriceopt2(float $priceopt2): self
  361.     {
  362.         $this->priceopt2 $priceopt2;
  363.         return $this;
  364.     }
  365.     public function getPriceopt3(): ?float
  366.     {
  367.         return $this->priceopt3;
  368.     }
  369.     public function setPriceopt3(float $priceopt3): self
  370.     {
  371.         $this->priceopt3 $priceopt3;
  372.         return $this;
  373.     }
  374.     public function getPriceopt4(): ?float
  375.     {
  376.         return $this->priceopt4;
  377.     }
  378.     public function setPriceopt4(float $priceopt4): self
  379.     {
  380.         $this->priceopt4 $priceopt4;
  381.         return $this;
  382.     }
  383.     public function getSkidka(): ?float
  384.     {
  385.         return Env::is_opt() ? $this->skidkaopt $this->skidka;
  386.     }
  387.     public function setSkidka(float $skidka): self
  388.     {
  389.         $this->skidka $skidka;
  390.         return $this;
  391.     }
  392.     public function getSkidka2(): ?float
  393.     {
  394.         return Env::is_opt() ? $this->skidkaopt2 $this->skidka2;
  395.     }
  396.     public function setSkidka2(float $skidka2): self
  397.     {
  398.         $this->skidka2 $skidka2;
  399.         return $this;
  400.     }
  401.     public function getSkidka3(): ?float
  402.     {
  403.         return Env::is_opt() ? $this->skidkaopt3 $this->skidka3;
  404.     }
  405.     public function setSkidka3(float $skidka3): self
  406.     {
  407.         $this->skidka3 $skidka3;
  408.         return $this;
  409.     }
  410.     public function getSkidka4(): ?float
  411.     {
  412.         return Env::is_opt() ? $this->skidkaopt4 $this->skidka4;
  413.     }
  414.     public function setSkidka4(float $skidka4): self
  415.     {
  416.         $this->skidka4 $skidka4;
  417.         return $this;
  418.     }
  419.     public function getSkidkaopt(): ?float
  420.     {
  421.         return $this->skidkaopt;
  422.     }
  423.     public function setSkidkaopt(float $skidkaopt): self
  424.     {
  425.         $this->skidkaopt $skidkaopt;
  426.         return $this;
  427.     }
  428.     public function getSkidkaopt2(): ?float
  429.     {
  430.         return $this->skidkaopt2;
  431.     }
  432.     public function setSkidkaopt2(float $skidkaopt2): self
  433.     {
  434.         $this->skidkaopt2 $skidkaopt2;
  435.         return $this;
  436.     }
  437.     public function getSkidkaopt3(): ?float
  438.     {
  439.         return $this->skidkaopt3;
  440.     }
  441.     public function setSkidkaopt3(float $skidkaopt3): self
  442.     {
  443.         $this->skidkaopt3 $skidkaopt3;
  444.         return $this;
  445.     }
  446.     public function getSkidkaopt4(): ?float
  447.     {
  448.         return $this->skidkaopt4;
  449.     }
  450.     public function setSkidkaopt4(float $skidkaopt4): self
  451.     {
  452.         $this->skidkaopt4 $skidkaopt4;
  453.         return $this;
  454.     }
  455.     public function getNumdiscount(): array
  456.     {
  457.         if (!$this->numdiscount) {
  458.             return [];
  459.         }
  460.         return Env::is_opt() ? $this->numdiscountopt $this->numdiscount;
  461.     }
  462.     public function setNumdiscount(array $numdiscount): self
  463.     {
  464.         $this->numdiscount $numdiscount;
  465.         return $this;
  466.     }
  467.     public function getNumdiscount2(): array
  468.     {
  469.         if (!$this->numdiscount2) {
  470.             return [];
  471.         }
  472.         return Env::is_opt() ? $this->numdiscountopt2 $this->numdiscount2;
  473.     }
  474.     public function setNumdiscount2(array $numdiscount2): self
  475.     {
  476.         $this->numdiscount2 $numdiscount2;
  477.         return $this;
  478.     }
  479.     public function getNumdiscount3(): array
  480.     {
  481.         if (!$this->numdiscount3) {
  482.             return [];
  483.         }
  484.         return Env::is_opt() ? $this->numdiscountopt3 $this->numdiscount3;
  485.     }
  486.     public function setNumdiscount3(array $numdiscount3): self
  487.     {
  488.         $this->numdiscount3 $numdiscount3;
  489.         return $this;
  490.     }
  491.     public function getNumdiscount4(): array
  492.     {
  493.         if (!$this->numdiscount4) {
  494.             return [];
  495.         }
  496.         return Env::is_opt() ? $this->numdiscountopt4 $this->numdiscount4;
  497.     }
  498.     public function setNumdiscount4(array $numdiscount4): self
  499.     {
  500.         $this->numdiscount4 $numdiscount4;
  501.         return $this;
  502.     }
  503.     public function getNumdiscountopt(): array
  504.     {
  505.         if (!$this->numdiscountopt) {
  506.             return [];
  507.         }
  508.         return $this->numdiscountopt;
  509.     }
  510.     public function setNumdiscountopt(array $numdiscountopt): self
  511.     {
  512.         $this->numdiscountopt $numdiscountopt;
  513.         return $this;
  514.     }
  515.     public function getNumdiscountopt2(): array
  516.     {
  517.         if (!$this->numdiscountopt2) {
  518.             return [];
  519.         }
  520.         return $this->numdiscountopt2;
  521.     }
  522.     public function setNumdiscountopt2(array $numdiscountopt2): self
  523.     {
  524.         $this->numdiscountopt2 $numdiscountopt2;
  525.         return $this;
  526.     }
  527.     public function getNumdiscountopt3(): array
  528.     {
  529.         if (!$this->numdiscountopt3) {
  530.             return [];
  531.         }
  532.         return $this->numdiscountopt3;
  533.     }
  534.     public function setNumdiscountopt3(array $numdiscountopt3): self
  535.     {
  536.         $this->numdiscountopt3 $numdiscountopt3;
  537.         return $this;
  538.     }
  539.     public function getNumdiscountopt4(): array
  540.     {
  541.         if (!$this->numdiscountopt4) {
  542.             return [];
  543.         }
  544.         return $this->numdiscountopt4;
  545.     }
  546.     public function setNumdiscountopt4(array $numdiscountopt4): self
  547.     {
  548.         $this->numdiscountopt4 $numdiscountopt4;
  549.         return $this;
  550.     }
  551.     public function getNum(): ?int
  552.     {
  553.         return $this->num;
  554.     }
  555.     public function setNum(int $num): self
  556.     {
  557.         $this->num $num;
  558.         return $this;
  559.     }
  560.     public function getNum2(): ?int
  561.     {
  562.         return $this->num2;
  563.     }
  564.     public function setNum2(int $num2): self
  565.     {
  566.         $this->num2 $num2;
  567.         return $this;
  568.     }
  569.     public function getNum3(): ?int
  570.     {
  571.         return $this->num3;
  572.     }
  573.     public function setNum3(int $num3): self
  574.     {
  575.         $this->num3 $num3;
  576.         return $this;
  577.     }
  578.     public function getNum4(): ?int
  579.     {
  580.         return $this->num4;
  581.     }
  582.     public function setNum4(int $num4): self
  583.     {
  584.         $this->num4 $num4;
  585.         return $this;
  586.     }
  587.     public function getInpack(): ?string
  588.     {
  589.         return $this->inpack;
  590.     }
  591.     public function setInpack(string $inpack): self
  592.     {
  593.         $this->inpack $inpack;
  594.         return $this;
  595.     }
  596.     public function getInpack2(): ?string
  597.     {
  598.         return $this->inpack2;
  599.     }
  600.     public function setInpack2(string $inpack2): self
  601.     {
  602.         $this->inpack2 $inpack2;
  603.         return $this;
  604.     }
  605.     public function getInpack3(): ?string
  606.     {
  607.         return $this->inpack3;
  608.     }
  609.     public function setInpack3(string $inpack3): self
  610.     {
  611.         $this->inpack3 $inpack3;
  612.         return $this;
  613.     }
  614.     public function getInpack4(): ?string
  615.     {
  616.         return $this->inpack4;
  617.     }
  618.     public function setInpack4(string $inpack4): self
  619.     {
  620.         $this->inpack4 $inpack4;
  621.         return $this;
  622.     }
  623.     public function getWeight(): ?int
  624.     {
  625.         return $this->weight;
  626.     }
  627.     public function setWeight(int $weight): self
  628.     {
  629.         $this->weight $weight;
  630.         return $this;
  631.     }
  632.     public function getWeight2(): ?int
  633.     {
  634.         return $this->weight2;
  635.     }
  636.     public function setWeight2(int $weight2): self
  637.     {
  638.         $this->weight2 $weight2;
  639.         return $this;
  640.     }
  641.     public function getWeight3(): ?int
  642.     {
  643.         return $this->weight3;
  644.     }
  645.     public function setWeight3(int $weight3): self
  646.     {
  647.         $this->weight3 $weight3;
  648.         return $this;
  649.     }
  650.     public function getWeight4(): ?int
  651.     {
  652.         return $this->weight4;
  653.     }
  654.     public function setWeight4(int $weight4): self
  655.     {
  656.         $this->weight4 $weight4;
  657.         return $this;
  658.     }
  659.     public function isVisible(): ?bool
  660.     {
  661.         return $this->visible;
  662.     }
  663.     public function setVisible(bool $visible): self
  664.     {
  665.         $this->visible $visible;
  666.         return $this;
  667.     }
  668.     public function isPop(): ?bool
  669.     {
  670.         return $this->pop;
  671.     }
  672.     public function setPop(bool $pop): self
  673.     {
  674.         $this->pop $pop;
  675.         return $this;
  676.     }
  677.     public function isAction(): ?bool
  678.     {
  679.         return $this->action;
  680.     }
  681.     public function setAction(bool $action): self
  682.     {
  683.         $this->action $action;
  684.         return $this;
  685.     }
  686.     public function isMix(): ?bool
  687.     {
  688.         return $this->mix;
  689.     }
  690.     public function setMix(bool $mix): self
  691.     {
  692.         $this->mix $mix;
  693.         return $this;
  694.     }
  695.     public function isMain(): ?bool
  696.     {
  697.         return $this->main;
  698.     }
  699.     public function setMain(bool $main): self
  700.     {
  701.         $this->main $main;
  702.         return $this;
  703.     }
  704.     public function isNew(): ?bool
  705.     {
  706.         return $this->new;
  707.     }
  708.     public function setNew(bool $new): self
  709.     {
  710.         $this->new $new;
  711.         return $this;
  712.     }
  713.     public function isSale(): ?bool
  714.     {
  715.         return $this->sale;
  716.     }
  717.     public function setSale(bool $sale): self
  718.     {
  719.         $this->sale $sale;
  720.         return $this;
  721.     }
  722.     public function isOnsale(): ?bool
  723.     {
  724.         return $this->onsale;
  725.     }
  726.     public function setOnsale(bool $onsale): self
  727.     {
  728.         $this->onsale $onsale;
  729.         return $this;
  730.     }
  731.     public function getPrior(): ?int
  732.     {
  733.         return $this->prior;
  734.     }
  735.     public function setPrior(int $prior): self
  736.     {
  737.         $this->prior $prior;
  738.         return $this;
  739.     }
  740.     public function getTitle(): ?string
  741.     {
  742.         return $this->title;
  743.     }
  744.     public function setTitle(string $title): self
  745.     {
  746.         $this->title $title;
  747.         return $this;
  748.     }
  749.     public function getDescr(): ?string
  750.     {
  751.         return $this->descr;
  752.     }
  753.     public function setDescr(string $descr): self
  754.     {
  755.         $this->descr $descr;
  756.         return $this;
  757.     }
  758.     public function getKw(): ?string
  759.     {
  760.         return $this->kw;
  761.     }
  762.     public function setKw(string $kw): self
  763.     {
  764.         $this->kw $kw;
  765.         return $this;
  766.     }
  767.     public function getH1(): ?string
  768.     {
  769.         return $this->h1;
  770.     }
  771.     public function setH1(string $h1): self
  772.     {
  773.         $this->h1 $h1;
  774.         return $this;
  775.     }
  776.     public function getRating(): ?int
  777.     {
  778.         return $this->rating;
  779.     }
  780.     public function setRating(int $rating): self
  781.     {
  782.         $this->rating $rating;
  783.         return $this;
  784.     }
  785.     public function getSpec(): ?string
  786.     {
  787.         return $this->spec;
  788.     }
  789.     public function setSpec(string $spec): self
  790.     {
  791.         $this->spec $spec;
  792.         return $this;
  793.     }
  794.     public function getOrdered(): ?int
  795.     {
  796.         return $this->ordered;
  797.     }
  798.     public function setOrdered(int $ordered): self
  799.     {
  800.         $this->ordered $ordered;
  801.         return $this;
  802.     }
  803.     public function getIzm(): ?string
  804.     {
  805.         return $this->izm;
  806.     }
  807.     public function setIzm(string $izm): self
  808.     {
  809.         $this->izm $izm;
  810.         return $this;
  811.     }
  812.     public function getPic(): ?string
  813.     {
  814.         return $this->pic;
  815.     }
  816.     public function setPic(string $pic): self
  817.     {
  818.         $this->pic $pic;
  819.         return $this;
  820.     }
  821.     public function getViews(): ?int
  822.     {
  823.         return $this->views;
  824.     }
  825.     public function setViews(int $views): self
  826.     {
  827.         $this->views $views;
  828.         return $this;
  829.     }
  830.     public function isJustuploaded(): ?bool
  831.     {
  832.         return $this->justuploaded;
  833.     }
  834.     public function setJustuploaded(bool $justuploaded): self
  835.     {
  836.         $this->justuploaded $justuploaded;
  837.         return $this;
  838.     }
  839.     public function getUploaded(): ?int
  840.     {
  841.         return $this->uploaded;
  842.     }
  843.     public function setUploaded(int $uploaded): self
  844.     {
  845.         $this->uploaded $uploaded;
  846.         return $this;
  847.     }
  848.     public function getChanged(): ?int
  849.     {
  850.         return $this->changed;
  851.     }
  852.     public function setChanged(int $changed): self
  853.     {
  854.         $this->changed $changed;
  855.         return $this;
  856.     }
  857.     public function getColors(): array
  858.     {
  859.         if (!$this->colors) {
  860.             return [];
  861.         }
  862.         if(!in_array($this->getId(), $this->colors)) {
  863.             $this->colors = [];
  864.             array_push($this->colors$this->getId());
  865.         }
  866.         sort($this->colors);
  867.         return $this->colors;
  868.     }
  869.     public function setColors(array $colors): self
  870.     {
  871.         $this->colors $colors;
  872.         return $this;
  873.     }
  874.     public function getSku(): ?string
  875.     {
  876.         return $this->sku;
  877.     }
  878.     public function setSku(string $sku): self
  879.     {
  880.         $this->sku $sku;
  881.         return $this;
  882.     }
  883.     public function getModel(): ?string
  884.     {
  885.         return $this->model;
  886.     }
  887.     public function setModel(string $model): self
  888.     {
  889.         $this->model $model;
  890.         return $this;
  891.     }
  892.     public function getChars(): ?string
  893.     {
  894.         return $this->chars;
  895.     }
  896.     public function setChars(string $chars): self
  897.     {
  898.         $this->chars $chars;
  899.         return $this;
  900.     }
  901.     public function getTags(): ?string
  902.     {
  903.         return $this->tags;
  904.     }
  905.     public function setTags(string $tags): self
  906.     {
  907.         $this->tags $tags;
  908.         return $this;
  909.     }
  910.     public function getExternalId(): ?string
  911.     {
  912.         return $this->externalId;
  913.     }
  914.     public function setExternalId(?string $externalId): self
  915.     {
  916.         $this->externalId $externalId;
  917.         return $this;
  918.     }
  919. }