src/Entity/Product.php line 21

  1. <?php
  2. namespace App\Entity;
  3. use App\Classes\AppConfig;
  4. use App\Classes\Data\StatusData;
  5. use App\Classes\Data\VatData;
  6. use App\Classes\Slugify;
  7. use App\Repository\ProductRepository;
  8. use DateTimeImmutable;
  9. use Doctrine\Common\Collections\ArrayCollection;
  10. use Doctrine\Common\Collections\Collection;
  11. use Doctrine\DBAL\Types\Types;
  12. use Doctrine\ORM\Mapping as ORM;
  13. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  14. #[ORM\Entity(repositoryClassProductRepository::class)]
  15. #[ORM\HasLifecycleCallbacks]
  16. #[ORM\Table(name'product'indexes: [new ORM\Index(columns: ['title'], name'title_index')])]
  17. #[UniqueEntity(fields: ['barcode'], message'U bazi već postoji proizvod sa ovim barkodom.')]
  18. class Product {
  19.   #[ORM\Id]
  20.   #[ORM\GeneratedValue]
  21.   #[ORM\Column]
  22.   private ?int $id null;
  23.   public function getImageUploadPath(): ?string {
  24.     return $_ENV['PRODUCT_IMAGE_PATH'] . '/' .  date('Y/m/d/') . Slugify::slugifyProductKey(trim($this->productKey)) . '/' ;
  25.   }
  26.   public function getAvatarUploadPath(): ?string {
  27.     return $_ENV['PRODUCT_AVATAR_PATH'] . '/' .  date('Y/m/d/') .  Slugify::slugifyProductKey(trim($this->productKey)) . '/' ;
  28.   }
  29.   public function getThumbUploadPath(): ?string {
  30.     return $_ENV['PRODUCT_THUMB_PATH'] . '/' .  date('Y/m/d/') .  Slugify::slugifyProductKey(trim($this->productKey)) . '/' ;
  31.   }
  32.     public function getImageUploadPathAdd(): ?string {
  33.         return $_ENV['PRODUCT_IMAGE_PATH'] . '/manual/' ;
  34.     }
  35.     public function getThumbUploadPathAdd(): ?string {
  36.         return $_ENV['PRODUCT_THUMB_PATH'] . '/manual/' ;
  37.     }
  38.   #[ORM\Column(length255)]
  39.   private ?string $title null;
  40.   #[ORM\Column(length100nullabletrue)]
  41.   private ?string $barcode null;
  42.   #[ORM\Column(length100nullabletrue)]
  43.   private ?string $importCat null;
  44.   #[ORM\Column(length100nullabletrue)]
  45.   private ?string $plainCategory null;
  46.   #[ORM\Column(length100nullabletrue)]
  47.   private ?string $productKey null;
  48.   #[ORM\Column(length100nullabletrue)]
  49.   private ?string $sku null;
  50.   #[ORM\Column]
  51.   private ?int $vat VatData::VAT_20;
  52.   #[ORM\Column(nullabletrue,)]
  53.   private ?int $kolicina null;
  54.   #[ORM\Column(nullabletrue,)]
  55.   private ?int $sale null;
  56.   #[ORM\Column(typeTypes::DECIMALprecision15scale2nullabletrue)]
  57.   private ?string $weight null;
  58.   //aktuelna cena bez PDV
  59.   #[ORM\Column(typeTypes::DECIMALprecision15scale2nullabletrue)]
  60.   private ?string $price null;
  61.   //aktuelna cena sa PDV
  62.   #[ORM\Column(typeTypes::DECIMALprecision15scale2nullabletrue)]
  63.   private ?string $pricePDV null;
  64.   //prikaz kad je akcija
  65.   #[ORM\Column(typeTypes::DECIMALprecision15scale2nullabletrue)]
  66.   private ?string $pricePrikaz null;
  67.   //nabavna cena bez PDV
  68.   #[ORM\Column(typeTypes::DECIMALprecision15scale2nullabletrue)]
  69.   private ?string $priceNabavna null;
  70.   #[ORM\Column(nullabletrue,)]
  71.   private ?string $jedinicaMere null;
  72.   //cena kad je akcija sa PDV
  73.   #[ORM\Column(typeTypes::DECIMALprecision15scale2nullabletrue)]
  74.   private ?string $priceDiscount null;
  75.   #[ORM\Column(typeTypes::DECIMALprecision15scale2nullabletrue)]
  76.   private ?string $percentDiscount null;
  77.   #[ORM\Column(typeTypes::DECIMALprecision15scale2nullabletrue)]
  78.   private ?string $priceDelivery null;
  79.   #[ORM\Column(nullabletrue)]
  80.   private ?string $daysDelivery '7';
  81.   #[ORM\ManyToMany(targetEntityLabel::class, fetch"LAZY")]
  82.   private Collection $label;
  83.   #[ORM\ManyToOne(fetch"LAZY"inversedBy'products')]
  84.   private ?Factory $factory null;
  85.   #[ORM\ManyToOne(fetch'LAZY')]
  86.   private ?Client $vendor null;
  87.   #[ORM\OneToMany(mappedBy'product'targetEntityComment::class, fetch"LAZY")]
  88.   private Collection $comment;
  89.   #[ORM\Column(typeTypes::TEXTnullabletrue,)]
  90.   private ?string $options null;
  91.   #[ORM\Column(typeTypes::TEXTnullabletrue,)]
  92.   private ?string $deliveryDesc null;
  93.   #[ORM\Column(typeTypes::TEXTnullabletrue,)]
  94.   private ?string $description null;
  95.   #[ORM\Column(typeTypes::TEXTnullabletrue,)]
  96.   private ?string $metaTitle null;
  97.   #[ORM\Column(typeTypes::TEXTnullabletrue,)]
  98.   private ?string $metaDescription null;
  99.   #[ORM\Column(typeTypes::TEXTnullabletrue,)]
  100.   private ?string $metaKeywords null;
  101.   #[ORM\OneToMany(mappedBy'product'targetEntityImage::class, cascade: ["persist""remove"], fetch"LAZY")]
  102.   private Collection $image;
  103.   #[ORM\OneToMany(mappedBy'product'targetEntityPdf::class, cascade: ["persist""remove"], fetch"LAZY")]
  104.   private Collection $pdf;
  105.   #[ORM\ManyToOne(targetEntityself::class, fetch"LAZY")]
  106.   private ?self $editBy null;
  107.   #[ORM\ManyToOne(targetEntityself::class, fetch"LAZY")]
  108.   private ?self $createdBy null;
  109.   #[ORM\Column]
  110.   private bool $isSuspended false;
  111.   #[ORM\Column(nullabletrue)]
  112.   private ?bool $isXmlChange null;
  113.   #[ORM\Column]
  114.   private bool $isShown true;
  115.   #[ORM\Column]
  116.   private bool $isOutlet false;
  117.   #[ORM\Column]
  118.   private bool $isOutOfStock false;
  119.   #[ORM\Column(nullabletrue)]
  120.   private ?bool $isOutOfStockUspon null;
  121.   #[ORM\Column(nullabletrue)]
  122.   private ?bool $isOutOfStockElementa null;
  123.   #[ORM\Column(nullabletrue)]
  124.   private ?bool $isOutOfStockBb null;
  125.   #[ORM\Column(nullabletrue)]
  126.   private ?bool $isOutOfStockDsc null;
  127.   #[ORM\Column(nullabletrue)]
  128.   private ?bool $isOutOfStockEwe null;
  129.   #[ORM\Column(nullabletrue)]
  130.   private ?bool $isOutOfStock3g null;
  131.   #[ORM\Column(nullabletrue)]
  132.   private ?bool $isOutOfStockPc null;
  133.   #[ORM\Column(nullabletrue)]
  134.   private ?bool $isOutOfStockBtm null;
  135.   #[ORM\Column(nullabletrue)]
  136.   private ?bool $isOutOfStockCt null;
  137.   #[ORM\Column(nullabletrue)]
  138.   private ?bool $isOutOfStockVelteh null;
  139.   #[ORM\Column(nullabletrue)]
  140.   private ?bool $isOutOfStockSim null;
  141.   #[ORM\Column(nullabletrue)]
  142.   private ?bool $isOutOfStockMipal null;
  143.   #[ORM\Column(nullabletrue)]
  144.   private ?bool $isOutOfStockIris null;
  145.   #[ORM\Column(nullabletrue)]
  146.   private ?bool $isOutOfStockGembird null;
  147.     #[ORM\Column(nullabletrue)]
  148.     private ?bool $isOutOfStockSpektar null;
  149.     #[ORM\Column(nullabletrue)]
  150.     private ?bool $isOutOfStockVenera null;
  151.     #[ORM\Column(nullabletrue)]
  152.     private ?bool $isOutOfStockMs null;
  153.   #[ORM\Column]
  154.   private bool $isNew true;
  155.   #[ORM\Column]
  156.   private bool $isDiscount false;
  157.     #[ORM\Column]
  158.     private bool $isBundle false;
  159.   #[ORM\Column]
  160.   private bool $isSuperProduct false;
  161.   #[ORM\Column]
  162.   private DateTimeImmutable $created;
  163.   #[ORM\Column]
  164.   private DateTimeImmutable $updated;
  165.   #[ORM\OneToMany(mappedBy'product'targetEntityVisit::class, cascade: ['persist''remove'], fetch"LAZY")]
  166.   private Collection $visits;
  167.   #[ORM\OneToMany(mappedBy'product'targetEntityAttribute::class, cascade: ['persist''remove'], fetch"LAZY")]
  168.   private Collection $attribute;
  169.   #[ORM\ManyToOne(fetch"LAZY"inversedBy'products')]
  170.   private ?Image $mainImage null;
  171.   #[ORM\ManyToOne(targetEntityself::class, fetch"LAZY"inversedBy'products')]
  172.   private ?self $connected null;
  173.   #[ORM\OneToMany(mappedBy'connected'targetEntityself::class, fetch"LAZY")]
  174.   private Collection $products;
  175.   #[ORM\ManyToOne(fetch"LAZY"inversedBy'products')]
  176.   private ?Category $category null;
  177.   #[ORM\ManyToMany(targetEntitySale::class, mappedBy'product'fetch"LAZY")]
  178.   private Collection $sales;
  179.   #[ORM\ManyToOne(fetch"LAZY"inversedBy'product')]
  180.   private ?Choice $choice null;
  181.   #[ORM\OneToMany(mappedBy'product'targetEntityLagproduct::class, fetch"LAZY")]
  182.   private Collection $lagproducts;
  183.   #[ORM\OneToMany(mappedBy'product'targetEntitySupersale::class)]
  184.   private Collection $supersales;
  185.   #[ORM\PrePersist]
  186.   public function prePersist(): void {
  187.     $this->created = new DateTimeImmutable();
  188.     $this->updated = new DateTimeImmutable();
  189.   }
  190.   #[ORM\PreUpdate]
  191.   public function preUpdate(): void {
  192.     $this->updated = new DateTimeImmutable();
  193.   }
  194.   public function __construct() {
  195.     $this->label = new ArrayCollection();
  196.     $this->image = new ArrayCollection();
  197.     $this->pdf = new ArrayCollection();
  198.     $this->comment = new ArrayCollection();
  199.     $this->visits = new ArrayCollection();
  200.     $this->attribute = new ArrayCollection();
  201.     $this->products = new ArrayCollection();
  202.     $this->sales = new ArrayCollection();
  203.     $this->lagproducts = new ArrayCollection();
  204.     $this->supersales = new ArrayCollection();
  205.   }
  206.   public function getId(): ?int {
  207.     return $this->id;
  208.   }
  209.   /**
  210.    * @return Collection<int, Label>
  211.    */
  212.   public function getLabel(): Collection {
  213.     return $this->label;
  214.   }
  215.   public function addLabel(Label $label): self {
  216.     if (!$this->label->contains($label)) {
  217.       $this->label->add($label);
  218.     }
  219.     return $this;
  220.   }
  221.   public function removeLabel(Label $label): self {
  222.     $this->label->removeElement($label);
  223.     return $this;
  224.   }
  225.   public function getVendor(): ?Client {
  226.     return $this->vendor;
  227.   }
  228.   public function setVendor(?Client $vendor): self {
  229.     $this->vendor $vendor;
  230.     return $this;
  231.   }
  232.   /**
  233.    * @return Collection<int, Image>
  234.    */
  235.   public function getImage(): Collection {
  236.     return $this->image;
  237.   }
  238.   public function addImage(Image $image): self {
  239.     if (!$this->image->contains($image)) {
  240.       $this->image->add($image);
  241.       $image->setProduct($this);
  242.     }
  243.     return $this;
  244.   }
  245.   public function removeImage(Image $image): self {
  246.     if ($this->image->removeElement($image)) {
  247.       // set the owning side to null (unless already changed)
  248.       if ($image->getProduct() === $this) {
  249.         $image->setProduct(null);
  250.       }
  251.     }
  252.     return $this;
  253.   }
  254.   /**
  255.    * @return Collection<int, Pdf>
  256.    */
  257.   public function getPdf(): Collection {
  258.     return $this->pdf;
  259.   }
  260.   public function addPdf(Pdf $pdf): self {
  261.     if (!$this->pdf->contains($pdf)) {
  262.       $this->pdf->add($pdf);
  263.       $pdf->setProduct($this);
  264.     }
  265.     return $this;
  266.   }
  267.   public function removePdf(Pdf $pdf): self {
  268.     if ($this->pdf->removeElement($pdf)) {
  269.       // set the owning side to null (unless already changed)
  270.       if ($pdf->getProduct() === $this) {
  271.         $pdf->setProduct(null);
  272.       }
  273.     }
  274.     return $this;
  275.   }
  276.   /**
  277.    * @return string|null
  278.    */
  279.   public function getBarcode(): ?string {
  280.     return $this->barcode;
  281.   }
  282.   /**
  283.    * @param string|null $barcode
  284.    */
  285.   public function setBarcode(?string $barcode): void {
  286.     $this->barcode $barcode;
  287.   }
  288.   /**
  289.    * @return string|null
  290.    */
  291.   public function getProductKey(): ?string {
  292.     return $this->productKey;
  293.   }
  294.   /**
  295.    * @param string|null $productKey
  296.    */
  297.   public function setProductKey(?string $productKey): void {
  298.     $this->productKey $productKey;
  299.   }
  300.   /**
  301.    * @return Product|null
  302.    */
  303.   public function getEditBy(): ?Product {
  304.     return $this->editBy;
  305.   }
  306.   /**
  307.    * @param Product|null $editBy
  308.    */
  309.   public function setEditBy(?Product $editBy): void {
  310.     $this->editBy $editBy;
  311.   }
  312.   /**
  313.    * @return Product|null
  314.    */
  315.   public function getCreatedBy(): ?Product {
  316.     return $this->createdBy;
  317.   }
  318.   /**
  319.    * @param Product|null $createdBy
  320.    */
  321.   public function setCreatedBy(?Product $createdBy): void {
  322.     $this->createdBy $createdBy;
  323.   }
  324.   /**
  325.    * @return bool
  326.    */
  327.   public function isSuspended(): bool {
  328.     return $this->isSuspended;
  329.   }
  330.   /**
  331.    * @param bool $isSuspended
  332.    */
  333.   public function setIsSuspended(bool $isSuspended): void {
  334.     $this->isSuspended $isSuspended;
  335.   }
  336.   /**
  337.    * @return DateTimeImmutable
  338.    */
  339.   public function getCreated(): DateTimeImmutable {
  340.     return $this->created;
  341.   }
  342.   /**
  343.    * @param DateTimeImmutable $created
  344.    */
  345.   public function setCreated(DateTimeImmutable $created): void {
  346.     $this->created $created;
  347.   }
  348.   /**
  349.    * @return DateTimeImmutable
  350.    */
  351.   public function getUpdated(): DateTimeImmutable {
  352.     return $this->updated;
  353.   }
  354.   /**
  355.    * @param DateTimeImmutable $updated
  356.    */
  357.   public function setUpdated(DateTimeImmutable $updated): void {
  358.     $this->updated $updated;
  359.   }
  360.   public function getFactory(): ?Factory {
  361.     return $this->factory;
  362.   }
  363.   public function setFactory(?Factory $factory): self {
  364.     $this->factory $factory;
  365.     return $this;
  366.   }
  367.   /**
  368.    * @return Collection<int, Comment>
  369.    */
  370.   public function getComment(): Collection {
  371.     return $this->comment;
  372.   }
  373.   public function addComment(Comment $comment): self {
  374.     if (!$this->comment->contains($comment)) {
  375.       $this->comment->add($comment);
  376.       $comment->setProduct($this);
  377.     }
  378.     return $this;
  379.   }
  380.   public function removeComment(Comment $comment): self {
  381.     if ($this->comment->removeElement($comment)) {
  382.       // set the owning side to null (unless already changed)
  383.       if ($comment->getProduct() === $this) {
  384.         $comment->setProduct(null);
  385.       }
  386.     }
  387.     return $this;
  388.   }
  389.   /**
  390.    * @return Collection<int, Visit>
  391.    */
  392.   public function getVisits(): Collection {
  393.     return $this->visits;
  394.   }
  395.   public function addVisit(Visit $visit): self {
  396.     if (!$this->visits->contains($visit)) {
  397.       $this->visits->add($visit);
  398.       $visit->setProduct($this);
  399.     }
  400.     return $this;
  401.   }
  402.   public function removeVisit(Visit $visit): self {
  403.     if ($this->visits->removeElement($visit)) {
  404.       // set the owning side to null (unless already changed)
  405.       if ($visit->getProduct() === $this) {
  406.         $visit->setProduct(null);
  407.       }
  408.     }
  409.     return $this;
  410.   }
  411.   /**
  412.    * @return string|null
  413.    */
  414.   public function getTitle(): ?string {
  415.     return $this->title;
  416.   }
  417.   /**
  418.    * @param string|null $title
  419.    */
  420.   public function setTitle(?string $title): void {
  421.     $this->title $title;
  422.   }
  423.   /**
  424.    * @return float|null
  425.    */
  426.   public function getWeight(): ?float {
  427.     return $this->weight;
  428.   }
  429.   /**
  430.    * @param float|null $weight
  431.    */
  432.   public function setWeight(?float $weight): void {
  433.     $this->weight $weight;
  434.   }
  435.   /**
  436.    * @return float|null
  437.    */
  438.   public function getPrice(): ?float {
  439.     return $this->price;
  440.   }
  441.   /**
  442.    * @param float|null $price
  443.    */
  444.   public function setPrice(?float $price): void {
  445.     $this->price $price;
  446.   }
  447.   /**
  448.    * @return float|null
  449.    */
  450.   public function getPriceDiscount(): ?float {
  451.     return $this->priceDiscount;
  452.   }
  453.   /**
  454.    * @param float|null $priceDiscount
  455.    */
  456.   public function setPriceDiscount(?float $priceDiscount): void {
  457.     $this->priceDiscount $priceDiscount;
  458.   }
  459.   /**
  460.    * @return float|null
  461.    */
  462.   public function getPriceDelivery(): ?float {
  463.     return $this->priceDelivery;
  464.   }
  465.   /**
  466.    * @param float|null $priceDelivery
  467.    */
  468.   public function setPriceDelivery(?float $priceDelivery): void {
  469.     $this->priceDelivery $priceDelivery;
  470.   }
  471.   /**
  472.    * @return string|null
  473.    */
  474.   public function getDaysDelivery(): ?string {
  475.     return $this->daysDelivery;
  476.   }
  477.   /**
  478.    * @param string|null $daysDelivery
  479.    */
  480.   public function setDaysDelivery(?string $daysDelivery): void {
  481.     $this->daysDelivery $daysDelivery;
  482.   }
  483.   /**
  484.    * @return string|null
  485.    */
  486.   public function getOptions(): ?string {
  487.     return $this->options;
  488.   }
  489.   /**
  490.    * @param string|null $options
  491.    */
  492.   public function setOptions(?string $options): void {
  493.     $this->options $options;
  494.   }
  495.   /**
  496.    * @return string|null
  497.    */
  498.   public function getDeliveryDesc(): ?string {
  499.     return $this->deliveryDesc;
  500.   }
  501.   /**
  502.    * @param string|null $deliveryDesc
  503.    */
  504.   public function setDeliveryDesc(?string $deliveryDesc): void {
  505.     $this->deliveryDesc $deliveryDesc;
  506.   }
  507.   /**
  508.    * @return string|null
  509.    */
  510.   public function getDescription(): ?string {
  511.     return $this->description;
  512.   }
  513.   /**
  514.    * @param string|null $description
  515.    */
  516.   public function setDescription(?string $description): void {
  517.     $this->description $description;
  518.   }
  519.   /**
  520.    * @return string|null
  521.    */
  522.   public function getMetaTitle(): ?string {
  523.     return $this->metaTitle;
  524.   }
  525.   /**
  526.    * @param string|null $metaTitle
  527.    */
  528.   public function setMetaTitle(?string $metaTitle): void {
  529.     $this->metaTitle $metaTitle;
  530.   }
  531.   /**
  532.    * @return string|null
  533.    */
  534.   public function getMetaDescription(): ?string {
  535.     return $this->metaDescription;
  536.   }
  537.   /**
  538.    * @param string|null $metaDescription
  539.    */
  540.   public function setMetaDescription(?string $metaDescription): void {
  541.     $this->metaDescription $metaDescription;
  542.   }
  543.   /**
  544.    * @return string|null
  545.    */
  546.   public function getMetaKeywords(): ?string {
  547.     return $this->metaKeywords;
  548.   }
  549.   /**
  550.    * @param string|null $metaKeywords
  551.    */
  552.   public function setMetaKeywords(?string $metaKeywords): void {
  553.     $this->metaKeywords $metaKeywords;
  554.   }
  555.   /**
  556.    * @return bool
  557.    */
  558.   public function isShown(): bool {
  559.     return $this->isShown;
  560.   }
  561.   /**
  562.    * @param bool $isShown
  563.    */
  564.   public function setIsShown(bool $isShown): void {
  565.     $this->isShown $isShown;
  566.   }
  567.   /**
  568.    * @return bool
  569.    */
  570.   public function isOutOfStock(): bool {
  571.     return $this->isOutOfStock;
  572.   }
  573.   /**
  574.    * @param bool $isOutOfStock
  575.    */
  576.   public function setIsOutOfStock(bool $isOutOfStock): void {
  577.     $this->isOutOfStock $isOutOfStock;
  578.   }
  579.   /**
  580.    * @return bool
  581.    */
  582.   public function isNew(): bool {
  583.     return $this->isNew;
  584.   }
  585.   /**
  586.    * @param bool $isNew
  587.    */
  588.   public function setIsNew(bool $isNew): void {
  589.     $this->isNew $isNew;
  590.   }
  591.   /**
  592.    * @return bool
  593.    */
  594.   public function isDiscount(): bool {
  595.     return $this->isDiscount;
  596.   }
  597.   /**
  598.    * @param bool $isDiscount
  599.    */
  600.   public function setIsDiscount(bool $isDiscount): void {
  601.     $this->isDiscount $isDiscount;
  602.   }
  603.   /**
  604.    * @return string|null
  605.    */
  606.   public function getPercentDiscount(): ?string {
  607.     return $this->percentDiscount;
  608.   }
  609.   /**
  610.    * @param string|null $percentDiscount
  611.    */
  612.   public function setPercentDiscount(?string $percentDiscount): void {
  613.     $this->percentDiscount $percentDiscount;
  614.   }
  615.   /**
  616.    * @return int|null
  617.    */
  618.   public function getVat(): ?int {
  619.     return $this->vat;
  620.   }
  621.   /**
  622.    * @param int|null $vat
  623.    */
  624.   public function setVat(?int $vat): void {
  625.     $this->vat $vat;
  626.   }
  627.   /**
  628.    * @return bool
  629.    */
  630.   public function isSuperProduct(): bool {
  631.     return $this->isSuperProduct;
  632.   }
  633.   /**
  634.    * @param bool $isSuperProduct
  635.    */
  636.   public function setIsSuperProduct(bool $isSuperProduct): void {
  637.     $this->isSuperProduct $isSuperProduct;
  638.   }
  639.   /**
  640.    * @return Collection<int, Attribute>
  641.    */
  642.   public function getAttribute(): Collection {
  643.     return $this->attribute;
  644.   }
  645.   public function addAttribute(Attribute $attribute): self {
  646.     if (!$this->attribute->contains($attribute)) {
  647.       $this->attribute->add($attribute);
  648.       $attribute->setProduct($this);
  649.     }
  650.     return $this;
  651.   }
  652.   public function removeAttribute(Attribute $attribute): self {
  653.     if ($this->attribute->removeElement($attribute)) {
  654.       // set the owning side to null (unless already changed)
  655.       if ($attribute->getProduct() === $this) {
  656.         $attribute->setProduct(null);
  657.       }
  658.     }
  659.     return $this;
  660.   }
  661.   /**
  662.    * @return string|null
  663.    */
  664.   public function getJedinicaMere(): ?string {
  665.     return $this->jedinicaMere;
  666.   }
  667.   /**
  668.    * @param string|null $jedinicaMere
  669.    */
  670.   public function setJedinicaMere(?string $jedinicaMere): void {
  671.     $this->jedinicaMere $jedinicaMere;
  672.   }
  673.   /**
  674.    * @return int|null
  675.    */
  676.   public function getKolicina(): ?int {
  677.     return $this->kolicina;
  678.   }
  679.   /**
  680.    * @param int|null $kolicina
  681.    */
  682.   public function setKolicina(?int $kolicina): void {
  683.     $this->kolicina $kolicina;
  684.   }
  685.   public function getMainImage(): ?Image {
  686.     return $this->mainImage;
  687.   }
  688.   public function setMainImage(?Image $mainImage): self {
  689.     $this->mainImage $mainImage;
  690.     return $this;
  691.   }
  692.   public function getConnected(): ?self {
  693.     return $this->connected;
  694.   }
  695.   public function setConnected(?self $connected): self {
  696.     $this->connected $connected;
  697.     return $this;
  698.   }
  699.   /**
  700.    * @return Collection<int, self>
  701.    */
  702.   public function getProducts(): Collection {
  703.     return $this->products;
  704.   }
  705.   public function addProduct(self $product): self {
  706.     if (!$this->products->contains($product)) {
  707.       $this->products->add($product);
  708.       $product->setConnected($this);
  709.     }
  710.     return $this;
  711.   }
  712.   public function removeProduct(self $product): self {
  713.     if ($this->products->removeElement($product)) {
  714.       // set the owning side to null (unless already changed)
  715.       if ($product->getConnected() === $this) {
  716.         $product->setConnected(null);
  717.       }
  718.     }
  719.     return $this;
  720.   }
  721.   public function getCategory(): ?Category {
  722.     return $this->category;
  723.   }
  724.   public function setCategory(?Category $category): self {
  725.     $this->category $category;
  726.     return $this;
  727.   }
  728.   /**
  729.    * @return string|null
  730.    */
  731.   public function getPricePDV(): ?string {
  732.     return $this->pricePDV;
  733.   }
  734.   /**
  735.    * @param string|null $pricePDV
  736.    */
  737.   public function setPricePDV(?string $pricePDV): void {
  738.     $this->pricePDV $pricePDV;
  739.   }
  740.   /**
  741.    * @return string|null
  742.    */
  743.   public function getSku(): ?string {
  744.     return $this->sku;
  745.   }
  746.   /**
  747.    * @param string|null $sku
  748.    */
  749.   public function setSku(?string $sku): void {
  750.     $this->sku $sku;
  751.   }
  752.   /**
  753.    * @return string|null
  754.    */
  755.   public function getPriceNabavna(): ?string {
  756.     return $this->priceNabavna;
  757.   }
  758.   /**
  759.    * @param string|null $priceNabavna
  760.    */
  761.   public function setPriceNabavna(?string $priceNabavna): void {
  762.     $this->priceNabavna $priceNabavna;
  763.   }
  764.   /**
  765.    * @return Collection<int, Sale>
  766.    */
  767.   public function getSales(): Collection
  768.   {
  769.       return $this->sales;
  770.   }
  771.   public function addSale(Sale $sale): self
  772.   {
  773.       if (!$this->sales->contains($sale)) {
  774.           $this->sales->add($sale);
  775.           $sale->addProduct($this);
  776.       }
  777.       return $this;
  778.   }
  779.   public function removeSale(Sale $sale): self
  780.   {
  781.       if ($this->sales->removeElement($sale)) {
  782.           $sale->removeProduct($this);
  783.       }
  784.       return $this;
  785.   }
  786.   public function getChoice(): ?Choice
  787.   {
  788.       return $this->choice;
  789.   }
  790.   public function setChoice(?Choice $choice): self
  791.   {
  792.       $this->choice $choice;
  793.       return $this;
  794.   }
  795.   /**
  796.    * @return Collection<int, Lagproduct>
  797.    */
  798.   public function getLagproducts(): Collection
  799.   {
  800.       return $this->lagproducts;
  801.   }
  802.   public function addLagproduct(Lagproduct $lagproduct): self
  803.   {
  804.       if (!$this->lagproducts->contains($lagproduct)) {
  805.           $this->lagproducts->add($lagproduct);
  806.           $lagproduct->setProduct($this);
  807.       }
  808.       return $this;
  809.   }
  810.   public function removeLagproduct(Lagproduct $lagproduct): self
  811.   {
  812.       if ($this->lagproducts->removeElement($lagproduct)) {
  813.           // set the owning side to null (unless already changed)
  814.           if ($lagproduct->getProduct() === $this) {
  815.               $lagproduct->setProduct(null);
  816.           }
  817.       }
  818.       return $this;
  819.   }
  820.   /**
  821.    * @return bool
  822.    */
  823.   public function isOutlet(): bool {
  824.     return $this->isOutlet;
  825.   }
  826.   /**
  827.    * @param bool $isOutlet
  828.    */
  829.   public function setIsOutlet(bool $isOutlet): void {
  830.     $this->isOutlet $isOutlet;
  831.   }
  832.   /**
  833.    * @return bool|null
  834.    */
  835.   public function getIsOutOfStockUspon(): ?bool {
  836.     return $this->isOutOfStockUspon;
  837.   }
  838.   /**
  839.    * @param bool|null $isOutOfStockUspon
  840.    */
  841.   public function setIsOutOfStockUspon(?bool $isOutOfStockUspon): void {
  842.     $this->isOutOfStockUspon $isOutOfStockUspon;
  843.   }
  844.   /**
  845.    * @return bool|null
  846.    */
  847.   public function getIsOutOfStockElementa(): ?bool {
  848.     return $this->isOutOfStockElementa;
  849.   }
  850.   /**
  851.    * @param bool|null $isOutOfStockElementa
  852.    */
  853.   public function setIsOutOfStockElementa(?bool $isOutOfStockElementa): void {
  854.     $this->isOutOfStockElementa $isOutOfStockElementa;
  855.   }
  856.   /**
  857.    * @return bool|null
  858.    */
  859.   public function getIsOutOfStockBb(): ?bool {
  860.     return $this->isOutOfStockBb;
  861.   }
  862.   /**
  863.    * @param bool|null $isOutOfStockBb
  864.    */
  865.   public function setIsOutOfStockBb(?bool $isOutOfStockBb): void {
  866.     $this->isOutOfStockBb $isOutOfStockBb;
  867.   }
  868.   /**
  869.    * @return bool|null
  870.    */
  871.   public function getIsOutOfStockDsc(): ?bool {
  872.     return $this->isOutOfStockDsc;
  873.   }
  874.   /**
  875.    * @param bool|null $isOutOfStockDsc
  876.    */
  877.   public function setIsOutOfStockDsc(?bool $isOutOfStockDsc): void {
  878.     $this->isOutOfStockDsc $isOutOfStockDsc;
  879.   }
  880.   /**
  881.    * @return bool|null
  882.    */
  883.   public function getIsOutOfStockEwe(): ?bool {
  884.     return $this->isOutOfStockEwe;
  885.   }
  886.   /**
  887.    * @param bool|null $isOutOfStockEwe
  888.    */
  889.   public function setIsOutOfStockEwe(?bool $isOutOfStockEwe): void {
  890.     $this->isOutOfStockEwe $isOutOfStockEwe;
  891.   }
  892.   /**
  893.    * @return bool|null
  894.    */
  895.   public function getIsOutOfStock3g(): ?bool {
  896.     return $this->isOutOfStock3g;
  897.   }
  898.   /**
  899.    * @param bool|null $isOutOfStock3g
  900.    */
  901.   public function setIsOutOfStock3g(?bool $isOutOfStock3g): void {
  902.     $this->isOutOfStock3g $isOutOfStock3g;
  903.   }
  904.   /**
  905.    * @return bool|null
  906.    */
  907.   public function getIsOutOfStockBtm(): ?bool {
  908.     return $this->isOutOfStockBtm;
  909.   }
  910.   /**
  911.    * @param bool|null $isOutOfStockBtm
  912.    */
  913.   public function setIsOutOfStockBtm(?bool $isOutOfStockBtm): void {
  914.     $this->isOutOfStockBtm $isOutOfStockBtm;
  915.   }
  916.   /**
  917.    * @return bool|null
  918.    */
  919.   public function getIsOutOfStockCt(): ?bool {
  920.     return $this->isOutOfStockCt;
  921.   }
  922.   /**
  923.    * @param bool|null $isOutOfStockCt
  924.    */
  925.   public function setIsOutOfStockCt(?bool $isOutOfStockCt): void {
  926.     $this->isOutOfStockCt $isOutOfStockCt;
  927.   }
  928.   /**
  929.    * @return bool|null
  930.    */
  931.   public function getIsOutOfStockVelteh(): ?bool {
  932.     return $this->isOutOfStockVelteh;
  933.   }
  934.   /**
  935.    * @param bool|null $isOutOfStockVelteh
  936.    */
  937.   public function setIsOutOfStockVelteh(?bool $isOutOfStockVelteh): void {
  938.     $this->isOutOfStockVelteh $isOutOfStockVelteh;
  939.   }
  940.   /**
  941.    * @return bool|null
  942.    */
  943.   public function getIsOutOfStockPc(): ?bool {
  944.     return $this->isOutOfStockPc;
  945.   }
  946.   /**
  947.    * @param bool|null $isOutOfStockPc
  948.    */
  949.   public function setIsOutOfStockPc(?bool $isOutOfStockPc): void {
  950.     $this->isOutOfStockPc $isOutOfStockPc;
  951.   }
  952.   /**
  953.    * @return string|null
  954.    */
  955.   public function getPlainCategory(): ?string {
  956.     return $this->plainCategory;
  957.   }
  958.   /**
  959.    * @param string|null $plainCategory
  960.    */
  961.   public function setPlainCategory(?string $plainCategory): void {
  962.     $this->plainCategory $plainCategory;
  963.   }
  964.   /**
  965.    * @return string|null
  966.    */
  967.   public function getImportCat(): ?string {
  968.     return $this->importCat;
  969.   }
  970.   /**
  971.    * @param string|null $importCat
  972.    */
  973.   public function setImportCat(?string $importCat): void {
  974.     $this->importCat $importCat;
  975.   }
  976.   /**
  977.    * @return string|null
  978.    */
  979.   public function getPricePrikaz(): ?string {
  980.     return $this->pricePrikaz;
  981.   }
  982.   /**
  983.    * @param string|null $pricePrikaz
  984.    */
  985.   public function setPricePrikaz(?string $pricePrikaz): void {
  986.     $this->pricePrikaz $pricePrikaz;
  987.   }
  988.   /**
  989.    * @return bool|null
  990.    */
  991.   public function getIsOutOfStockSim(): ?bool {
  992.     return $this->isOutOfStockSim;
  993.   }
  994.   /**
  995.    * @param bool|null $isOutOfStockSim
  996.    */
  997.   public function setIsOutOfStockSim(?bool $isOutOfStockSim): void {
  998.     $this->isOutOfStockSim $isOutOfStockSim;
  999.   }
  1000.   /**
  1001.    * @return bool|null
  1002.    */
  1003.   public function getIsXmlChange(): ?bool {
  1004.     return $this->isXmlChange;
  1005.   }
  1006.   /**
  1007.    * @param bool|null $isXmlChange
  1008.    */
  1009.   public function setIsXmlChange(?bool $isXmlChange): void {
  1010.     $this->isXmlChange $isXmlChange;
  1011.   }
  1012.   /**
  1013.    * @return bool|null
  1014.    */
  1015.   public function getIsOutOfStockMipal(): ?bool {
  1016.     return $this->isOutOfStockMipal;
  1017.   }
  1018.   /**
  1019.    * @param bool|null $isOutOfStockMipal
  1020.    */
  1021.   public function setIsOutOfStockMipal(?bool $isOutOfStockMipal): void {
  1022.     $this->isOutOfStockMipal $isOutOfStockMipal;
  1023.   }
  1024.   /**
  1025.    * @return bool|null
  1026.    */
  1027.   public function getIsOutOfStockIris(): ?bool {
  1028.     return $this->isOutOfStockIris;
  1029.   }
  1030.   /**
  1031.    * @param bool|null $isOutOfStockIris
  1032.    */
  1033.   public function setIsOutOfStockIris(?bool $isOutOfStockIris): void {
  1034.     $this->isOutOfStockIris $isOutOfStockIris;
  1035.   }
  1036.   /**
  1037.    * @return int|null
  1038.    */
  1039.   public function getSale(): ?int {
  1040.     return $this->sale;
  1041.   }
  1042.   /**
  1043.    * @param int|null $sale
  1044.    */
  1045.   public function setSale(?int $sale): void {
  1046.     $this->sale $sale;
  1047.   }
  1048.   /**
  1049.    * @return bool|null
  1050.    */
  1051.   public function getIsOutOfStockGembird(): ?bool {
  1052.     return $this->isOutOfStockGembird;
  1053.   }
  1054.   /**
  1055.    * @param bool|null $isOutOfStockGembird
  1056.    */
  1057.   public function setIsOutOfStockGembird(?bool $isOutOfStockGembird): void {
  1058.     $this->isOutOfStockGembird $isOutOfStockGembird;
  1059.   }
  1060.   /**
  1061.    * @return Collection<int, Supersale>
  1062.    */
  1063.   public function getSupersales(): Collection
  1064.   {
  1065.       return $this->supersales;
  1066.   }
  1067.   public function addSupersale(Supersale $supersale): self
  1068.   {
  1069.       if (!$this->supersales->contains($supersale)) {
  1070.           $this->supersales->add($supersale);
  1071.           $supersale->setProduct($this);
  1072.       }
  1073.       return $this;
  1074.   }
  1075.   public function removeSupersale(Supersale $supersale): self
  1076.   {
  1077.       if ($this->supersales->removeElement($supersale)) {
  1078.           // set the owning side to null (unless already changed)
  1079.           if ($supersale->getProduct() === $this) {
  1080.               $supersale->setProduct(null);
  1081.           }
  1082.       }
  1083.       return $this;
  1084.   }
  1085.     public function getIsOutOfStockSpektar(): ?bool {
  1086.         return $this->isOutOfStockSpektar;
  1087.     }
  1088.     public function setIsOutOfStockSpektar(?bool $isOutOfStockSpektar): void {
  1089.         $this->isOutOfStockSpektar $isOutOfStockSpektar;
  1090.     }
  1091.     public function getIsOutOfStockVenera(): ?bool {
  1092.         return $this->isOutOfStockVenera;
  1093.     }
  1094.     public function setIsOutOfStockVenera(?bool $isOutOfStockVenera): void {
  1095.         $this->isOutOfStockVenera $isOutOfStockVenera;
  1096.     }
  1097.     public function getIsOutOfStockMs(): ?bool {
  1098.         return $this->isOutOfStockMs;
  1099.     }
  1100.     public function setIsOutOfStockMs(?bool $isOutOfStockMs): void {
  1101.         $this->isOutOfStockMs $isOutOfStockMs;
  1102.     }
  1103.     public function isBundle(): bool {
  1104.         return $this->isBundle;
  1105.     }
  1106.     public function setIsBundle(bool $isBundle): void {
  1107.         $this->isBundle $isBundle;
  1108.     }
  1109. }