src/Entity/Forum/PostLike.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Forum;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use App\Traits\CreatedUpdatedTrait;
  5. use Gedmo\Mapping\Annotation as Gedmo;
  6. use JMS\Serializer\Annotation\Exclude;
  7. /**
  8.  * @ORM\Table(name="v_forum_post_like")
  9.  * @ORM\Entity
  10.  * @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=false)
  11.  */
  12. class PostLike
  13. {
  14.     /**
  15.      * @ORM\Id()
  16.      * @ORM\GeneratedValue()
  17.      * @ORM\Column(type="integer")
  18.      */
  19.     private $id;
  20.     /**
  21.      * @ORM\ManyToOne(targetEntity="App\Entity\Forum\Post")
  22.      * @Exclude
  23.      */
  24.     private $post;
  25.     /**
  26.      * @ORM\ManyToOne(targetEntity="App\Entity\User")
  27.      * @Exclude
  28.      */
  29.     private $user;
  30.     /**
  31.      * @ORM\Column(name="deleted_at", type="datetime", nullable=true)
  32.      */
  33.     private $deletedAt;
  34.     use CreatedUpdatedTrait;
  35.     public function getId(): ?int
  36.     {
  37.         return $this->id;
  38.     }
  39.     /**
  40.      * @return mixed
  41.      */
  42.     public function getPost()
  43.     {
  44.         return $this->post;
  45.     }
  46.     /**
  47.      * @param mixed $post
  48.      */
  49.     public function setPost($post): void
  50.     {
  51.         $this->post $post;
  52.     }
  53.     /**
  54.      * @return mixed
  55.      */
  56.     public function getUser()
  57.     {
  58.         return $this->user;
  59.     }
  60.     /**
  61.      * @param mixed $user
  62.      */
  63.     public function setUser($user): void
  64.     {
  65.         $this->user $user;
  66.     }
  67.     /**
  68.      * @return mixed
  69.      */
  70.     public function getDeletedAt()
  71.     {
  72.         return $this->deletedAt;
  73.     }
  74.     /**
  75.      * @param mixed $deletedAt
  76.      */
  77.     public function setDeletedAt($deletedAt): void
  78.     {
  79.         $this->deletedAt $deletedAt;
  80.     }
  81. }