<?php
namespace App\Entity;
use App\Entity\Trait\BaseLocalizedWebspaceInterface;
use App\Entity\Trait\BaseLocalizedWebspaceTrait;
use App\Repository\ProductVariantRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Sulu\Bundle\MediaBundle\Entity\Media;
#[ORM\Entity(repositoryClass: ProductVariantRepository::class)]
#[ORM\Table('app_product_variants')]
class ProductVariant implements BaseLocalizedWebspaceInterface
{
use BaseLocalizedWebspaceTrait;
public const RESOURCE_KEY = 'product_variants';
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
private ?string $productCode = null;
#[ORM\Column(length: 255)]
private ?string $title = null;
#[ORM\Column(type: Types::BOOLEAN)]
private ?bool $active = true;
#[ORM\Column(length: 255, nullable: true)]
private ?string $category = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $family = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $type = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $fixation = null;
#[ORM\Column(type: Types::INTEGER, nullable: true)]
private ?int $luminousFlux = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $cri = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $chromaticity = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $dispersionVariant = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $protectClass = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $radiationDirect = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $shape = null;
#[ORM\Column(type: Types::INTEGER, nullable: true)]
private ?int $dimensionA = null;
#[ORM\Column(type: Types::INTEGER, nullable: true)]
private ?int $dimensionB = null;
#[ORM\Column(type: Types::INTEGER, nullable: true)]
private ?int $dimensionC = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $color = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $tempMax = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $tempMin = null;
#[ORM\Column(type: Types::FLOAT, nullable: true)]
private ?float $inputPower = null;
#[ORM\Column(type: Types::INTEGER, nullable: true)]
private ?int $efficiency = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $protectClassEl = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $supplyVoltage = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $resourceType = null;
#[ORM\Column(type: Types::BOOLEAN)]
private ?string $statusNew = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $mechanicalDurability = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $dispersion = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $driver = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $supplements = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $dimension = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $colorRal = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $material = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $driverFunction = null;
#[ORM\Column(type: Types::FLOAT, nullable: true)]
private ?float $weight = null;
#[ORM\Column(type: Types::INTEGER, nullable: true)]
private ?int $luminousFluxSupply = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $aliveLed = null;
#[ORM\Column(type: Types::INTEGER, nullable: true)]
private ?int $guarantee = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $variantUse = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $accessories = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $description = null;
#[ORM\ManyToMany(targetEntity: Media::class, fetch: 'EXTRA_LAZY')]
#[ORM\JoinTable(name: 'app_product_variant_images')]
private Collection $images;
#[ORM\ManyToMany(targetEntity: Media::class, fetch: 'EXTRA_LAZY')]
#[ORM\JoinTable(name: 'app_product_variant_renders')]
private Collection $renders;
#[ORM\ManyToMany(targetEntity: Media::class, fetch: 'EXTRA_LAZY')]
#[ORM\JoinTable(name: 'app_product_variant_files')]
private Collection $files;
#[ORM\ManyToOne(fetch: 'EXTRA_LAZY')]
#[ORM\JoinColumn(referencedColumnName: 'id', onDelete: 'SET NULL')]
private ?Media $image = null;
#[ORM\ManyToOne(fetch: 'EXTRA_LAZY', inversedBy: 'productVariants')]
#[ORM\JoinColumn(referencedColumnName: 'id', onDelete: 'SET NULL')]
private ?Product $product = null;
#[ORM\ManyToOne(fetch: 'EXTRA_LAZY')]
#[ORM\JoinColumn(referencedColumnName: 'id', onDelete: 'SET NULL')]
private ?ProductFamily $productFamily = null;
#[ORM\ManyToOne(fetch: 'EXTRA_LAZY')]
#[ORM\JoinColumn(referencedColumnName: 'id', onDelete: 'SET NULL')]
private ?ProductCategory $productCategory = null;
#[ORM\ManyToOne(fetch: 'EXTRA_LAZY')]
#[ORM\JoinColumn(referencedColumnName: 'id', onDelete: 'SET NULL')]
private ?Media $imageSchema = null;
#[ORM\ManyToOne(fetch: 'EXTRA_LAZY')]
#[ORM\JoinColumn(referencedColumnName: 'id', onDelete: 'SET NULL')]
private ?Media $imageCurves = null;
#[ORM\ManyToOne(fetch: 'EXTRA_LAZY')]
#[ORM\JoinColumn(referencedColumnName: 'id', onDelete: 'SET NULL')]
private ?Media $ltdCurves = null;
public function __construct()
{
$this->images = new ArrayCollection();
$this->renders = new ArrayCollection();
$this->files = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getTitle(): ?string
{
return $this->title;
}
public function setTitle(string $title): static
{
$this->title = $title;
return $this;
}
public function getProductCode(): ?string
{
return $this->productCode;
}
public function setProductCode(?string $productCode): static
{
$this->productCode = $productCode;
return $this;
}
public function getActive(): ?bool
{
return $this->active;
}
public function setActive(?bool $active): static
{
$this->active = $active;
return $this;
}
public function getCategory(): ?string
{
return $this->category;
}
public function setCategory(?string $category): static
{
$this->category = $category;
return $this;
}
public function getFamily(): ?string
{
return $this->family;
}
public function setFamily(?string $family): static
{
$this->family = $family;
return $this;
}
public function getProduct(): ?Product
{
return $this->product;
}
public function setProduct(?Product $product): static
{
$this->product = $product;
return $this;
}
public function isProduct(): bool
{
return isset($this->product);
}
public function getProductFamily(): ?ProductFamily
{
return $this->productFamily;
}
public function setProductFamily(?ProductFamily $productFamily): static
{
$this->productFamily = $productFamily;
return $this;
}
public function isProductFamily(): bool
{
return isset($this->productFamily);
}
public function getProductCategory(): ?ProductCategory
{
return $this->productCategory;
}
public function setProductCategory(?ProductCategory $productCategory): static
{
$this->productCategory = $productCategory;
return $this;
}
public function isProductCategory(): bool
{
return isset($this->productCategory);
}
public function getImage(): ?Media
{
return $this->image;
}
public function setImage(?Media $image): static
{
$this->image = $image;
return $this;
}
public function isImage(): bool
{
return isset($this->image);
}
public function getImageSchema(): ?Media
{
return $this->imageSchema;
}
public function setImageSchema(?Media $imageSchema): static
{
$this->imageSchema = $imageSchema;
return $this;
}
public function isImageSchema(): bool
{
return isset($this->imageSchema);
}
public function getImageCurves(): ?Media
{
return $this->imageCurves;
}
public function setImageCurves(?Media $imageCurves): static
{
$this->imageCurves = $imageCurves;
return $this;
}
public function isImageCurves(): bool
{
return isset($this->imageCurves);
}
public function getLtdCurves(): ?Media
{
return $this->ltdCurves;
}
public function setLtdCurves(?Media $ltdCurves): static
{
$this->ltdCurves = $ltdCurves;
return $this;
}
public function isLtdCurves(): bool
{
return isset($this->ltdCurves);
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): static
{
$this->description = $description;
return $this;
}
public function getType(): ?string
{
return $this->type;
}
public function setType(?string $type): static
{
$this->type = $type;
return $this;
}
public function getFixation(): ?string
{
return $this->fixation;
}
public function setFixation(?string $fixation): static
{
$this->fixation = $fixation;
return $this;
}
public function getLuminousFlux(): ?int
{
return $this->luminousFlux;
}
public function setLuminousFlux(?int $luminousFlux): static
{
$this->luminousFlux = $luminousFlux;
return $this;
}
public function getCri(): ?string
{
return $this->cri;
}
public function setCri(?string $cri): static
{
$this->cri = $cri;
return $this;
}
public function getChromaticity(): ?string
{
return $this->chromaticity;
}
public function setChromaticity(?string $chromaticity): static
{
$this->chromaticity = $chromaticity;
return $this;
}
public function getDispersionVariant(): ?string
{
return $this->dispersionVariant;
}
public function setDispersionVariant(?string $dispersionVariant): static
{
$this->dispersionVariant = $dispersionVariant;
return $this;
}
public function getProtectClass(): ?string
{
return $this->protectClass;
}
public function setProtectClass(?string $protectClass): static
{
$this->protectClass = $protectClass;
return $this;
}
public function getRadiationDirect(): ?string
{
return $this->radiationDirect;
}
public function setRadiationDirect(?string $radiationDirect): static
{
$this->radiationDirect = $radiationDirect;
return $this;
}
public function getShape(): ?string
{
return $this->shape;
}
public function setShape(?string $shape): static
{
$this->shape = $shape;
return $this;
}
public function getDimensionA(): ?int
{
return $this->dimensionA;
}
public function setDimensionA(?int $dimensionA): static
{
$this->dimensionA = $dimensionA;
return $this;
}
public function getDimensionB(): ?int
{
return $this->dimensionB;
}
public function setDimensionB(?int $dimensionB): static
{
$this->dimensionB = $dimensionB;
return $this;
}
public function getDimensionC(): ?int
{
return $this->dimensionC;
}
public function setDimensionC(?int $dimensionC): static
{
$this->dimensionC = $dimensionC;
return $this;
}
public function getColor(): ?string
{
return $this->color;
}
public function setColor(?string $color): static
{
$this->color = $color;
return $this;
}
public function getTempMax(): ?string
{
return $this->tempMax;
}
public function setTempMax(?string $tempMax): static
{
$this->tempMax = $tempMax;
return $this;
}
public function getTempMin(): ?string
{
return $this->tempMin;
}
public function setTempMin(?string $tempMin): static
{
$this->tempMin = $tempMin;
return $this;
}
public function getInputPower(): ?float
{
return $this->inputPower;
}
public function setInputPower(?float $inputPower): static
{
$this->inputPower = $inputPower;
return $this;
}
public function getEfficiency(): ?int
{
return $this->efficiency;
}
public function setEfficiency(?int $efficiency): static
{
$this->efficiency = $efficiency;
return $this;
}
public function getProtectClassEl(): ?string
{
return $this->protectClassEl;
}
public function setProtectClassEl(?string $protectClassEl): static
{
$this->protectClassEl = $protectClassEl;
return $this;
}
public function getSupplyVoltage(): ?string
{
return $this->supplyVoltage;
}
public function setSupplyVoltage(?string $supplyVoltage): static
{
$this->supplyVoltage = $supplyVoltage;
return $this;
}
public function getResourceType(): ?string
{
return $this->resourceType;
}
public function setResourceType(?string $resourceType): static
{
$this->resourceType = $resourceType;
return $this;
}
public function getStatusNew(): ?bool
{
return $this->statusNew;
}
public function setStatusNew(?bool $statusNew): static
{
$this->statusNew = $statusNew;
return $this;
}
public function getMechanicalDurability(): ?string
{
return $this->mechanicalDurability;
}
public function setMechanicalDurability(?string $mechanicalDurability): static
{
$this->mechanicalDurability = $mechanicalDurability;
return $this;
}
public function getDispersion(): ?string
{
return $this->dispersion;
}
public function setDispersion(?string $dispersion): static
{
$this->dispersion = $dispersion;
return $this;
}
public function getDriver(): ?string
{
return $this->driver;
}
public function setDriver(?string $driver): static
{
$this->driver = $driver;
return $this;
}
public function getSupplements(): ?string
{
return $this->supplements;
}
public function setSupplements(?string $supplements): static
{
$this->supplements = $supplements;
return $this;
}
public function getDimension(): ?string
{
return $this->dimension;
}
public function setDimension(?string $dimension): static
{
$this->dimension = $dimension;
return $this;
}
public function getColorRal(): ?string
{
return $this->colorRal;
}
public function setColorRal(?string $colorRal): static
{
$this->colorRal = $colorRal;
return $this;
}
public function getMaterial(): ?string
{
return $this->material;
}
public function setMaterial(?string $material): static
{
$this->material = $material;
return $this;
}
public function getDriverFunction(): ?string
{
return $this->driverFunction;
}
public function setDriverFunction(?string $driverFunction): static
{
$this->driverFunction = $driverFunction;
return $this;
}
public function getWeight(): ?float
{
return $this->weight;
}
public function setWeight(?float $weight): static
{
$this->weight = $weight;
return $this;
}
public function getLuminousFluxSupply(): ?int
{
return $this->luminousFluxSupply;
}
public function setLuminousFluxSupply(?int $luminousFluxSupply): static
{
$this->luminousFluxSupply = $luminousFluxSupply;
return $this;
}
public function getAliveLed(): ?string
{
return $this->aliveLed;
}
public function setAliveLed(?string $aliveLed): static
{
$this->aliveLed = $aliveLed;
return $this;
}
public function getGuarantee(): ?int
{
return $this->guarantee;
}
public function setGuarantee(?int $guarantee): static
{
$this->guarantee = $guarantee;
return $this;
}
public function getUsage(): ?string
{
return $this->variantUse;
}
public function setUsage(?string $variantUse): static
{
$this->variantUse = $variantUse;
return $this;
}
public function getAccessories(): ?string
{
return $this->accessories;
}
public function setAccessories(?string $accessories): static
{
$this->accessories = $accessories;
return $this;
}
/**
* @return Collection<int, Media>
*/
public function getImages(): Collection
{
return $this->images;
}
public function addImage(Media $image): static
{
if (!$this->images->contains($image)) {
$this->images->add($image);
}
return $this;
}
public function removeImage(Media $image): static
{
$this->images->removeElement($image);
return $this;
}
/**
* @return Collection<int, Media>
*/
public function getRenders(): Collection
{
return $this->renders;
}
public function addRender(Media $render): static
{
if (!$this->renders->contains($render)) {
$this->renders->add($render);
}
return $this;
}
public function removeRender(Media $render): static
{
$this->renders->removeElement($render);
return $this;
}
/**
* @return Collection<int, Media>
*/
public function getFiles(): Collection
{
return $this->files;
}
public function addFile(Media $file): static
{
if (!$this->files->contains($file)) {
$this->files->add($file);
}
return $this;
}
public function removeFile(Media $file): static
{
$this->files->removeElement($file);
return $this;
}
}