src/Entity/PdfFiles.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * PdfFiles
  6. *
  7. * @ORM\Table(name="pdf_files")
  8. * @ORM\Entity
  9. */
  10. class PdfFiles
  11. {
  12. /**
  13. * @var int
  14. *
  15. * @ORM\Column(name="id", type="integer", nullable=false)
  16. * @ORM\Id
  17. * @ORM\GeneratedValue(strategy="IDENTITY")
  18. */
  19. private $id;
  20. /**
  21. * @var string
  22. *
  23. * @ORM\Column(name="filepath", type="string", length=250, nullable=false)
  24. */
  25. private $filepath;
  26. /**
  27. * @var string|null
  28. *
  29. * @ORM\Column(name="type", type="string", length=250, nullable=true)
  30. */
  31. private $type;
  32. /**
  33. * @var \DateTime
  34. *
  35. * @ORM\Column(name="created", type="datetime", nullable=false)
  36. */
  37. private $created;
  38. /**
  39. * @ORM\ManyToOne(targetEntity=Contracts::class, inversedBy="files")
  40. */
  41. private $contracts;
  42. public function __construct()
  43. {
  44. $this->created = new \DateTime();
  45. }
  46. public function getId(): ?int
  47. {
  48. return $this->id;
  49. }
  50. public function getFilepath(): ?string
  51. {
  52. return $this->filepath;
  53. }
  54. public function setFilepath(string $filepath): self
  55. {
  56. $this->filepath = $filepath;
  57. return $this;
  58. }
  59. public function getType(): ?string
  60. {
  61. return $this->type;
  62. }
  63. public function setType(?string $type): self
  64. {
  65. $this->type = $type;
  66. return $this;
  67. }
  68. public function getCreated(): ?\DateTimeInterface
  69. {
  70. return $this->created;
  71. }
  72. public function setCreated(\DateTimeInterface $created): self
  73. {
  74. $this->created = $created;
  75. return $this;
  76. }
  77. public function __toString(){
  78. return $this->filepath;
  79. }
  80. public function getContracts(): ?Contracts
  81. {
  82. return $this->contracts;
  83. }
  84. public function setContracts(?Contracts $contracts): self
  85. {
  86. $this->contracts = $contracts;
  87. return $this;
  88. }
  89. }