<?php
namespace Boab\CmsBundle\Entity;
use Boab\CmsBundle\Repository\MediaRepository;
use Boab\CmsBundle\Entity\Content;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=MediaRepository::class)
*/
class Media implements MediaInterface
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $title;
/**
* @ORM\Column(type="string", length=150)
*/
private $mimeType;
/**
* @ORM\Column(type="string", length=100)
*/
private $fileName;
/**
* @ORM\Column(type="datetime")
*/
private $createdAt;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $updatedAt;
/**
* @ORM\ManyToOne(targetEntity=Content::class, inversedBy="medias")
*/
private $content;
public function getId(): ?int
{
return $this->id;
}
public function getTitle(): ?string
{
return $this->title;
}
public function setTitle(string $title): self
{
$this->title = $title;
return $this;
}
public function getMimeType(): ?string
{
return $this->mimeType;
}
public function setMimeType(string $mimeType): self
{
$this->mimeType = $mimeType;
return $this;
}
public function getFileName(): ?string
{
return $this->fileName;
}
public function setFileName(string $fileName): self
{
$this->fileName = $fileName;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getUpdatedAt(): ?\DateTimeInterface
{
return $this->updatedAt;
}
public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
{
$this->updatedAt = $updatedAt;
return $this;
}
public function getContent(): ?Content
{
return $this->content;
}
public function setContent(?Content $content): self
{
$this->content = $content;
return $this;
}
}