src/Entity/ProductXml.php line 32

Open in your IDE?
  1. <?php
  2. // src/Acme/UserBundle/Entity/User.php
  3. namespace App\Entity;
  4. use Knp\DoctrineBehaviors\Contract\Entity\SoftDeletableInterface;
  5. use Knp\DoctrineBehaviors\Model\SoftDeletable\SoftDeletableTrait;
  6. use Knp\DoctrineBehaviors\Contract\Entity\TimestampableInterface;
  7. use Knp\DoctrineBehaviors\Model\Timestampable\TimestampableTrait;
  8. use Knp\DoctrineBehaviors\Contract\Entity\BlameableInterface;
  9. use Knp\DoctrineBehaviors\Model\Blameable\BlameableTrait;
  10. use Doctrine\Common\Collections\ArrayCollection;
  11. use Doctrine\Common\Collections\Collection;
  12. use Symfony\Component\Filesystem\Exception\FileNotFoundException;
  13. use Symfony\Component\Validator\Constraints as Assert;
  14. use Doctrine\ORM\Mapping as ORM;
  15. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  16. use Symfony\Component\HttpFoundation\File\File;
  17. /**
  18.  * @Doctrine\ORM\Mapping\Entity
  19.  * @Doctrine\ORM\Mapping\Table(name="product_xmls")
  20.  * @Doctrine\ORM\Mapping\Entity()
  21.  */
  22. class ProductXml implements BlameableInterfaceTimestampableInterfaceSoftDeletableInterface  {
  23.     use BlameableTrait;
  24.     use TimestampableTrait;
  25.     
  26.     use SoftDeletableTrait;
  27.     
  28. /**
  29.      * @var integer
  30.      * 
  31.      * @ORM\Column(name="id", type="integer", nullable=false)
  32.      * @ORM\Id
  33.      * @ORM\GeneratedValue(strategy="IDENTITY")
  34.      */
  35.     private $id;
  36.     /**
  37.      * @Doctrine\ORM\Mapping\Column(type="boolean", nullable=true)
  38.      */
  39.     protected $main false;
  40.     /**
  41.      * @Doctrine\ORM\Mapping\Column(name="visible_heureka", type="boolean", nullable=true)
  42.      */
  43.     protected $visibleHeureka true;
  44.     /**
  45.      * @Doctrine\ORM\Mapping\Column(name="visible_google", type="boolean", nullable=true)
  46.      */
  47.     protected $visibleGoogle true;
  48.     /**
  49.      * @Doctrine\ORM\Mapping\Column(type="boolean", nullable=true)
  50.      */
  51.     protected $visible true;
  52.     /**
  53.      * @var string
  54.      *
  55.      * @ORM\Column(name="name", type="string", length=255, nullable=true)
  56.      */
  57.     private $name;
  58.     /**
  59.      * @var string
  60.      *
  61.      * @ORM\Column(name="symbol", type="string", length=255, nullable=true)
  62.      */
  63.     private $symbol;
  64.     /**
  65.      * @var string
  66.      *
  67.      * @ORM\Column(name="product_id", type="string", length=255, nullable=true)
  68.      */
  69.     private $productId;
  70.     /**
  71.      * @var string
  72.      *
  73.      * @ORM\Column(name="url", type="string", length=255, nullable=true)
  74.      */
  75.     private $url;
  76.     /**
  77.      * @var string
  78.      *
  79.      * @ORM\Column(name="description", type="text", nullable=true)
  80.      */
  81.     private $description;
  82.     /**
  83.      * @var string
  84.      *
  85.      * @ORM\Column(name="photo_url", type="string", length=255, nullable=true)
  86.      */
  87.     private $photoUrl;
  88.     /**
  89.      * @Doctrine\ORM\Mapping\Column(type="decimal", precision=10, scale=2, nullable=true)
  90.      */
  91.     protected $price;
  92.     /**
  93.      * @var string
  94.      *
  95.      * @ORM\Column(name="heureka_category", type="string", length=255, nullable=true)
  96.      */
  97.     private $heurekaCategory;
  98.     /**
  99.      * @var string
  100.      *
  101.      * @ORM\Column(name="heureka_category_sk", type="string", length=255, nullable=true)
  102.      */
  103.     private $heurekaCategorySk;
  104.     /**
  105.      * @Doctrine\ORM\Mapping\Column(name="visible_heureka_sk", type="boolean", nullable=true)
  106.      */
  107.     protected $visibleHeurekaSk true;
  108.     /**
  109.      * @ORM\ManyToOne(targetEntity="App\Entity\Language")
  110.      * @ORM\JoinColumn(name="language", referencedColumnName="id")
  111.      */
  112.     protected $language;
  113.     /**
  114.      * @Doctrine\ORM\Mapping\ManyToMany(targetEntity="App\Entity\GoogleLabel")
  115.      * @Doctrine\ORM\Mapping\JoinTable(name="product_xl_google_label_relation")
  116.      */
  117.     private $googleLabels;
  118.     /**
  119.      * @ORM\ManyToOne(targetEntity="App\Entity\Product", inversedBy="productXml")
  120.      * @ORM\JoinColumn(name="product_reference_id", referencedColumnName="id")
  121.      */
  122.     protected $product;
  123.     public function __construct()
  124.     {
  125.         $this->googleLabels = new ArrayCollection();
  126.     }
  127.     /**
  128.      * @return mixed
  129.      */
  130.     public function getVisibleGoogle()
  131.     {
  132.         return $this->visibleGoogle;
  133.     }
  134.     /**
  135.      * @param mixed $visibleGoogle
  136.      */
  137.     public function setVisibleGoogle($visibleGoogle): void
  138.     {
  139.         $this->visibleGoogle $visibleGoogle;
  140.     }
  141.     public function getId(): ?int
  142.     {
  143.         return $this->id;
  144.     }
  145.     public function getMain(): ?bool
  146.     {
  147.         return $this->main;
  148.     }
  149.     public function setMain(?bool $main): self
  150.     {
  151.         $this->main $main;
  152.         return $this;
  153.     }
  154.     public function getVisible(): ?bool
  155.     {
  156.         return $this->visible;
  157.     }
  158.     public function setVisible(?bool $visible): self
  159.     {
  160.         $this->visible $visible;
  161.         return $this;
  162.     }
  163.     public function getName(): ?string
  164.     {
  165.         return $this->name;
  166.     }
  167.     public function setName(?string $name): self
  168.     {
  169.         $this->name $name;
  170.         return $this;
  171.     }
  172.     public function getSymbol(): ?string
  173.     {
  174.         return $this->symbol;
  175.     }
  176.     public function setSymbol(?string $symbol): self
  177.     {
  178.         $this->symbol $symbol;
  179.         return $this;
  180.     }
  181.     public function getProductId(): ?string
  182.     {
  183.         return $this->productId;
  184.     }
  185.     public function setProductId(?string $productId): self
  186.     {
  187.         $this->productId $productId;
  188.         return $this;
  189.     }
  190.     public function getUrl(): ?string
  191.     {
  192.         return $this->url;
  193.     }
  194.     public function setUrl(?string $url): self
  195.     {
  196.         $this->url $url;
  197.         return $this;
  198.     }
  199.     public function getDescription(): ?string
  200.     {
  201.         return $this->description;
  202.     }
  203.     public function setDescription(?string $description): self
  204.     {
  205.         $this->description $description;
  206.         return $this;
  207.     }
  208.     public function getPhotoUrl(): ?string
  209.     {
  210.         return $this->photoUrl;
  211.     }
  212.     public function setPhotoUrl(?string $photoUrl): self
  213.     {
  214.         $this->photoUrl $photoUrl;
  215.         return $this;
  216.     }
  217.     public function getProduct(): ?Product
  218.     {
  219.         return $this->product;
  220.     }
  221.     public function setProduct(?Product $product): self
  222.     {
  223.         $this->product $product;
  224.         return $this;
  225.     }
  226.     public function getLanguage(): ?Language
  227.     {
  228.         return $this->language;
  229.     }
  230.     public function setLanguage(?Language $language): self
  231.     {
  232.         $this->language $language;
  233.         return $this;
  234.     }
  235.     /**
  236.      * @return Collection|GoogleLabel[]
  237.      */
  238.     public function getGoogleLabels(): Collection
  239.     {
  240.         return $this->googleLabels;
  241.     }
  242.     public function addGoogleLabel(GoogleLabel $googleLabel): self
  243.     {
  244.         if (!$this->googleLabels->contains($googleLabel)) {
  245.             $this->googleLabels[] = $googleLabel;
  246.         }
  247.         return $this;
  248.     }
  249.     public function removeGoogleLabel(GoogleLabel $googleLabel): self
  250.     {
  251.         if ($this->googleLabels->contains($googleLabel)) {
  252.             $this->googleLabels->removeElement($googleLabel);
  253.         }
  254.         return $this;
  255.     }
  256.     /**
  257.      * @return mixed
  258.      */
  259.     public function getVisibleHeureka()
  260.     {
  261.         return $this->visibleHeureka;
  262.     }
  263.     /**
  264.      * @param mixed $visibleHeureka
  265.      */
  266.     public function setVisibleHeureka($visibleHeureka)
  267.     {
  268.         $this->visibleHeureka $visibleHeureka;
  269.     }
  270.     /**
  271.      * @return string
  272.      */
  273.     public function getHeurekaCategory()
  274.     {
  275.         return $this->heurekaCategory;
  276.     }
  277.     /**
  278.      * @param string $heurekaCategory
  279.      */
  280.     public function setHeurekaCategory($heurekaCategory)
  281.     {
  282.         $this->heurekaCategory $heurekaCategory;
  283.     }
  284.     /**
  285.      * @return mixed
  286.      */
  287.     public function getPrice()
  288.     {
  289.         return $this->price;
  290.     }
  291.     /**
  292.      * @param mixed $price
  293.      */
  294.     public function setPrice($price)
  295.     {
  296.         $this->price $price;
  297.     }
  298.     /**
  299.      * @return string
  300.      */
  301.     public function getHeurekaCategorySk()
  302.     {
  303.         return $this->heurekaCategorySk;
  304.     }
  305.     /**
  306.      * @param string $heurekaCategorySk
  307.      */
  308.     public function setHeurekaCategorySk($heurekaCategorySk)
  309.     {
  310.         $this->heurekaCategorySk $heurekaCategorySk;
  311.     }
  312.     /**
  313.      * @return mixed
  314.      */
  315.     public function getVisibleHeurekaSk()
  316.     {
  317.         return $this->visibleHeurekaSk;
  318.     }
  319.     /**
  320.      * @param mixed $visibleHeurekaSk
  321.      */
  322.     public function setVisibleHeurekaSk($visibleHeurekaSk)
  323.     {
  324.         $this->visibleHeurekaSk $visibleHeurekaSk;
  325.     }
  326. }