<?php
namespace App\Entity\ReseauSociaux;
use App\Entity\User;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
use App\Repository\ReseauSociaux\SharePostRepository;
/**
* @ORM\Entity(repositoryClass=SharePostRepository::class)
*/
class SharePost
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=Publication::class, inversedBy="share")
*/
private $post;
/**
* @ORM\ManyToOne(targetEntity=User::class, inversedBy="share")
*/
private $author;
public function getId(): ?int
{
return $this->id;
}
public function getPost(): ?Publication
{
return $this->post;
}
public function setPost(?Publication $post): self
{
$this->post = $post;
return $this;
}
public function getAuthor(): ?User
{
return $this->author;
}
public function setAuthor(?User $author): self
{
$this->author = $author;
return $this;
}
}