src/Entity/LogImport.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\LogImportRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\Entity(repositoryClass=LogImportRepository::class)
  7. * @ORM\EntityListeners({"App\Listener\EntityListener"})
  8. */
  9. class LogImport
  10. {
  11. /**
  12. * @ORM\Id()
  13. * @ORM\GeneratedValue()
  14. * @ORM\Column(type="integer")
  15. */
  16. private $id;
  17. /**
  18. * @ORM\ManyToOne(targetEntity=Dealer::class, inversedBy="logImports")
  19. * @ORM\JoinColumn(nullable=false)
  20. */
  21. private $dealer;
  22. /**
  23. * @ORM\Column(type="datetime")
  24. */
  25. private $createts;
  26. /**
  27. * @ORM\Column(type="integer")
  28. */
  29. private $newProducts = 0;
  30. /**
  31. * @ORM\Column(type="integer")
  32. */
  33. private $updateProducts = 0;
  34. /**
  35. * @ORM\Column(type="integer")
  36. */
  37. private $disableProducts = 0;
  38. /**
  39. * @ORM\Column(type="float")
  40. */
  41. private $time = 0;
  42. public function getSums( )
  43. {
  44. return $this->getDisableProducts() + $this->getUpdateProducts() + $this->getNewProducts();
  45. }
  46. public function getId(): ?int
  47. {
  48. return $this->id;
  49. }
  50. public function getDealer(): ?Dealer
  51. {
  52. return $this->dealer;
  53. }
  54. public function setDealer(?Dealer $dealer): self
  55. {
  56. $this->dealer = $dealer;
  57. return $this;
  58. }
  59. public function getCreatets(): ?\DateTimeInterface
  60. {
  61. return $this->createts;
  62. }
  63. public function setCreatets(\DateTimeInterface $createts): self
  64. {
  65. $this->createts = $createts;
  66. return $this;
  67. }
  68. public function getNewProducts(): ?int
  69. {
  70. return $this->newProducts;
  71. }
  72. public function setNewProducts(int $newProducts): self
  73. {
  74. $this->newProducts = $newProducts;
  75. return $this;
  76. }
  77. public function addNewProducts( )
  78. {
  79. $this->newProducts++;
  80. }
  81. public function getUpdateProducts(): ?int
  82. {
  83. return $this->updateProducts;
  84. }
  85. public function setUpdateProducts(int $updateProducts): self
  86. {
  87. $this->updateProducts = $updateProducts;
  88. return $this;
  89. }
  90. public function addUpdateProducts( )
  91. {
  92. $this->updateProducts++;
  93. }
  94. public function getDisableProducts(): ?int
  95. {
  96. return $this->disableProducts;
  97. }
  98. public function setDisableProducts(int $disableProducts): self
  99. {
  100. $this->disableProducts = $disableProducts;
  101. return $this;
  102. }
  103. public function getTime(): ?float
  104. {
  105. return $this->time;
  106. }
  107. public function setTime(float $time): self
  108. {
  109. $this->time = $time;
  110. return $this;
  111. }
  112. }