<?phpnamespace App\Entity\System;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\ORM\Mapping as ORM;/** * Wishlist * * @ORM\Table(name="wishlist") * * @ORM\Entity(repositoryClass="App\Repository\System\WishlistRepository") */class Wishlist{ public const FAVORITE_TYPE_ID = 1; public const CUSTOM_TYPE_ID = 2; public const DEFAULT_TYPE_NAME_ES = 'Favoritos'; public const DEFAULT_TYPE_NAME_EN = 'Favorites'; public const MAX_NUM_WISHLIST = 10; public const MAX_NUM_PRODUCTS_BY_WISHLIST = 200; /** * @ORM\Id() * * @ORM\GeneratedValue() * * @ORM\Column(type="integer", name="id") */ protected $id; /** * @var Customer * * @ORM\ManyToOne(targetEntity="App\Entity\System\Customer", inversedBy="wishlists") * * @ORM\JoinColumn(name="customer_id", referencedColumnName="id_customer", nullable=false) */ protected $customer; /** * @var string|null * * @ORM\Column(type="string", length=100, nullable=false) */ protected $name; /** * @var int * * @ORM\Column(type="integer") */ protected $type; /** * @var ProductTracking[]|ArrayCollection * * @ORM\OneToMany(targetEntity="ProductTracking", mappedBy="wishlist") */ protected $products; /** * @return mixed */ public function getId() { return $this->id; } public function getCustomer(): Customer { return $this->customer; } public function getName(): ?string { return $this->name; } /** * @return int */ public function getType(): int { return $this->type; } /** * @return ProductTracking[]|ArrayCollection */ public function getProducts() { return $this->products; } public function setId($id) { $this->id = $id; return $this; } public function setCustomer(Customer $customer): Wishlist { $this->customer = $customer; return $this; } public function setName(?string $name): Wishlist { $this->name = $name; return $this; } public function setType(int $type): Wishlist { $this->type = $type; return $this; } public function setProducts($products) { $this->products = $products; return $this; }}