<?php
namespace App\Entity;
use App\Entity\Traits\TimestampableTrait;
use App\Repository\TblFileRepository;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* @ORM\Entity(repositoryClass=TblFileRepository::class)
* @Gedmo\Loggable
*/
class TblFile
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $fileName;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $filePath;
/**
* @var string
*
* @ORM\Column(name="file_ext", type="string", length=255)
* @Gedmo\Versioned
*/
private $fileExt;
/**
* @var string
*
* @ORM\Column(name="file_size", type="string", length=255, nullable=true)
* @Gedmo\Versioned
*/
private $fileSize;
/**
* @var string
*
* @ORM\Column(name="origin_name", type="string", length=255)
* @Gedmo\Versioned
*/
private $originName;
/**
* @ORM\OneToOne(targetEntity=TblSociete::class, mappedBy="logo", cascade={"persist", "remove"})
*/
private $logoSociete;
use TimestampableTrait;
public function getId(): ?int
{
return $this->id;
}
public function getFileName(): ?string
{
return $this->fileName;
}
public function setFileName(string $fileName): self
{
$this->fileName = $fileName;
return $this;
}
public function getFilePath(): ?string
{
return $this->filePath;
}
public function setFilePath(string $filePath): self
{
$this->filePath = $filePath;
return $this;
}
public function getFileExt(): ?string
{
return $this->fileExt;
}
public function setFileExt(string $fileExt): self
{
$this->fileExt = $fileExt;
return $this;
}
public function getFileSize(): ?string
{
return $this->fileSize;
}
public function setFileSize(string $fileSize): self
{
$this->fileSize = $fileSize;
return $this;
}
public function getOriginName(): ?string
{
return $this->originName;
}
public function setOriginName(string $originName): self
{
$this->originName = $originName;
return $this;
}
public function getLogoSociete(): ?TblSociete
{
return $this->logoSociete;
}
public function setLogoSociete(?TblSociete $logoSociete): self
{
// unset the owning side of the relation if necessary
if ($logoSociete === null && $this->logoSociete !== null) {
$this->logoSociete->setLogo(null);
}
// set the owning side of the relation if necessary
if ($logoSociete !== null && $logoSociete->getLogo() !== $this) {
$logoSociete->setLogo($this);
}
$this->logoSociete = $logoSociete;
}
}