src/Entity/Favorite.php line 11

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