<?php
namespace App\Entity;
use App\Repository\ProductFieldRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=ProductFieldRepository::class)
*/
class ProductField
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=Product::class, inversedBy="productFields")
* @ORM\JoinColumn(nullable=false)
*/
private $product;
/**
* @ORM\ManyToOne(targetEntity=ProductTypeField::class, inversedBy="productFields")
* @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
*/
private $product_type_field;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $value;
public function getId(): ?int
{
return $this->id;
}
public function getProduct(): ?Product
{
return $this->product;
}
public function setProduct(?Product $product): self
{
$this->product = $product;
return $this;
}
public function getProductTypeField(): ?ProductTypeField
{
return $this->product_type_field;
}
public function setProductTypeField(?ProductTypeField $product_type_field): self
{
$this->product_type_field = $product_type_field;
return $this;
}
public function getValue(): ?string
{
return $this->value;
}
public function setValue(?string $value): self
{
$this->value = $value;
return $this;
}
}