<?php

namespace App\Entity;

use App\Repository\AnonymeDownloaderRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;

#[ORM\Entity(repositoryClass: AnonymeDownloaderRepository::class)]
class AnonymeDownloader
{
    #[ORM\Id]
    #[ORM\GeneratedValue]
    #[ORM\Column]
    private ?int $id = null;

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

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

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

    #[ORM\Column]
    private ?\DateTime $dateAdd = null;

    #[ORM\Column(nullable: true)]
    private ?\DateTime $dateDelete = null;

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

    #[ORM\Column(nullable: true)]
    private ?float $sizeFile = null;



    public function __construct()
    {
        $date = new \DateTime();
        $this->setDateAdd($date);
    }

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

    public function getName(): ?string
    {
        return $this->name;
    }

    public function setName(string $name): static
    {
        $this->name = $name;

        return $this;
    }

    public function getUrl(): ?string
    {
        return $this->url;
    }

    public function setUrl(string $url): static
    {
        $this->url = $url;

        return $this;
    }

    public function getDateAdd(): ?\DateTime
    {
        return $this->dateAdd;
    }

    public function setDateAdd(\DateTime $dateAdd): static
    {
        $this->dateAdd = $dateAdd;

        return $this;
    }

    public function getDateDelete(): ?\DateTime
    {
        return $this->dateDelete;
    }

    public function setDateDelete(?\DateTime $dateDelete): static
    {
        $this->dateDelete = $dateDelete;

        return $this;
    }

    public function getException(): ?string
    {
        return $this->exception;
    }

    public function setException(?string $exception): static
    {
        $this->exception = $exception;

        return $this;
    }

    public function getSizeFile(): ?float
    {
        return $this->sizeFile;
    }

    public function setSizeFile(?float $sizeFile): static
    {
        $this->sizeFile = $sizeFile;

        return $this;
    }

    public function getNameFile(): ?string
    {
        return $this->nameFile;
    }

    public function setNameFile(string $nameFile): static
    {
        $this->nameFile = $nameFile;

        return $this;
    }
}
