src/Entity/OfferFile.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * @ORM\Entity(repositoryClass="App\Repository\OfferFileRepository")
  6.  */
  7. class OfferFile implements FileInterface
  8. {
  9.     /**
  10.      * @ORM\Id()
  11.      * @ORM\GeneratedValue()
  12.      * @ORM\Column(type="integer")
  13.      */
  14.     private $id;
  15.     /**
  16.      * @ORM\Column(type="string", length=128)
  17.      */
  18.     private $originalFileName;
  19.     /**
  20.      * @ORM\Column(type="string", length=255)
  21.      */
  22.     private $filePath;
  23.     /**
  24.      * @ORM\Column(type="string", length=16)
  25.      */
  26.     private $fileType;
  27.     /**
  28.      * @ORM\Column(type="string", length=255)
  29.      */
  30.     private $mimeType;
  31.     /**
  32.      * @ORM\ManyToOne(targetEntity="App\Entity\Offer", inversedBy="offerFiles")
  33.      * @ORM\JoinColumn(nullable=false)
  34.      */
  35.     private $offer;
  36.     /**
  37.      * @ORM\Column(type="string", length=255, nullable=true)
  38.      */
  39.     private $kind;
  40.     /**
  41.      * @ORM\Column(type="integer", nullable=true)
  42.      */
  43.     protected $width;
  44.     /**
  45.      * @ORM\Column(type="integer", nullable=true)
  46.      */
  47.     protected $height;
  48.     /**
  49.      * @ORM\Column(type="string", length=1024, nullable=true)
  50.      */
  51.     protected $url null;
  52.     /**
  53.      * @ORM\Column(type="datetime", nullable=true)
  54.      */
  55.     protected $urlValidityDate null;
  56.     /**
  57.      * @ORM\Column(type="boolean", options={"default" : false})
  58.      */
  59.     protected $sentToGoogleStorage null;
  60.     const OFFER_FILE_KIND_INVOICE "invoice";
  61.     public function getId(): ?int
  62.     {
  63.         return $this->id;
  64.     }
  65.     public function getOriginalFileName(): ?string
  66.     {
  67.         return $this->originalFileName;
  68.     }
  69.     public function setOriginalFileName(string $originalFileName): self
  70.     {
  71.         $this->originalFileName $originalFileName;
  72.         return $this;
  73.     }
  74.     public function getFilePath(): ?string
  75.     {
  76.         return $this->filePath;
  77.     }
  78.     public function setFilePath(string $filePath): self
  79.     {
  80.         $this->filePath $filePath;
  81.         return $this;
  82.     }
  83.     public function getFileType(): ?string
  84.     {
  85.         return $this->fileType;
  86.     }
  87.     public function setFileType(string $fileType): self
  88.     {
  89.         $this->fileType $fileType;
  90.         return $this;
  91.     }
  92.     public function getMimeType(): ?string
  93.     {
  94.         return $this->mimeType;
  95.     }
  96.     public function setMimeType(string $mimeType): self
  97.     {
  98.         $this->mimeType $mimeType;
  99.         return $this;
  100.     }
  101.     public function getOffer(): ?Offer
  102.     {
  103.         return $this->offer;
  104.     }
  105.     public function setOffer(?Offer $offer): self
  106.     {
  107.         $this->offer $offer;
  108.         return $this;
  109.     }
  110.     public function getKind()
  111.     {
  112.         return $this->kind;
  113.     }
  114.     public function setKind($kind): void
  115.     {
  116.         $this->kind $kind;
  117.     }
  118.     /** @return mixed */
  119.     public function getWidth()
  120.     {
  121.         return $this->width;
  122.     }
  123.     /** @return mixed */
  124.     public function getHeight()
  125.     {
  126.         return $this->height;
  127.     }
  128.     /** @param mixed $width */
  129.     public function setWidth($width): void
  130.     {
  131.         $this->width $width;
  132.     }
  133.     /** @param mixed $height */
  134.     public function setHeight($height): void
  135.     {
  136.         $this->height $height;
  137.     }
  138.     public function getUrl()
  139.     {
  140.         return $this->url;
  141.     }
  142.     public function getUrlValidityDate()
  143.     {
  144.         return $this->urlValidityDate;
  145.     }
  146.     public function setUrl($url): void
  147.     {
  148.         $this->url $url;
  149.     }
  150.     public function setUrlValidityDate($urlValidityDate): void
  151.     {
  152.         $this->urlValidityDate $urlValidityDate;
  153.     }
  154.     public function setSentToGoogleStorage($sentToGoogleStorage): void
  155.     {
  156.         $this->sentToGoogleStorage $sentToGoogleStorage;
  157.     }
  158.     public function getSentToGoogleStorage()
  159.     {
  160.         return $this->sentToGoogleStorage;
  161.     }
  162. }