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", indexes={@ORM\Index(name="car_id", columns={"car_id"})})
  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.      * @var \Cars
  40.      *
  41.      * @ORM\ManyToOne(targetEntity="Cars")
  42.      * @ORM\JoinColumns({
  43.      *   @ORM\JoinColumn(name="car_id", referencedColumnName="id")
  44.      * })
  45.      */
  46.     private $car;
  47.     public function __construct()
  48.     {
  49.         $this->created = new \DateTime();
  50.     }
  51.     public function getId(): ?int
  52.     {
  53.         return $this->id;
  54.     }
  55.     public function getFilepath(): ?string
  56.     {
  57.         return $this->filepath;
  58.     }
  59.     public function setFilepath(string $filepath): self
  60.     {
  61.         $this->filepath = $filepath;
  62.         return $this;
  63.     }
  64.     public function getType(): ?string
  65.     {
  66.         return $this->type;
  67.     }
  68.     public function setType(?string $type): self
  69.     {
  70.         $this->type = $type;
  71.         return $this;
  72.     }
  73.     public function getCreated(): ?\DateTimeInterface
  74.     {
  75.         return $this->created;
  76.     }
  77.     public function setCreated(\DateTimeInterface $created): self
  78.     {
  79.         $this->created = $created;
  80.         return $this;
  81.     }
  82.     public function getCar(): ?Cars
  83.     {
  84.         return $this->car;
  85.     }
  86.     public function setCar(?Cars $car): self
  87.     {
  88.         $this->car = $car;
  89.         return $this;
  90.     }
  91.     public function __toString()
  92.     {
  93.         return $this->filepath;
  94.     }
  95. }