src/Entity/Media.php line 11

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\MediaRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\HttpFoundation\File\File;
  6. use Symfony\Component\Serializer\Annotation\Groups;
  7. #[ORM\Entity(repositoryClassMediaRepository::class)]
  8. class Media
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     #[Groups(['read:course:collection'])]
  14.     private ?int $id null;
  15.     #[ORM\Column(length255nullabletrue)]
  16.     #[Groups(['read:course:collection'])]
  17.     private ?string $videoUrl null;
  18.     #[ORM\Column(length255nullabletrue)]
  19.     #[Groups(['read:course:collection'])]
  20.     private ?string $mp4File null;
  21.     #[ORM\Column(length255nullabletrue)]
  22.     #[Groups(['read:course:collection'])]
  23.     private ?string $webMFile null;
  24.     #[ORM\Column(length255nullabletrue)]
  25.     #[Groups(['read:course:collection'])]
  26.     private ?string $oggFile null;
  27.     #[ORM\Column(length255)]
  28.     #[Groups(['read:course:collection'])]
  29.     private ?string $imageFile null;
  30.     
  31.     #[ORM\OneToOne(inversedBy'media'cascade: ['persist''remove'])]
  32.     #[ORM\JoinColumn(nullablefalse)]
  33.     private ?Cours $cours null;
  34.     /**
  35.      * @var File
  36.      */
  37.     public $mp4FileUpload;
  38.     /**
  39.      * @var File
  40.      */
  41.     public $imageFileUpload;
  42.     /**
  43.      * @var File
  44.      */
  45.     public $oggFileUpload;
  46.     /**
  47.      * @var File
  48.      */
  49.     public $webMFileUpload;
  50.     public function getId(): ?int
  51.     {
  52.         return $this->id;
  53.     }
  54.     public function getVideoUrl(): ?string
  55.     {
  56.         return $this->videoUrl;
  57.     }
  58.     public function setVideoUrl(?string $videoUrl): self
  59.     {
  60.         $this->videoUrl $videoUrl;
  61.         return $this;
  62.     }
  63.     public function getMp4File(): ?string
  64.     {
  65.         return $this->mp4File;
  66.     }
  67.     public function setMp4File(?string $mp4File): self
  68.     {
  69.         $this->mp4File $mp4File;
  70.         return $this;
  71.     }
  72.     public function getWebMFile(): ?string
  73.     {
  74.         return $this->webMFile;
  75.     }
  76.     public function setWebMFile(?string $webMFile): self
  77.     {
  78.         $this->webMFile $webMFile;
  79.         return $this;
  80.     }
  81.     public function getOggFile(): ?string
  82.     {
  83.         return $this->oggFile;
  84.     }
  85.     public function setOggFile(?string $oggFile): self
  86.     {
  87.         $this->oggFile $oggFile;
  88.         return $this;
  89.     }
  90.     public function getImageFile(): ?string
  91.     {
  92.         return $this->imageFile;
  93.     }
  94.     public function setImageFile(string $imageFile): self
  95.     {
  96.         $this->imageFile $imageFile;
  97.         return $this;
  98.     }
  99.     public function getCours(): ?Cours
  100.     {
  101.         return $this->cours;
  102.     }
  103.     public function setCours(Cours $cours): self
  104.     {
  105.         $this->cours $cours;
  106.         return $this;
  107.     }
  108. }