<?php
namespace App\Entity;
use App\Entity\Common\SoftDeletableEntityTrait;
use App\Entity\Common\StatefulEntityTrait;
use App\Entity\Common\TimestampedEntityTrait;
use Doctrine\ORM\Mapping\UniqueConstraint;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Evence\Bundle\SoftDeleteableExtensionBundle\Mapping\Annotation as Evence;
/**
* Class CompanyDocument
*
* @ORM\Entity(repositoryClass="App\Repository\CompanyDocumentRepository")
* @ORM\Table(indexes={
* @ORM\Index(name="IDX_updated_at", columns={"updated_at"}),
* @ORM\Index(name="IDX_deleted_at", columns={"deleted_at"}),
* @ORM\Index(name="IDX_is_active", columns={"is_active"})
* }
* )
* @Gedmo\SoftDeleteable(fieldName="deletedAt")
*/
class CompanyDocument
{
use SoftDeletableEntityTrait, StatefulEntityTrait, TimestampedEntityTrait;
/**
* @var integer
*
* @ORM\Id()
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity="Company")
* @ORM\JoinColumn(name="company_id", referencedColumnName="id", onDelete="CASCADE")
*/
private $company;
/**
* @ORM\ManyToOne(targetEntity="StaCompanyFileType")
* @ORM\JoinColumn(name="file_type", referencedColumnName="code", onDelete="CASCADE")
*/
private $fileType;
/**
* @var string
*
* @ORM\Column(length=100)
*/
private $fileName;
/**
* @var string
*
* @ORM\Column(length=10)
*/
private $extension;
public function getId(): int
{
return $this->id;
}
public function setId(int $id): CompanyDocument
{
$this->id = $id;
return $this;
}
/**
* @return mixed
*/
public function getCompany()
{
return $this->company;
}
/**
* @param mixed $company
* @return CompanyDocument
*/
public function setCompany($company)
{
$this->company = $company;
return $this;
}
/**
* @return mixed
*/
public function getFileType()
{
return $this->fileType;
}
/**
* @param mixed $fileType
* @return CompanyDocument
*/
public function setFileType($fileType)
{
$this->fileType = $fileType;
return $this;
}
public function getFileName(): string
{
return $this->fileName;
}
public function setFileName(string $fileName): CompanyDocument
{
$this->fileName = $fileName;
return $this;
}
public function getExtension(): string
{
return $this->extension;
}
public function setExtension(string $extension): CompanyDocument
{
$this->extension = $extension;
return $this;
}
}