src/Entity/CompanyDocument.php line 25

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Common\SoftDeletableEntityTrait;
  4. use App\Entity\Common\StatefulEntityTrait;
  5. use App\Entity\Common\TimestampedEntityTrait;
  6. use Doctrine\ORM\Mapping\UniqueConstraint;
  7. use DateTime;
  8. use Doctrine\ORM\Mapping as ORM;
  9. use Gedmo\Mapping\Annotation as Gedmo;
  10. use Evence\Bundle\SoftDeleteableExtensionBundle\Mapping\Annotation as Evence;
  11. /**
  12.  * Class CompanyDocument
  13.  *
  14.  * @ORM\Entity(repositoryClass="App\Repository\CompanyDocumentRepository")
  15.  * @ORM\Table(indexes={
  16.  *     @ORM\Index(name="IDX_updated_at", columns={"updated_at"}),
  17.  *     @ORM\Index(name="IDX_deleted_at", columns={"deleted_at"}),
  18.  *     @ORM\Index(name="IDX_is_active", columns={"is_active"})
  19.  * }
  20.  * )
  21.  * @Gedmo\SoftDeleteable(fieldName="deletedAt")
  22.  */
  23. class CompanyDocument
  24. {
  25.     use SoftDeletableEntityTraitStatefulEntityTraitTimestampedEntityTrait;
  26.     /**
  27.      * @var integer
  28.      *
  29.      * @ORM\Id()
  30.      * @ORM\GeneratedValue
  31.      * @ORM\Column(type="integer")
  32.      */
  33.     private $id;
  34.     /**
  35.      * @ORM\ManyToOne(targetEntity="Company")
  36.      * @ORM\JoinColumn(name="company_id", referencedColumnName="id", onDelete="CASCADE")
  37.      */
  38.     private $company;
  39.     /**
  40.      * @ORM\ManyToOne(targetEntity="StaCompanyFileType")
  41.      * @ORM\JoinColumn(name="file_type", referencedColumnName="code", onDelete="CASCADE")
  42.      */
  43.     private $fileType;
  44.     /**
  45.      * @var string
  46.      *
  47.      * @ORM\Column(length=100)
  48.      */
  49.     private $fileName;
  50.     /**
  51.      * @var string
  52.      *
  53.      * @ORM\Column(length=10)
  54.      */
  55.     private $extension;
  56.     public function getId(): int
  57.     {
  58.         return $this->id;
  59.     }
  60.     public function setId(int $id): CompanyDocument
  61.     {
  62.         $this->id $id;
  63.         return $this;
  64.     }
  65.     /**
  66.      * @return mixed
  67.      */
  68.     public function getCompany()
  69.     {
  70.         return $this->company;
  71.     }
  72.     /**
  73.      * @param mixed $company
  74.      * @return CompanyDocument
  75.      */
  76.     public function setCompany($company)
  77.     {
  78.         $this->company $company;
  79.         return $this;
  80.     }
  81.     /**
  82.      * @return mixed
  83.      */
  84.     public function getFileType()
  85.     {
  86.         return $this->fileType;
  87.     }
  88.     /**
  89.      * @param mixed $fileType
  90.      * @return CompanyDocument
  91.      */
  92.     public function setFileType($fileType)
  93.     {
  94.         $this->fileType $fileType;
  95.         return $this;
  96.     }
  97.     public function getFileName(): string
  98.     {
  99.         return $this->fileName;
  100.     }
  101.     public function setFileName(string $fileName): CompanyDocument
  102.     {
  103.         $this->fileName $fileName;
  104.         return $this;
  105.     }
  106.     public function getExtension(): string
  107.     {
  108.         return $this->extension;
  109.     }
  110.     public function setExtension(string $extension): CompanyDocument
  111.     {
  112.         $this->extension $extension;
  113.         return $this;
  114.     }
  115. }