src/Entity/CarSaleDocument.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * @ORM\Entity()
  6.  */
  7. class CarSaleDocument
  8. {
  9.     /**
  10.      * @ORM\Id
  11.      * @ORM\GeneratedValue
  12.      * @ORM\Column(type="integer")
  13.      */
  14.     private $id;
  15.     /**
  16.      * @ORM\ManyToOne(targetEntity=CarSale::class, inversedBy="documents")
  17.      * @ORM\JoinColumn(name="car_sale_id", referencedColumnName="id", nullable=false, onDelete="CASCADE")
  18.      */
  19.     private $carSale;
  20.     /**
  21.      * @ORM\Column(type="string", length=100)
  22.      */
  23.     private $type;
  24.     /**
  25.      * @ORM\Column(type="string", length=255)
  26.      */
  27.     private $fileName;
  28.     /**
  29.      * @ORM\Column(type="string", length=500)
  30.      */
  31.     private $filePath;
  32.     /**
  33.      * @ORM\Column(type="string", length=100, nullable=true, options={"default":"application/pdf"})
  34.      */
  35.     private $mimeType 'application/pdf';
  36.     /**
  37.      * @ORM\Column(type="bigint", nullable=true)
  38.      */
  39.     private $sizeBytes;
  40.     /**
  41.      * @ORM\Column(type="string", length=64, nullable=true)
  42.      */
  43.     private $sha256;
  44.     /**
  45.      * @ORM\Column(type="string", length=10, options={"default":"ACTIVE"})
  46.      */
  47.     private $status 'ACTIVE';
  48.     /**
  49.      * @ORM\Column(type="integer", options={"default":1})
  50.      */
  51.     private $version 1;
  52.     /**
  53.      * @ORM\Column(type="datetime")
  54.      */
  55.     private $uploadedAt;
  56.     public function __construct()
  57.     {
  58.         $this->uploadedAt = new \DateTimeImmutable();
  59.     }
  60.     // -------- Getters/Setters --------
  61.     public function getId(): ?int { return $this->id; }
  62.     public function getCarSale(): ?CarSale { return $this->carSale; }
  63.     public function setCarSale(?CarSale $carSale): self $this->carSale $carSale; return $this; }
  64.     public function getType(): ?string { return $this->type; }
  65.     public function setType(string $type): self $this->type $type; return $this; }
  66.     public function getFileName(): ?string { return $this->fileName; }
  67.     public function setFileName(string $fileName): self $this->fileName $fileName; return $this; }
  68.     public function getFilePath(): ?string { return $this->filePath; }
  69.     public function setFilePath(string $filePath): self $this->filePath $filePath; return $this; }
  70.     public function getMimeType(): ?string { return $this->mimeType; }
  71.     public function setMimeType(?string $mimeType): self $this->mimeType $mimeType; return $this; }
  72.     public function getSizeBytes(): ?int { return $this->sizeBytes; }
  73.     public function setSizeBytes(?int $sizeBytes): self $this->sizeBytes $sizeBytes; return $this; }
  74.     public function getSha256(): ?string { return $this->sha256; }
  75.     public function setSha256(?string $sha256): self $this->sha256 $sha256; return $this; }
  76.     public function getStatus(): string { return $this->status; }
  77.     public function setStatus(string $status): self $this->status $status; return $this; }
  78.     public function getVersion(): int { return $this->version; }
  79.     public function setVersion(int $version): self $this->version $version; return $this; }
  80.     public function getUploadedAt(): \DateTimeInterface { return $this->uploadedAt; }
  81.     public function setUploadedAt(\DateTimeInterface $uploadedAt): self $this->uploadedAt $uploadedAt; return $this; }
  82. }