<?php

namespace App\Entity;

use App\Repository\EventRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\HttpFoundation\File\File;
use Vich\UploaderBundle\Mapping\Annotation as Vich;

#[Vich\Uploadable()]
#[ORM\Entity(repositoryClass: EventRepository::class)]
class Event
{
    #[ORM\Id]
    #[ORM\GeneratedValue]
    #[ORM\Column]
    private ?int $id = null;

    #[ORM\Column(length: 255)]
    private ?string $title = null;

    #[ORM\Column]
    private ?\DateTimeImmutable $startAt = null;

    #[ORM\Column]
    private ?\DateTimeImmutable $endAt = null;

    #[ORM\Column(length: 255)]
    private ?string $location = null;

    #[ORM\Column(length: 255)]
    private ?string $organizer = null;

    #[Vich\UploadableField(mapping: 'events',fileNameProperty: 'eventsFileName', size: 'eventsSize', mimeType: 'eventsMineType', originalName: 'eventsOriginalName',dimensions: 'eventsDimensions')]
    private ?File $affiche = null;

    #[ORM\Column(nullable: true)]
    private ?string $eventsFileName = null;
    #[ORM\Column(nullable: true)]
    private ?array $eventsDimensions = [];
    #[ORM\Column(length: 255,nullable: true)]
    private ?string $eventsSize = null;
    #[ORM\Column(length: 255,nullable: true)]
    private ?string $eventsMineType = null;
    #[ORM\Column(length: 255,nullable: true)]
    private ?string $eventsOriginalName = null;
    #[ORM\Column(nullable: true)]
    private ?\DateTimeImmutable $updateAt;

    public function getId(): ?int
    {
        return $this->id;
    }

    public function getTitle(): ?string
    {
        return $this->title;
    }

    public function setTitle(string $title): static
    {
        $this->title = $title;

        return $this;
    }

    public function getStartAt(): ?\DateTimeImmutable
    {
        return $this->startAt;
    }

    public function setStartAt(\DateTimeImmutable $startAt): static
    {
        $this->startAt = $startAt;

        return $this;
    }

    public function getEndAt(): ?\DateTimeImmutable
    {
        return $this->endAt;
    }

    public function setEndAt(\DateTimeImmutable $endAt): static
    {
        $this->endAt = $endAt;

        return $this;
    }

    public function getLocation(): ?string
    {
        return $this->location;
    }

    public function setLocation(string $location): static
    {
        $this->location = $location;

        return $this;
    }

    public function getOrganizer(): ?string
    {
        return $this->organizer;
    }

    public function setOrganizer(string $organizer): static
    {
        $this->organizer = $organizer;

        return $this;
    }

    /**
     * @return \DateTimeImmutable|null
     */
    public function getUpdateAt(): ?\DateTimeImmutable
    {
        return $this->updateAt;
    }

    /**
     * @return File|null
     */
    public function getAffiche(): ?File
    {
        return $this->affiche;
    }

    /**
     * @return array|null
     */
    public function getEventsDimensions(): ?array
    {
        return $this->eventsDimensions;
    }

    /**
     * @return string|null
     */
    public function getEventsFileName(): ?string
    {
        return $this->eventsFileName;
    }

    /**
     * @return string|null
     */
    public function getEventsMineType(): ?string
    {
        return $this->eventsMineType;
    }

    /**
     * @return string|null
     */
    public function getEventsOriginalName(): ?string
    {
        return $this->eventsOriginalName;
    }

    /**
     * @return string|null
     */
    public function getEventsSize(): ?string
    {
        return $this->eventsSize;
    }

    /**
     * @param \DateTimeImmutable|null $updateAt
     */
    public function setUpdateAt(?\DateTimeImmutable $updateAt): void
    {
        $this->updateAt = $updateAt;
    }

    /**
     * @param File|null $affiche
     */
    public function setAffiche(?File $affiche): void
    {
        $this->affiche = $affiche;
    }

    /**
     * @param array|null $eventsDimensions
     */
    public function setEventsDimensions(?array $eventsDimensions): void
    {
        $this->eventsDimensions = $eventsDimensions;
    }

    /**
     * @param string|null $eventsFileName
     */
    public function setEventsFileName(?string $eventsFileName): void
    {
        $this->eventsFileName = $eventsFileName;
    }

    /**
     * @param string|null $eventsMineType
     */
    public function setEventsMineType(?string $eventsMineType): void
    {
        $this->eventsMineType = $eventsMineType;
    }

    /**
     * @param string|null $eventsOriginalName
     */
    public function setEventsOriginalName(?string $eventsOriginalName): void
    {
        $this->eventsOriginalName = $eventsOriginalName;
    }

    /**
     * @param string|null $eventsSize
     */
    public function setEventsSize(?string $eventsSize): void
    {
        $this->eventsSize = $eventsSize;
    }
}
