src/Entity/UserLikes.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * @ORM\Entity(repositoryClass="App\Repository\UserLikesRepository")
  6.  */
  7. class UserLikes
  8. {
  9.     /**
  10.      * @ORM\Id
  11.      *
  12.      * @ORM\GeneratedValue
  13.      *
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\ManyToOne(targetEntity="App\Entity\User", inversedBy="likes", cascade={"persist", "remove"})
  19.      *
  20.      * @ORM\JoinColumn(nullable=false)
  21.      */
  22.     private $user;
  23.     /**
  24.      * @ORM\ManyToOne(targetEntity="App\Entity\Comment", inversedBy="commentLikes", cascade={"persist", "remove"})
  25.      *
  26.      * @ORM\JoinColumn(nullable=false)
  27.      */
  28.     private $comment;
  29.     /**
  30.      * @ORM\Column(type="datetime")
  31.      */
  32.     private $createdAt;
  33.     /**
  34.      * @return mixed
  35.      */
  36.     public function getId()
  37.     {
  38.         return $this->id;
  39.     }
  40.     /**
  41.      * @param mixed $id
  42.      */
  43.     public function setId($id): void
  44.     {
  45.         $this->id $id;
  46.     }
  47.     /**
  48.      * @return mixed
  49.      */
  50.     public function getComment()
  51.     {
  52.         return $this->comment;
  53.     }
  54.     /**
  55.      * @param mixed $comment
  56.      */
  57.     public function setComment($comment): void
  58.     {
  59.         $this->comment $comment;
  60.     }
  61.     /**
  62.      * @return mixed
  63.      */
  64.     public function getUser()
  65.     {
  66.         return $this->user;
  67.     }
  68.     /**
  69.      * @param mixed $user
  70.      */
  71.     public function setUser($user): void
  72.     {
  73.         $this->user $user;
  74.     }
  75.     /**
  76.      * @return mixed
  77.      */
  78.     public function getCreatedAt()
  79.     {
  80.         return $this->createdAt;
  81.     }
  82.     /**
  83.      * @param mixed $createdAt
  84.      */
  85.     public function setCreatedAt($createdAt): void
  86.     {
  87.         $this->createdAt $createdAt;
  88.     }
  89. }