<?php
namespace App\Entity;
use App\Entity\Traits\EntityTrait;
use App\Repository\DocumentRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\HttpFoundation\File\File;
use Vich\UploaderBundle\Mapping\Annotation as Vich;
/**
* @ORM\Entity(repositoryClass=DocumentRepository::class)
*/
class Document
{
use EntityTrait{
EntityTrait::__construct as private __entityConstruct;
}
/**
* @ORM\Column(type="string", length=255)
*/
private $name;
/**
* @ORM\ManyToOne(targetEntity=Folder::class, inversedBy="documents")
*/
private $folder;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @var string
*/
private $document;
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getFolder(): ?Folder
{
return $this->folder;
}
public function setFolder(?Folder $folder): self
{
$this->folder = $folder;
return $this;
}
/**
* @return string|null
*/
public function getDocument(): ?string
{
return $this->document;
}
/**
* @param string $document
* @return $this
*/
public function setDocument(string $document): self
{
$this->document = $document;
return $this;
}
}