src/Entity/ProductXml.php line 28

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