src/Entity/System/ProductImage.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity\System;
  3. use Doctrine\Common\Collections\Collection;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * Product
  7.  *
  8.  * @ORM\Table(name="ps_image")
  9.  *
  10.  * @ORM\Entity(repositoryClass="App\Repository\System\ProductImageRepository")
  11.  */
  12. class ProductImage
  13. {
  14.     public const JPG_EXTENSION_VALUE '.jpg';
  15.     public const GIF_EXTENSION_VALUE '.gif';
  16.     /**
  17.      * @ORM\Column(name="id_image", type="integer")
  18.      *
  19.      * @ORM\Id
  20.      *
  21.      * @ORM\GeneratedValue(strategy="AUTO")
  22.      */
  23.     private int $id;
  24.     /**
  25.      * @ORM\ManyToOne(targetEntity="Product", inversedBy="productImages")
  26.      *
  27.      * @ORM\JoinColumn(name="id_product", referencedColumnName="id_product")
  28.      */
  29.     private Product $product;
  30.     /**
  31.      * @var Collection<int, Taxonomy>|Taxonomy[]
  32.      *
  33.      * @ORM\OneToMany(targetEntity="App\Entity\System\Taxonomy", mappedBy="image")
  34.      */
  35.     private $taxonomies;
  36.     /**
  37.      * @ORM\Column(name="position", type="integer")
  38.      */
  39.     private int $position;
  40.     /**
  41.      * @ORM\Column(name="cover", type="boolean")
  42.      */
  43.     private bool $cover;
  44.     /**
  45.      * @var string|null
  46.      *
  47.      * @ORM\Column(name="name", type="string", nullable=true)
  48.      */
  49.     private ?string $name;
  50.     /**
  51.      * @ORM\Column(name="is_gif", type="boolean")
  52.      */
  53.     private ?bool $isGif;
  54.     /**
  55.      * @ORM\Column(name="active", type="boolean")
  56.      */
  57.     private bool $active;
  58.     /**
  59.      * @ORM\Column(name="is_background_white", type="boolean", nullable=true)
  60.      */
  61.     private ?bool $isBackgroundWhite;
  62.     /**
  63.      * @ORM\Column(name="is_brand", type="boolean", nullable=true)
  64.      */
  65.     private ?bool $isBrand;
  66.     /**
  67.      * @ORM\Column(name="is_energy_efficiency", type="boolean", nullable=true)
  68.      */
  69.     private ?bool $isEnergyEfficiency;
  70.     /**
  71.      * @ORM\Column(name="is_horizontal", type="boolean", nullable=true)
  72.      */
  73.     private ?bool $isHorizontal;
  74.     /**
  75.      * @ORM\Column(name="is_icon", type="boolean", nullable=true)
  76.      */
  77.     private ?bool $isIcon;
  78.     /**
  79.      * @ORM\Column(name="is_logo", type="boolean", nullable=true)
  80.      */
  81.     private ?bool $isLogo;
  82.     /**
  83.      * @ORM\Column(name="is_marketing_photo", type="boolean", nullable=true)
  84.      */
  85.     private ?bool $isMarketingPhoto;
  86.     /**
  87.      * @ORM\Column(name="is_packaging_photo", type="boolean", nullable=true)
  88.      */
  89.     private ?bool $isPackagingPhoto;
  90.     /**
  91.      * @ORM\Column(name="has_measures", type="boolean", nullable=true)
  92.      */
  93.     private ?bool $hasMeasures;
  94.     /**
  95.      * @ORM\Column(name="gpsr_label", type="boolean", options={"default"=0})
  96.      */
  97.     private bool $gpsrLabel;
  98.     /**
  99.      * @ORM\Column(name="gpsr_warning", type="boolean", options={"default"=0})
  100.      */
  101.     private bool $gpsrWarning;
  102.     /**
  103.      * @return int
  104.      */
  105.     public function getId(): int
  106.     {
  107.         return $this->id;
  108.     }
  109.     public function getProduct(): Product
  110.     {
  111.         return $this->product;
  112.     }
  113.     /**
  114.      * @param Product $product
  115.      *
  116.      * @return ProductImage
  117.      */
  118.     public function setProduct(Product $product): ProductImage
  119.     {
  120.         $this->product $product;
  121.         return $this;
  122.     }
  123.     /**
  124.      * @return int
  125.      */
  126.     public function getPosition(): int
  127.     {
  128.         return $this->position;
  129.     }
  130.     /**
  131.      * @param int $position
  132.      *
  133.      * @return ProductImage
  134.      */
  135.     public function setPosition(int $position): ProductImage
  136.     {
  137.         $this->position $position;
  138.         return $this;
  139.     }
  140.     /**
  141.      * @return bool
  142.      */
  143.     public function isCover(): bool
  144.     {
  145.         return $this->cover;
  146.     }
  147.     /**
  148.      * @param bool $cover
  149.      *
  150.      * @return ProductImage
  151.      */
  152.     public function setCover(bool $cover): ProductImage
  153.     {
  154.         $this->cover $cover;
  155.         return $this;
  156.     }
  157.     /**
  158.      * @return string|null
  159.      */
  160.     public function getName(): ?string
  161.     {
  162.         return $this->name;
  163.     }
  164.     /**
  165.      * @param string|null $name
  166.      *
  167.      * @return ProductImage
  168.      */
  169.     public function setName(?string $name): ProductImage
  170.     {
  171.         $this->name $name;
  172.         return $this;
  173.     }
  174.     /**
  175.      * @return bool|null
  176.      */
  177.     public function isGif(): ?bool
  178.     {
  179.         return $this->isGif;
  180.     }
  181.     /**
  182.      * @param bool|null $isGif
  183.      *
  184.      * @return ProductImage
  185.      */
  186.     public function setIsGif(?bool $isGif): ProductImage
  187.     {
  188.         $this->isGif $isGif;
  189.         return $this;
  190.     }
  191.     /**
  192.      * @return bool
  193.      */
  194.     public function isActive(): bool
  195.     {
  196.         return $this->active;
  197.     }
  198.     /**
  199.      * @param bool $active
  200.      *
  201.      * @return ProductImage
  202.      */
  203.     public function setActive(bool $active): ProductImage
  204.     {
  205.         $this->active $active;
  206.         return $this;
  207.     }
  208.     public function isBackgroundWhite(): ?bool
  209.     {
  210.         return $this->isBackgroundWhite;
  211.     }
  212.     public function setIsBackgroundWhite(?bool $isBackgroundWhite): ProductImage
  213.     {
  214.         $this->isBackgroundWhite $isBackgroundWhite;
  215.         return $this;
  216.     }
  217.     public function isBrand(): ?bool
  218.     {
  219.         return $this->isBrand;
  220.     }
  221.     public function setIsBrand(?bool $isBrand): ProductImage
  222.     {
  223.         $this->isBrand $isBrand;
  224.         return $this;
  225.     }
  226.     public function isEnergyEfficiency(): ?bool
  227.     {
  228.         return $this->isEnergyEfficiency;
  229.     }
  230.     public function setIsEnergyEfficiency(?bool $isEnergyEfficiency): ProductImage
  231.     {
  232.         $this->isEnergyEfficiency $isEnergyEfficiency;
  233.         return $this;
  234.     }
  235.     public function isHorizontal(): ?bool
  236.     {
  237.         return $this->isHorizontal;
  238.     }
  239.     public function setIsHorizontal(?bool $isHorizontal): ProductImage
  240.     {
  241.         $this->isHorizontal $isHorizontal;
  242.         return $this;
  243.     }
  244.     public function isIcon(): ?bool
  245.     {
  246.         return $this->isIcon;
  247.     }
  248.     public function setIsIcon(?bool $isIcon): ProductImage
  249.     {
  250.         $this->isIcon $isIcon;
  251.         return $this;
  252.     }
  253.     public function isLogo(): ?bool
  254.     {
  255.         return $this->isLogo;
  256.     }
  257.     public function setIsLogo(?bool $isLogo): ProductImage
  258.     {
  259.         $this->isLogo $isLogo;
  260.         return $this;
  261.     }
  262.     public function isMarketingPhoto(): ?bool
  263.     {
  264.         return $this->isMarketingPhoto;
  265.     }
  266.     public function setIsMarketingPhoto(?bool $isMarketingPhoto): ProductImage
  267.     {
  268.         $this->isMarketingPhoto $isMarketingPhoto;
  269.         return $this;
  270.     }
  271.     public function isPackagingPhoto(): ?bool
  272.     {
  273.         return $this->isPackagingPhoto;
  274.     }
  275.     public function setIsPackagingPhoto(?bool $isPackagingPhoto): ProductImage
  276.     {
  277.         $this->isPackagingPhoto $isPackagingPhoto;
  278.         return $this;
  279.     }
  280.     public function getHasMeasures(): ?bool
  281.     {
  282.         return $this->hasMeasures;
  283.     }
  284.     public function setHasMeasures(?bool $hasMeasures): ProductImage
  285.     {
  286.         $this->hasMeasures $hasMeasures;
  287.         return $this;
  288.     }
  289.     public function isGpsrLabel(): bool
  290.     {
  291.         return $this->gpsrLabel;
  292.     }
  293.     public function setGpsrLabel(bool $gpsrLabel): ProductImage
  294.     {
  295.         $this->gpsrLabel $gpsrLabel;
  296.         return $this;
  297.     }
  298.     public function isGpsrWarning(): bool
  299.     {
  300.         return $this->gpsrWarning;
  301.     }
  302.     public function setGpsrWarning(bool $gpsrWarning): ProductImage
  303.     {
  304.         $this->gpsrWarning $gpsrWarning;
  305.         return $this;
  306.     }
  307.     /**
  308.      * @return Collection<int, Taxonomy>|Taxonomy[]
  309.      */
  310.     public function getTaxonomies()
  311.     {
  312.         return $this->taxonomies;
  313.     }
  314.     /**
  315.      * @param Collection<int, Taxonomy>|Taxonomy[] $taxonomies
  316.      *
  317.      * @return ProductImage
  318.      */
  319.     public function setTaxonomies($taxonomies)
  320.     {
  321.         $this->taxonomies $taxonomies;
  322.         return $this;
  323.     }
  324. }