<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* PdfFiles
*
* @ORM\Table(name="pdf_files")
* @ORM\Entity
*/
class PdfFiles
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="filepath", type="string", length=250, nullable=false)
*/
private $filepath;
/**
* @var string|null
*
* @ORM\Column(name="type", type="string", length=250, nullable=true)
*/
private $type;
/**
* @var \DateTime
*
* @ORM\Column(name="created", type="datetime", nullable=false)
*/
private $created;
/**
* @ORM\ManyToOne(targetEntity=Contracts::class, inversedBy="files")
*/
private $contracts;
public function __construct()
{
$this->created = new \DateTime();
}
public function getId(): ?int
{
return $this->id;
}
public function getFilepath(): ?string
{
return $this->filepath;
}
public function setFilepath(string $filepath): self
{
$this->filepath = $filepath;
return $this;
}
public function getType(): ?string
{
return $this->type;
}
public function setType(?string $type): self
{
$this->type = $type;
return $this;
}
public function getCreated(): ?\DateTimeInterface
{
return $this->created;
}
public function setCreated(\DateTimeInterface $created): self
{
$this->created = $created;
return $this;
}
public function __toString(){
return $this->filepath;
}
public function getContracts(): ?Contracts
{
return $this->contracts;
}
public function setContracts(?Contracts $contracts): self
{
$this->contracts = $contracts;
return $this;
}
}