<?php
namespace App\Entity;
use App\Repository\ProductServiceRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=ProductServiceRepository::class)
*/
class ProductService
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=Product::class, inversedBy="productServices")
* @ORM\JoinColumn(nullable=false)
*/
private $product;
/**
* @ORM\ManyToOne(targetEntity=Product::class, inversedBy="productServices")
* @ORM\JoinColumn(nullable=false)
*/
private $option;
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 getOption(): ?Product
{
return $this->option;
}
public function setOption(?Product $option): self
{
$this->option = $option;
return $this;
}
public function __toString()
{
return $this->option->getName();
}
}