<?php
namespace App\Entity\Product;
use App\Entity\Gallery\Gallery;
use App\Repository\Product\ProductImageRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: ProductImageRepository::class)]
class ProductImage
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column]
private ?int $position = null;
#[ORM\ManyToOne(inversedBy: 'productImages')]
private ?Product $product = null;
#[ORM\ManyToOne]
private ?Gallery $image = null;
#[ORM\ManyToOne(inversedBy: 'productImages')]
private ?ProductVariant $productVariant = null;
public function getId(): ?int
{
return $this->id;
}
public function getPosition(): ?int
{
return $this->position;
}
public function setPosition(int $position): static
{
$this->position = $position;
return $this;
}
public function getProduct(): ?Product
{
return $this->product;
}
public function setProduct(?Product $product): static
{
$this->product = $product;
return $this;
}
public function getImage(): ?Gallery
{
return $this->image;
}
public function setImage(?Gallery $image): static
{
$this->image = $image;
return $this;
}
public function getProductVariant(): ?ProductVariant
{
return $this->productVariant;
}
public function setProductVariant(?ProductVariant $productVariant): static
{
$this->productVariant = $productVariant;
return $this;
}
}