<?phpnamespace App\Entity;use App\Repository\LogImportRepository;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=LogImportRepository::class) * @ORM\EntityListeners({"App\Listener\EntityListener"}) */class LogImport{ /** * @ORM\Id() * @ORM\GeneratedValue() * @ORM\Column(type="integer") */ private $id; /** * @ORM\ManyToOne(targetEntity=Dealer::class, inversedBy="logImports") * @ORM\JoinColumn(nullable=false) */ private $dealer; /** * @ORM\Column(type="datetime") */ private $createts; /** * @ORM\Column(type="integer") */ private $newProducts = 0; /** * @ORM\Column(type="integer") */ private $updateProducts = 0; /** * @ORM\Column(type="integer") */ private $disableProducts = 0; /** * @ORM\Column(type="float") */ private $time = 0; public function getSums( ) { return $this->getDisableProducts() + $this->getUpdateProducts() + $this->getNewProducts(); } public function getId(): ?int { return $this->id; } public function getDealer(): ?Dealer { return $this->dealer; } public function setDealer(?Dealer $dealer): self { $this->dealer = $dealer; return $this; } public function getCreatets(): ?\DateTimeInterface { return $this->createts; } public function setCreatets(\DateTimeInterface $createts): self { $this->createts = $createts; return $this; } public function getNewProducts(): ?int { return $this->newProducts; } public function setNewProducts(int $newProducts): self { $this->newProducts = $newProducts; return $this; } public function addNewProducts( ) { $this->newProducts++; } public function getUpdateProducts(): ?int { return $this->updateProducts; } public function setUpdateProducts(int $updateProducts): self { $this->updateProducts = $updateProducts; return $this; } public function addUpdateProducts( ) { $this->updateProducts++; } public function getDisableProducts(): ?int { return $this->disableProducts; } public function setDisableProducts(int $disableProducts): self { $this->disableProducts = $disableProducts; return $this; } public function getTime(): ?float { return $this->time; } public function setTime(float $time): self { $this->time = $time; return $this; }}