<?php
namespace App\Entity;
use App\Repository\FileRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=FileRepository::class)
*/
class File
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="datetime")
*/
private $createdAt;
/**
* @ORM\Column(type="enum", nullable=true, options={"values"="file_enum"})
*/
private $type;
/**
* @ORM\Column(type="text")
*/
private $path;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $originalHash;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $compressedHash;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $originalFileName;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $reuploadsCount;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $size;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $uploadMinutes;
public function __construct()
{
$this->createdAt = new \DateTime();
}
public function getId(): ?int
{
return $this->id;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getType()
{
return $this->type;
}
public function setType($type): self
{
$this->type = $type;
return $this;
}
public function getPath(): ?string
{
return $this->path;
}
public function getFileName(): ?string
{
return basename($this->path);
}
public function setPath(string $path): self
{
$this->path = $path;
return $this;
}
public function getOriginalHash(): ?string
{
return $this->originalHash;
}
public function setOriginalHash(?string $originalHash): self
{
$this->originalHash = $originalHash;
return $this;
}
public function getCompressedHash(): ?string
{
return $this->compressedHash;
}
public function setCompressedHash(?string $compressedHash): self
{
$this->compressedHash = $compressedHash;
return $this;
}
public function getOriginalFileName(): ?string
{
return $this->originalFileName;
}
public function setOriginalFileName(?string $originalFileName): self
{
$this->originalFileName = $originalFileName;
return $this;
}
public function getReuploadsCount(): ?int
{
return $this->reuploadsCount;
}
public function setReuploadsCount(?int $reuploadsCount): self
{
$this->reuploadsCount = $reuploadsCount;
return $this;
}
public function getSize(): ?int
{
return $this->size;
}
public function setSize(?int $size): self
{
$this->size = $size;
return $this;
}
public function getUploadMinutes(): ?int
{
return $this->uploadMinutes;
}
public function setUploadMinutes(?int $uploadMinutes): self
{
$this->uploadMinutes = $uploadMinutes;
return $this;
}
}