src/Entity/RDVProduct.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use App\Entity\Product\ProductType;
  5. use App\Entity\Product;
  6. use App\Entity\RDV;
  7. use App\Repository\RDVProductRepository;
  8. /**
  9.  * Product
  10.  *
  11.  * @ORM\Table(name="rdv_product")
  12.  * @ORM\Entity(repositoryClass=RDVProductRepository::class)
  13.  */
  14. class RDVProduct
  15. {
  16.     /**
  17.      * @var int
  18.      *
  19.      * @ORM\Column(name="id", type="integer", nullable=false)
  20.      * @ORM\Id
  21.      * @ORM\GeneratedValue(strategy="IDENTITY")
  22.      */
  23.     private $id;
  24.     /**
  25.      * @var Product
  26.      *
  27.      * @ORM\ManyToOne(targetEntity=Product::class, inversedBy="rdvProduct")
  28.      * @ORM\JoinColumn(name="product_id", referencedColumnName="id", onDelete="SET NULL")
  29.      */
  30.     private $product;
  31.     /**
  32.      * @var RDV
  33.      *
  34.      * @ORM\ManyToOne(targetEntity=RDV::class, inversedBy="rdvProduct")
  35.      * @ORM\JoinColumn(name="rdv_id", referencedColumnName="id", onDelete="SET NULL")
  36.      */
  37.     private $rdv;
  38.     public function __toString(){
  39.         return (string) $this->getId();
  40.     }
  41.     public function getId(): ?int
  42.     {
  43.         return $this->id;
  44.     }
  45.     /**
  46.      * @return Product
  47.      */
  48.     public function getProduct(): ?Product
  49.     {
  50.         return $this->product;
  51.     }
  52.     /**
  53.      * @param Product $product
  54.      */
  55.     public function setProduct(Product $product): void
  56.     {
  57.         $this->product $product;
  58.     }
  59.     /**
  60.      * @return RDV
  61.      */
  62.     public function getRdv(): ?RDV
  63.     {
  64.         return $this->rdv;
  65.     }
  66.     /**
  67.      * @param RDV $rdv
  68.      */
  69.     public function setRdv(RDV $rdv): void
  70.     {
  71.         $this->rdv $rdv;
  72.     }
  73. }