<?php
namespace App\Entity;
use DateTimeImmutable;
use Doctrine\Common\Collections\Collection;
use Symfony\Component\Validator\Constraints as Assert;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\ORM\Mapping\UniqueConstraint;
use Doctrine\ORM\Mapping\Table;
/**
* @ORM\Entity(repositoryClass="App\Repository\WishListLikeRepository")
* @Table(name="wish_list_like",
* uniqueConstraints={
* @UniqueConstraint(name="unique_like",
* columns={"wish_list_id", "user_id"})
* }
* )
*/
class WishListLike
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="boolean")
*/
private $isLike = true;
/**
* @ORM\Column(type="datetime_immutable")
*/
private $created;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\WishList", inversedBy="wishListLikes")
*/
private $wishList;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\User", inversedBy="userLikes")
*/
private $user;
public function __construct()
{
}
public function getId(): ?int
{
return $this->id;
}
public function getIsLike(): ?bool
{
return $this->isLike;
}
public function setIsLike(bool $like): self
{
$this->isLike = $like;
return $this;
}
/**
* @return DateTimeImmutable|null
*/
public function getCreated(): ?DateTimeImmutable
{
return $this->created;
}
/**
* @param DateTimeImmutable $created
* @return $this
*/
public function setCreated(DateTimeImmutable $created): self
{
$this->created = $created;
return $this;
}
/**
* @return WishList
*/
public function getWishList(): ?WishList
{
return $this->wishList;
}
/**
* @param WishList $wishList
*
* @return WishListLike
*/
public function setWishList(WishList $wishList): self
{
$this->wishList = $wishList;
return $this;
}
/**
* @return User|null
*/
public function getUser(): ?User
{
return $this->users;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
}