<?php
namespace App\Entity;
use App\Entity\Event\Event;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use App\Repository\MediaRepository;
use Gedmo\Timestampable\Traits\TimestampableEntity;
#[ORM\Entity(repositoryClass: MediaRepository::class)]
class Media
{
use TimestampableEntity;
const TYPE_HOME = "home";
const TYPE_VIGNETTE = "vignette";
const TYPE_VIGNETTE_LIST = "vignette_list";
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $file = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $title = null;
#[ORM\Column(length: 20, nullable: true)]
private ?string $extension = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $size = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $path = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $origin = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $originId = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $type = null;
#[ORM\Column(length: 20, nullable: true)]
private ?string $position = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $deletedAt = null;
#[ORM\ManyToOne(inversedBy: 'medias')]
#[ORM\JoinColumn(name: "origin_id", referencedColumnName:"id")]
private ?Event $event = null;
#[ORM\ManyToOne(inversedBy: 'medias')]
#[ORM\JoinColumn(name: "origin_id", referencedColumnName: "id")]
private ?HomeImage $homeImage = null;
public function getId(): ?int
{
return $this->id;
}
public function getFile(): ?string
{
return $this->file;
}
public function setFile(?string $file): static
{
$this->file = $file;
return $this;
}
public function getTitle(): ?string
{
return $this->title;
}
public function setTitle(?string $title): static
{
$this->title = $title;
return $this;
}
public function getExtension(): ?string
{
return $this->extension;
}
public function setExtension(?string $extension): static
{
$this->extension = $extension;
return $this;
}
public function getSize(): ?string
{
return $this->size;
}
public function setSize(?string $size): static
{
$this->size = $size;
return $this;
}
public function getPath(): ?string
{
return $this->path;
}
public function setPath(?string $path): static
{
$this->path = $path;
return $this;
}
public function getOrigin(): ?string
{
return $this->origin;
}
public function setOrigin(?string $origin): static
{
$this->origin = $origin;
return $this;
}
public function getOriginId(): ?string
{
return $this->originId;
}
public function setOriginId(?string $originId): static
{
$this->originId = $originId;
return $this;
}
public function getType(): ?string
{
return $this->type;
}
public function setType(?string $type): static
{
$this->type = $type;
return $this;
}
public function getPosition(): ?string
{
return $this->position;
}
public function setPosition(?string $position): static
{
$this->position = $position;
return $this;
}
public function getDeletedAt(): ?\DateTimeInterface
{
return $this->deletedAt;
}
public function setDeletedAt(?\DateTimeInterface $deletedAt): static
{
$this->deletedAt = $deletedAt;
return $this;
}
public function getEvent(): ?Event
{
return $this->event;
}
public function setEvent(?Event $event): static
{
$this->event = $event;
return $this;
}
public function getHomeImage(): ?HomeImage
{
return $this->homeImage;
}
public function setHomeImage(?HomeImage $homeImage): static
{
$this->homeImage = $homeImage;
return $this;
}
}