src/Entity/ReseauSociaux/Postphoto.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity\ReseauSociaux;
  3. use App\Repository\ReseauSociaux\PostphotoRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Serializer\Annotation\Groups;
  6. /**
  7.  * @ORM\Entity(repositoryClass=PostphotoRepository::class)
  8.  */
  9. class Postphoto
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      * @Groups("post:read")
  16.      * @Groups("publication:read")
  17.      */
  18.     private $id;
  19.     /**
  20.      * @ORM\Column(type="string", length=200)
  21.      * @Groups("post:read")
  22.      * @Groups("publication:read")
  23.      */
  24.     private $photofile;
  25.     /**
  26.      * @ORM\ManyToOne(targetEntity=Publication::class, inversedBy="postphotos")
  27.      * @ORM\JoinColumn(nullable=false)
  28.      */
  29.     private $publication;
  30.     public function getId(): ?int
  31.     {
  32.         return $this->id;
  33.     }
  34.     public function getPhotofile(): ?string
  35.     {
  36.         return $this->photofile;
  37.     }
  38.     public function setPhotofile(string $photofile): self
  39.     {
  40.         $this->photofile $photofile;
  41.         return $this;
  42.     }
  43.     public function getPublication(): ?Publication
  44.     {
  45.         return $this->publication;
  46.     }
  47.     public function setPublication(?Publication $publication): self
  48.     {
  49.         $this->publication $publication;
  50.         return $this;
  51.     }
  52. }