<?php
namespace App\Entity;
use App\Entity\Media\Media;
use App\Entity\Program\Program;
use App\Repository\ShortcutRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=ShortcutRepository::class)
* @ORM\HasLifecycleCallbacks()
*/
class Shortcut extends BaseEntity
{
/**
* @ORM\ManyToOne(targetEntity=User::class, inversedBy="shortcuts")
*/
private $user;
/**
* @ORM\ManyToOne(targetEntity=Media::class, inversedBy="shortcuts")
* @ORM\JoinColumn(nullable=true, onDelete="CASCADE")
*/
private $media;
/**
* @ORM\ManyToOne(targetEntity=Program::class, inversedBy="shortcuts")
* @ORM\JoinColumn(nullable=true, onDelete="CASCADE")
*/
private $program;
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
public function getMedia(): ?Media
{
return $this->media;
}
public function setMedia(?Media $media): self
{
$this->media = $media;
return $this;
}
public function getProgram(): ?Program
{
return $this->program;
}
public function setProgram(?Program $program): self
{
$this->program = $program;
return $this;
}
}