src/Entity/Media/MediaTeam.php line 13

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\MediaTeamRepository")
  8.  * @ORM\HasLifecycleCallbacks()
  9.  */
  10. class MediaTeam extends BaseEntity
  11. {
  12.     /**
  13.      * @ORM\Column(type="string", length=255, nullable=false)
  14.      */
  15.     private $role;
  16.     /**
  17.      * @ORM\ManyToOne(targetEntity="App\Entity\Media\Media",inversedBy="teams")
  18.      * @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
  19.      */
  20.     private $media;
  21.     /**
  22.      * @ORM\ManyToOne(targetEntity="App\Entity\User",inversedBy="mediaTeams")
  23.      * @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
  24.      */
  25.     private $user;
  26.     public function getId(): ?int
  27.     {
  28.         return $this->id;
  29.     }
  30.     public function getRole(): ?string
  31.     {
  32.         return $this->role;
  33.     }
  34.     public function setRole(?string $role): self
  35.     {
  36.         $this->role $role;
  37.         return $this;
  38.     }
  39.     public function getMedia(): ?Media
  40.     {
  41.         return $this->media;
  42.     }
  43.     public function setMedia(?Media $media): self
  44.     {
  45.         $this->media $media;
  46.         return $this;
  47.     }
  48.     public function getUser(): ?User
  49.     {
  50.         return $this->user;
  51.     }
  52.     public function setUser(?User $user): self
  53.     {
  54.         $this->user $user;
  55.         return $this;
  56.     }
  57. }