<?php
namespace App\Entity;
use App\Repository\DocsPotentialsRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\HttpFoundation\File\File;
use Vich\UploaderBundle\Mapping\Annotation as Vich;
#[ORM\Entity(repositoryClass: DocsPotentialsRepository::class)]
#[Vich\Uploadable]
class DocsPotentials
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $docName = null;
#[Vich\UploadableField(mapping: 'potential_docs', fileNameProperty: 'docName')]
private ?File $docFile = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $docCategory = null;
#[ORM\Column(nullable: true)]
private ?\DateTimeImmutable $createdAt = null;
#[ORM\ManyToOne(inversedBy: 'docsPotentials')]
private ?User $uploadedBy = null;
#[ORM\ManyToOne(inversedBy: 'docsPotentials')]
private ?PotentialClients $potential = null;
public function getId(): ?int
{
return $this->id;
}
public function getDocName(): ?string
{
return $this->docName;
}
public function setDocName(?string $docName): self
{
$this->docName = $docName;
return $this;
}
public function getPotential(): ?PotentialClients
{
return $this->potential;
}
public function setPotential(?PotentialClients $potential): self
{
$this->potential = $potential;
return $this;
}
public function getDocCategory(): ?string
{
return $this->docCategory;
}
public function setDocCategory(?string $docCategory): self
{
$this->docCategory = $docCategory;
return $this;
}
public function getCreatedAt(): ?\DateTimeImmutable
{
return $this->createdAt;
}
public function setCreatedAt(?\DateTimeImmutable $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function getUploadedBy(): ?User
{
return $this->uploadedBy;
}
public function setUploadedBy(?User $uploadedBy): self
{
$this->uploadedBy = $uploadedBy;
return $this;
}
public function getDocFile(): ?File
{
return $this->docFile;
}
public function setDocFile(?File $docFile): void
{
$this->docFile = $docFile;
if (null !== $docFile) {
$this->createdAt = new \DateTimeImmutable();
}
}
}