<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use App\Entity\Product\ProductType;
use App\Entity\Product;
use App\Entity\RDV;
use App\Repository\RDVProductRepository;
/**
* Product
*
* @ORM\Table(name="rdv_product")
* @ORM\Entity(repositoryClass=RDVProductRepository::class)
*/
class RDVProduct
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @var Product
*
* @ORM\ManyToOne(targetEntity=Product::class, inversedBy="rdvProduct")
* @ORM\JoinColumn(name="product_id", referencedColumnName="id", onDelete="SET NULL")
*/
private $product;
/**
* @var RDV
*
* @ORM\ManyToOne(targetEntity=RDV::class, inversedBy="rdvProduct")
* @ORM\JoinColumn(name="rdv_id", referencedColumnName="id", onDelete="SET NULL")
*/
private $rdv;
public function __toString(){
return (string) $this->getId();
}
public function getId(): ?int
{
return $this->id;
}
/**
* @return Product
*/
public function getProduct(): ?Product
{
return $this->product;
}
/**
* @param Product $product
*/
public function setProduct(Product $product): void
{
$this->product = $product;
}
/**
* @return RDV
*/
public function getRdv(): ?RDV
{
return $this->rdv;
}
/**
* @param RDV $rdv
*/
public function setRdv(RDV $rdv): void
{
$this->rdv = $rdv;
}
}