src/Entity/TblFile.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Traits\TimestampableTrait;
  4. use App\Repository\TblFileRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Gedmo\Mapping\Annotation as Gedmo;
  7. /**
  8.  * @ORM\Entity(repositoryClass=TblFileRepository::class)
  9.  * @Gedmo\Loggable
  10.  */
  11. class TblFile
  12. {
  13.     /**
  14.      * @ORM\Id
  15.      * @ORM\GeneratedValue
  16.      * @ORM\Column(type="integer")
  17.      */
  18.     private $id;
  19.     /**
  20.      * @ORM\Column(type="string", length=255)
  21.      */
  22.     private $fileName;
  23.     /**
  24.      * @ORM\Column(type="string", length=255, nullable=true)
  25.      */
  26.     private $filePath;
  27.     /**
  28.      * @var string
  29.      *
  30.      * @ORM\Column(name="file_ext", type="string", length=255)
  31.      * @Gedmo\Versioned
  32.      */
  33.     private $fileExt;
  34.     /**
  35.      * @var string
  36.      *
  37.      * @ORM\Column(name="file_size", type="string", length=255, nullable=true)
  38.      * @Gedmo\Versioned
  39.      */
  40.     private $fileSize;
  41.     /**
  42.      * @var string
  43.      *
  44.      * @ORM\Column(name="origin_name", type="string", length=255)
  45.      * @Gedmo\Versioned
  46.      */
  47.     private $originName;
  48.     /**
  49.      * @ORM\OneToOne(targetEntity=TblSociete::class, mappedBy="logo", cascade={"persist", "remove"})
  50.      */
  51.     private $logoSociete;
  52.     
  53.     use TimestampableTrait;
  54.     public function getId(): ?int
  55.     {
  56.         return $this->id;
  57.     }
  58.     public function getFileName(): ?string
  59.     {
  60.         return $this->fileName;
  61.     }
  62.     public function setFileName(string $fileName): self
  63.     {
  64.         $this->fileName $fileName;
  65.         return $this;
  66.     }
  67.     public function getFilePath(): ?string
  68.     {
  69.         return $this->filePath;
  70.     }
  71.     public function setFilePath(string $filePath): self
  72.     {
  73.         $this->filePath $filePath;
  74.         return $this;
  75.     }
  76.     public function getFileExt(): ?string
  77.     {
  78.         return $this->fileExt;
  79.     }
  80.     public function setFileExt(string $fileExt): self
  81.     {
  82.         $this->fileExt $fileExt;
  83.         return $this;
  84.     }
  85.     public function getFileSize(): ?string
  86.     {
  87.         return $this->fileSize;
  88.     }
  89.     public function setFileSize(string $fileSize): self
  90.     {
  91.         $this->fileSize $fileSize;
  92.         return $this;
  93.     }
  94.     public function getOriginName(): ?string
  95.     {
  96.         return $this->originName;
  97.     }
  98.     public function setOriginName(string $originName): self
  99.     {
  100.         $this->originName $originName;
  101.         return $this;
  102.     }
  103.     public function getLogoSociete(): ?TblSociete
  104.     {
  105.         return $this->logoSociete;
  106.     }
  107.     public function setLogoSociete(?TblSociete $logoSociete): self
  108.     {
  109.         // unset the owning side of the relation if necessary
  110.         if ($logoSociete === null && $this->logoSociete !== null) {
  111.             $this->logoSociete->setLogo(null);
  112.         }
  113.         // set the owning side of the relation if necessary
  114.         if ($logoSociete !== null && $logoSociete->getLogo() !== $this) {
  115.             $logoSociete->setLogo($this);
  116.         }
  117.         $this->logoSociete $logoSociete;
  118.     }
  119. }