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. public function getWishlist(): ?Wishlist
  55. {
  56. return $this->wishlist;
  57. }
  58. public function setWishlist(?Wishlist $wishlist): self
  59. {
  60. $this->wishlist = $wishlist;
  61. return $this;
  62. }
  63. public function getCreatedAt(): ?\DateTimeInterface
  64. {
  65. return $this->created_at;
  66. }
  67. public function setCreatedAt(\DateTimeInterface $created_at): self
  68. {
  69. $this->created_at = $created_at;
  70. return $this;
  71. }
  72. public function getUpdatedAt(): ?\DateTimeInterface
  73. {
  74. return $this->updated_at;
  75. }
  76. public function setUpdatedAt(\DateTimeInterface $updated_at): self
  77. {
  78. $this->updated_at = $updated_at;
  79. return $this;
  80. }
  81. }