src/Entity/ProductOption.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Model\EntityTime;
  4. use App\Repository\ProductOptionRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Component\Serializer\Annotation\Groups;
  7. #[ORM\Entity(repositoryClassProductOptionRepository::class)]
  8. class ProductOption extends EntityTime
  9. {
  10.     const NAME_MEASURE_WEIGHT 'NAME_MEASURE_WEIGHT';
  11.     const NAME_MEASURE_VOLUME 'NAME_MEASURE_VOLUME';
  12.     const NAME_MEASURE_LINEAR_METERS 'NAME_MEASURE_LINEAR_METERS';
  13.     const NAME_EXTERNAL_HEIGHT 'NAME_EXTERNAL_HEIGHT';
  14.     const NAME_EXTERNAL_WIDTH 'NAME_EXTERNAL_WIDTH';
  15.     const NAME_EXTERNAL_DEPTH 'NAME_EXTERNAL_DEPTH';
  16.     const NAME_INTERNAL_HEIGHT 'NAME_INTERNAL_HEIGHT';
  17.     const NAME_INTERNAL_WIDTH 'NAME_INTERNAL_WIDTH';
  18.     const NAME_INTERNAL_DEPTH 'NAME_INTERNAL_DEPTH';
  19.     const NAME_INSURABLE_VALUE 'NAME_INSURABLE_VALUE';
  20.     const NAME_LOCK_TYPE 'NAME_LOCK_TYPE';
  21.     const NAME_AIR_EXTRACTOR 'NAME_AIR_EXTRACTOR';
  22.     const NAME_COMPARTMENTS_COUNT 'NAME_COMPARTMENTS_COUNT';
  23.     const NAME_FIRE_PROTECTION_HOUR 'NAME_FIRE_PROTECTION_HOUR';
  24.     const NAME_APPROVED_CONFIDENTIAL_DEFENSE 'NAME_APPROVED_CONFIDENTIAL_DEFENSE';
  25.     const UNIT_KG 'UNIT_KG';
  26.     const UNIT_L 'UNIT_L';
  27.     const UNIT_ML 'UNIT_ML';
  28.     const UNIT_MM 'UNIT_MM';
  29.     #[ORM\Column(length80)]
  30.     #[Groups(['product-option:read'])]
  31.     private ?string $name null;
  32.     #[ORM\Column(nullabletrue)]
  33.     #[Groups(['product-option:read'])]
  34.     private ?string $value null;
  35.     #[ORM\Column(length40nullabletrue)]
  36.     #[Groups(['product-option:read'])]
  37.     private ?string $unit null;
  38.     #[ORM\ManyToOne(inversedBy'productOptions')]
  39.     #[ORM\JoinColumn(nullablefalse)]
  40.     private ?Product $product null;
  41.     public function __construct(string $name nullstring $value nullstring $unit nullProduct $product null)
  42.     {
  43.         $this->name $name;
  44.         $this->value $value;
  45.         $this->unit $unit;
  46.         $this->product $product;
  47.         parent::__construct();
  48.     }
  49.     public function getName(): ?string
  50.     {
  51.         return $this->name;
  52.     }
  53.     public function setName(string $name): self
  54.     {
  55.         $this->name $name;
  56.         return $this;
  57.     }
  58.     public function getValue(): string
  59.     {
  60.         return $this->value;
  61.     }
  62.     public function setValue(?string $value): self
  63.     {
  64.         $this->value $value;
  65.         return $this;
  66.     }
  67.     public function getUnit(): ?string
  68.     {
  69.         return $this->unit;
  70.     }
  71.     public function setUnit(?string $unit): self
  72.     {
  73.         $this->unit $unit;
  74.         return $this;
  75.     }
  76.     public function getProduct(): ?Product
  77.     {
  78.         return $this->product;
  79.     }
  80.     public function setProduct(?Product $product): self
  81.     {
  82.         $this->product $product;
  83.         return $this;
  84.     }
  85. }