src/Entity/Media/MediaFollowers.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Media;
  3. use App\Entity\BaseEntity;
  4. use App\Entity\User;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity(repositoryClass="App\Repository\Media\MediaFollowersRepository")
  8.  * @ORM\HasLifecycleCallbacks()
  9.  * Liste des suiveurs/suiveuses
  10.  */
  11. class MediaFollowers extends BaseEntity
  12. {
  13.     /**
  14.      * @ORM\ManyToOne(targetEntity="App\Entity\User")
  15.      */
  16.     private $user;
  17.     /**
  18.      * @ORM\ManyToOne(targetEntity="App\Entity\Media\Media")
  19.      * @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
  20.      */
  21.     private $media;
  22.     public function getId(): ?int
  23.     {
  24.         return $this->id;
  25.     }
  26.     public function getUser(): ?User
  27.     {
  28.         return $this->user;
  29.     }
  30.     public function setUser(?User $user): self
  31.     {
  32.         $this->user $user;
  33.         return $this;
  34.     }
  35.     public function getMedia(): ?Media
  36.     {
  37.         return $this->media;
  38.     }
  39.     public function setMedia(?Media $media): self
  40.     {
  41.         $this->media $media;
  42.         return $this;
  43.     }
  44. }