src/Entity/Document.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Traits\EntityTrait;
  4. use App\Repository\DocumentRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Component\HttpFoundation\File\File;
  7. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  8. /**
  9.  * @ORM\Entity(repositoryClass=DocumentRepository::class)
  10.  */
  11. class Document
  12. {
  13.     use EntityTrait{
  14.         EntityTrait::__construct as private __entityConstruct;
  15.     }
  16.     /**
  17.      * @ORM\Column(type="string", length=255)
  18.      */
  19.     private $name;
  20.     /**
  21.      * @ORM\ManyToOne(targetEntity=Folder::class, inversedBy="documents")
  22.      */
  23.     private $folder;
  24.     /**
  25.      * @ORM\Column(type="string", length=255, nullable=true)
  26.      * @var string
  27.      */
  28.     private $document;
  29.     public function getName(): ?string
  30.     {
  31.         return $this->name;
  32.     }
  33.     public function setName(string $name): self
  34.     {
  35.         $this->name $name;
  36.         return $this;
  37.     }
  38.     public function getFolder(): ?Folder
  39.     {
  40.         return $this->folder;
  41.     }
  42.     public function setFolder(?Folder $folder): self
  43.     {
  44.         $this->folder $folder;
  45.         return $this;
  46.     }
  47.     /**
  48.      * @return string|null
  49.      */
  50.     public function getDocument(): ?string
  51.     {
  52.         return $this->document;
  53.     }
  54.     /**
  55.      * @param string $document
  56.      * @return $this
  57.      */
  58.     public function setDocument(string $document): self
  59.     {
  60.         $this->document $document;
  61.         return $this;
  62.     }
  63. }