src/Entity/ReseauSociaux/PostLike.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity\ReseauSociaux;
  3. use App\Entity\Company;
  4. use App\Entity\User;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use App\Entity\ReseauSociaux\Publication;
  7. use Symfony\Component\Serializer\Annotation\Groups;
  8. use App\Repository\ReseauSociaux\PostLikeRepository;
  9. /**
  10.  * @ORM\Entity(repositoryClass=PostLikeRepository::class)
  11.  */
  12. class PostLike
  13. {
  14.     /**
  15.      * @ORM\Id
  16.      * @ORM\GeneratedValue
  17.      * @ORM\Column(type="integer")
  18.      * @Groups("notif:read")
  19.      */
  20.     private $id;
  21.     /**
  22.      * @ORM\ManyToOne(targetEntity=Publication::class, inversedBy="likes")
  23.      * @Groups("notif:read")
  24.      */
  25.     private $publication;
  26.     /**
  27.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="likes")
  28.      * @Groups("notif:read")
  29.      */
  30.     private $user;
  31.     /**
  32.      * @ORM\ManyToOne(targetEntity=Company::class, inversedBy="likes")
  33.      * @Groups("notif:read")
  34.      */
  35.     private $company;
  36.     public function getId(): ?int
  37.     {
  38.         return $this->id;
  39.     }
  40.     public function getPublication(): ?Publication
  41.     {
  42.         return $this->publication;
  43.     }
  44.     public function setPublication(?Publication $publication): self
  45.     {
  46.         $this->publication $publication;
  47.         return $this;
  48.     }
  49.     public function getUser(): ?User
  50.     {
  51.         return $this->user;
  52.     }
  53.     public function setUser(?User $user): self
  54.     {
  55.         $this->user $user;
  56.         return $this;
  57.     }
  58.     public function getCompany(): ?Company
  59.     {
  60.         return $this->company;
  61.     }
  62.     public function setCompany(?Company $company): self
  63.     {
  64.         $this->company $company;
  65.         return $this;
  66.     }
  67. }