<?php
namespace App\Entity\ReseauSociaux;
use App\Repository\ReseauSociaux\PostphotoRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
/**
* @ORM\Entity(repositoryClass=PostphotoRepository::class)
*/
class Postphoto
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @Groups("post:read")
* @Groups("publication:read")
*/
private $id;
/**
* @ORM\Column(type="string", length=200)
* @Groups("post:read")
* @Groups("publication:read")
*/
private $photofile;
/**
* @ORM\ManyToOne(targetEntity=Publication::class, inversedBy="postphotos")
* @ORM\JoinColumn(nullable=false)
*/
private $publication;
public function getId(): ?int
{
return $this->id;
}
public function getPhotofile(): ?string
{
return $this->photofile;
}
public function setPhotofile(string $photofile): self
{
$this->photofile = $photofile;
return $this;
}
public function getPublication(): ?Publication
{
return $this->publication;
}
public function setPublication(?Publication $publication): self
{
$this->publication = $publication;
return $this;
}
}