src/Entity/ProductWishlist.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ProductWishlistRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use DateTime;
  6. use App\Entity\Product;
  7. use App\Entity\Wishlist;
  8. /**
  9.  * @ORM\Entity(repositoryClass=ProductWishlistRepository::class)
  10.  */
  11. class ProductWishlist
  12. {
  13.     /**
  14.      * @ORM\Id
  15.      * @ORM\GeneratedValue
  16.      * @ORM\Column(type="integer")
  17.      */
  18.     private $id;
  19.     /**
  20.      * @ORM\Column(type="integer", name="product_id")
  21.      */
  22.     private $productId;
  23.     /**
  24.      * @ORM\ManyToOne(targetEntity="App\Entity\Product", inversedBy="productWishlist")
  25.      * @ORM\JoinColumn(nullable=false)
  26.      */
  27.     private $product;
  28.     /**
  29.      * @ORM\ManyToOne(targetEntity="App\Entity\Wishlist", inversedBy="productWishlist")
  30.      * @ORM\JoinColumn(nullable=false)
  31.      */
  32.     private $wishlist;
  33.     /**
  34.      * @ORM\Column(type="datetime")
  35.      */
  36.     private $created_at;
  37.     /**
  38.      * @ORM\Column(type="datetime")
  39.      */
  40.     private $updated_at;
  41.     public function getId(): ?int
  42.     {
  43.         return $this->id;
  44.     }
  45.     public function getProduct(): ?Product
  46.     {
  47.         return $this->product;
  48.     }
  49.     public function setProduct(?Product $product): self
  50.     {
  51.         $this->product $product;
  52.         return $this;
  53.     }
  54.     
  55.     public function getWishlist(): ?Wishlist
  56.     {
  57.         return $this->wishlist;
  58.     }
  59.     public function setWishlist(?Wishlist $wishlist): self
  60.     {
  61.         $this->wishlist $wishlist;
  62.         return $this;
  63.     }
  64.     public function getCreatedAt(): ?\DateTimeInterface
  65.     {
  66.         return $this->created_at;
  67.     }
  68.     public function setCreatedAt(\DateTimeInterface $created_at): self
  69.     {
  70.         $this->created_at $created_at;
  71.         return $this;
  72.     }
  73.     public function getUpdatedAt(): ?\DateTimeInterface
  74.     {
  75.         return $this->updated_at;
  76.     }
  77.     public function setUpdatedAt(\DateTimeInterface $updated_at): self
  78.     {
  79.         $this->updated_at $updated_at;
  80.         return $this;
  81.     }
  82. }