<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: 'App\Repository\DocumentRepository')]
class Document
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'string', length: 64, nullable: true)]
private $title;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $description;
#[ORM\Column(type: 'text')]
private $fileName;
#[ORM\Column(type: 'integer', nullable: true)]
private $fileSize;
#[ORM\Column(type: 'datetime', nullable: true)]
private $createdAt;
#[ORM\ManyToOne(targetEntity: 'App\Entity\Office', inversedBy: 'documents')]
private $office;
#[ORM\ManyToOne(targetEntity: 'App\Entity\Company', inversedBy: 'documents')]
private $company;
#[ORM\Column(type: 'string', length: 64, nullable: true)]
private $fileType;
#[ORM\ManyToOne(targetEntity: 'App\Entity\User', inversedBy: 'documents')]
private $user;
public function getId(): ?int
{
return $this->id;
}
public function getTitle(): ?string
{
return $this->title;
}
public function setTitle(?string $title): self
{
$this->title = $title;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
public function getFileName(): ?string
{
return $this->fileName;
}
public function setFileName(string $fileName): self
{
$this->fileName = $fileName;
return $this;
}
public function getFileSize(): ?int
{
return $this->fileSize;
}
public function setFileSize(?int $fileSize): self
{
$this->fileSize = $fileSize;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(?\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getOffice(): ?Office
{
return $this->office;
}
public function setOffice(?Office $office): self
{
$this->office = $office;
return $this;
}
public function getCompany(): ?Company
{
return $this->company;
}
public function setCompany(?Company $company): self
{
$this->company = $company;
return $this;
}
public function getFileType(): ?string
{
return $this->fileType;
}
public function setFileType(?string $fileType): self
{
$this->fileType = $fileType;
return $this;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): self
{
$this->user = $user;
return $this;
}
}