src/Entity/Favoris.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * @ORM\Entity(repositoryClass="App\Repository\FavoriteRepository")
  6.  */
  7. class Favoris
  8. {
  9.     /**
  10.      * @ORM\Id
  11.      *
  12.      * @ORM\GeneratedValue
  13.      *
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\ManyToOne(targetEntity="App\Entity\User", inversedBy="users_favoris", cascade={"persist"})
  19.      *
  20.      * @ORM\JoinColumn(nullable=false)
  21.      */
  22.     private $user;
  23.     /**
  24.      * @ORM\ManyToOne(targetEntity="App\Entity\StripeProduct", inversedBy="products_cart", cascade={"persist"})
  25.      *
  26.      * @ORM\JoinColumn(nullable=false)
  27.      */
  28.     private $product;
  29.     /**
  30.      * @return mixed
  31.      */
  32.     public function getId()
  33.     {
  34.         return $this->id;
  35.     }
  36.     /**
  37.      * @param mixed $id
  38.      */
  39.     public function setId($id): void
  40.     {
  41.         $this->id $id;
  42.     }
  43.     /**
  44.      * @return mixed
  45.      */
  46.     public function getUser()
  47.     {
  48.         return $this->user;
  49.     }
  50.     /**
  51.      * @param mixed $user
  52.      */
  53.     public function setUser($user): void
  54.     {
  55.         $this->user $user;
  56.     }
  57.     /**
  58.      * @return mixed
  59.      */
  60.     public function getProduct()
  61.     {
  62.         return $this->product;
  63.     }
  64.     /**
  65.      * @param mixed $product
  66.      */
  67.     public function setProduct($product): void
  68.     {
  69.         $this->product $product;
  70.     }
  71. }