<?php
namespace App\Entity;
use App\Model\EntityTime;
use App\Repository\ProductOptionRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
#[ORM\Entity(repositoryClass: ProductOptionRepository::class)]
class ProductOption extends EntityTime
{
const NAME_MEASURE_WEIGHT = 'NAME_MEASURE_WEIGHT';
const NAME_MEASURE_VOLUME = 'NAME_MEASURE_VOLUME';
const NAME_MEASURE_LINEAR_METERS = 'NAME_MEASURE_LINEAR_METERS';
const NAME_EXTERNAL_HEIGHT = 'NAME_EXTERNAL_HEIGHT';
const NAME_EXTERNAL_WIDTH = 'NAME_EXTERNAL_WIDTH';
const NAME_EXTERNAL_DEPTH = 'NAME_EXTERNAL_DEPTH';
const NAME_INTERNAL_HEIGHT = 'NAME_INTERNAL_HEIGHT';
const NAME_INTERNAL_WIDTH = 'NAME_INTERNAL_WIDTH';
const NAME_INTERNAL_DEPTH = 'NAME_INTERNAL_DEPTH';
const NAME_INSURABLE_VALUE = 'NAME_INSURABLE_VALUE';
const NAME_LOCK_TYPE = 'NAME_LOCK_TYPE';
const NAME_AIR_EXTRACTOR = 'NAME_AIR_EXTRACTOR';
const NAME_COMPARTMENTS_COUNT = 'NAME_COMPARTMENTS_COUNT';
const NAME_FIRE_PROTECTION_HOUR = 'NAME_FIRE_PROTECTION_HOUR';
const NAME_APPROVED_CONFIDENTIAL_DEFENSE = 'NAME_APPROVED_CONFIDENTIAL_DEFENSE';
const UNIT_KG = 'UNIT_KG';
const UNIT_L = 'UNIT_L';
const UNIT_ML = 'UNIT_ML';
const UNIT_MM = 'UNIT_MM';
#[ORM\Column(length: 80)]
#[Groups(['product-option:read'])]
private ?string $name = null;
#[ORM\Column(nullable: true)]
#[Groups(['product-option:read'])]
private ?string $value = null;
#[ORM\Column(length: 40, nullable: true)]
#[Groups(['product-option:read'])]
private ?string $unit = null;
#[ORM\ManyToOne(inversedBy: 'productOptions')]
#[ORM\JoinColumn(nullable: false)]
private ?Product $product = null;
public function __construct(string $name = null, string $value = null, string $unit = null, Product $product = null)
{
$this->name = $name;
$this->value = $value;
$this->unit = $unit;
$this->product = $product;
parent::__construct();
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getValue(): string
{
return $this->value;
}
public function setValue(?string $value): self
{
$this->value = $value;
return $this;
}
public function getUnit(): ?string
{
return $this->unit;
}
public function setUnit(?string $unit): self
{
$this->unit = $unit;
return $this;
}
public function getProduct(): ?Product
{
return $this->product;
}
public function setProduct(?Product $product): self
{
$this->product = $product;
return $this;
}
}