src/Flexy/ShopBundle/Entity/Product/ImportExcel.php line 14

  1. <?php
  2. namespace App\Flexy\ShopBundle\Entity\Product;
  3. use ApiPlatform\Core\Annotation\ApiResource;
  4. use App\Flexy\ShopBundle\Entity\Vendor\Vendor;
  5. use App\Repository\Flexy\ShopBundle\Entity\ImportExcel\ImportExcelRepository;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Doctrine\ORM\Mapping\Table;
  8. #[ApiResource]
  9. #[Table(name'flexy_shop_import_data')]
  10. #[ORM\Entity(repositoryClassImportExcelRepository::class)]
  11. class ImportExcel
  12. {
  13.     #[ORM\Id]
  14.     #[ORM\GeneratedValue]
  15.     #[ORM\Column(type'integer')]
  16.     private $id;
  17.     #[ORM\Column(type'string'length255)]
  18.     private ?string $file null;
  19.     #[ORM\Column(type'text'nullabletrue)]
  20.     private ?string $description null;
  21.     #[ORM\Column(type'datetime_immutable'nullabletrue)]
  22.     private ?\DateTimeImmutable $createdAt null;
  23.     #[ORM\ManyToOne(targetEntityVendor::class, inversedBy'importExcels')]
  24.     private ?\App\Flexy\ShopBundle\Entity\Vendor\Vendor $vendor null;
  25.     #[ORM\Column(type'integer'nullabletrue)]
  26.     private ?int $totalLinesImported null;
  27.     #[ORM\Column(type'integer'nullabletrue)]
  28.     private ?int $totalLinesIgnored null;
  29.     public function __construct()
  30.     {
  31.         $this->createdAt = new \DateTimeImmutable();
  32.     }
  33.     public function getId(): ?int
  34.     {
  35.         return $this->id;
  36.     }
  37.     public function getFile(): ?string
  38.     {
  39.         return $this->file;
  40.     }
  41.     public function setFile(string $file): self
  42.     {
  43.         $this->file $file;
  44.         return $this;
  45.     }
  46.     public function getDescription(): ?string
  47.     {
  48.         return $this->description;
  49.     }
  50.     public function setDescription(?string $description): self
  51.     {
  52.         $this->description $description;
  53.         return $this;
  54.     }
  55.     public function getCreatedAt(): ?\DateTimeImmutable
  56.     {
  57.         return $this->createdAt;
  58.     }
  59.     public function setCreatedAt(?\DateTimeImmutable $createdAt): self
  60.     {
  61.         $this->createdAt $createdAt;
  62.         return $this;
  63.     }
  64.     public function getVendor(): ?Vendor
  65.     {
  66.         return $this->vendor;
  67.     }
  68.     public function setVendor(?Vendor $vendor): self
  69.     {
  70.         $this->vendor $vendor;
  71.         return $this;
  72.     }
  73.     public function getTotalLinesImported(): ?int
  74.     {
  75.         return $this->totalLinesImported;
  76.     }
  77.     public function setTotalLinesImported(?int $totalLinesImported): self
  78.     {
  79.         $this->totalLinesImported $totalLinesImported;
  80.         return $this;
  81.     }
  82.     public function getTotalLinesIgnored(): ?int
  83.     {
  84.         return $this->totalLinesIgnored;
  85.     }
  86.     public function setTotalLinesIgnored(?int $totalLinesIgnored): self
  87.     {
  88.         $this->totalLinesIgnored $totalLinesIgnored;
  89.         return $this;
  90.     }
  91. }