<?php

namespace App\Entity;

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

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

    #[ORM\ManyToOne(inversedBy: 'membersCosplans')]
    private ?Members $member = null;

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

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

    #[ORM\Column(type: Types::TEXT, nullable: true)]
    private ?string $description = null;

    #[Vich\UploadableField(mapping: 'members_page_avatar',fileNameProperty: 'cosplanFileName', size: 'cosplanSize', mimeType: 'cosplanMineType', originalName: 'cosplanOriginalName',dimensions: 'cosplanDimensions')]
    private ?File $cosplan = null;

    #[ORM\Column(nullable: true)]
    private ?string $cosplanFileName = null;
    #[ORM\Column(nullable: true)]
    private ?array $cosplanDimensions = [];
    #[ORM\Column(length: 255,nullable: true)]
    private ?string $cosplanSize = null;
    #[ORM\Column(length: 255,nullable: true)]
    private ?string $cosplanMineType = null;
    #[ORM\Column(length: 255,nullable: true)]
    private ?string $cosplanOriginalName = null;
    #[ORM\Column(nullable: true)]
    private ?\DateTimeImmutable $updateAt;

    #[ORM\Column]
    private ?bool $isApproved = null;

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

    public function getMember(): ?Members
    {
        return $this->member;
    }

    public function setMember(?Members $member): static
    {
        $this->member = $member;

        return $this;
    }

    public function getPersonnage(): ?string
    {
        return $this->personnage;
    }

    public function setPersonnage(string $personnage): static
    {
        $this->personnage = $personnage;

        return $this;
    }

    public function getUnivers(): ?string
    {
        return $this->univers;
    }

    public function setUnivers(string $univers): static
    {
        $this->univers = $univers;

        return $this;
    }

    public function getDescription(): ?string
    {
        return $this->description;
    }

    public function setDescription(?string $description): static
    {
        $this->description = $description;

        return $this;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    public function isApproved(): ?bool
    {
        return $this->isApproved;
    }

    public function setIsApproved(bool $isApproved): static
    {
        $this->isApproved = $isApproved;

        return $this;
    }
}
