src/Entity/ReseauSociaux/SharePost.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity\ReseauSociaux;
  3. use App\Entity\User;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Serializer\Annotation\Groups;
  6. use App\Repository\ReseauSociaux\SharePostRepository;
  7. /**
  8.  * @ORM\Entity(repositoryClass=SharePostRepository::class)
  9.  */
  10. class SharePost
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\ManyToOne(targetEntity=Publication::class, inversedBy="share")
  20.      */
  21.     private $post;
  22.     /**
  23.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="share")
  24.      */
  25.     private $author;
  26.     public function getId(): ?int
  27.     {
  28.         return $this->id;
  29.     }
  30.     public function getPost(): ?Publication
  31.     {
  32.         return $this->post;
  33.     }
  34.     public function setPost(?Publication $post): self
  35.     {
  36.         $this->post $post;
  37.         return $this;
  38.     }
  39.     public function getAuthor(): ?User
  40.     {
  41.         return $this->author;
  42.     }
  43.     public function setAuthor(?User $author): self
  44.     {
  45.         $this->author $author;
  46.         return $this;
  47.     }
  48. }