src/Entity/System/IncomingStock.php line 21

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Entity\System;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\Table(name="ps_stock_venideros", indexes={
  7. *
  8. * @ORM\Index(name="id_product_attribute", columns={"id_product_attribute"}),
  9. * @ORM\Index(name="date_next", columns={"date_next"}),
  10. * @ORM\Index(name="FK_ps_product_id_product", columns={"id_product"}),
  11. * @ORM\Index(name="id_purcharse_line", columns={"id_purcharse_line"}),
  12. * @ORM\Index(name="active_stock", columns={"active_stock"})
  13. * })
  14. *
  15. * @ORM\Entity(repositoryClass="App\Repository\System\IncomingStockRepository")
  16. */
  17. class IncomingStock
  18. {
  19. public const COURTESY_DAYS = 5;
  20. /**
  21. * @ORM\Column(name="id_stock_venideros", type="integer")
  22. *
  23. * @ORM\Id
  24. *
  25. * @ORM\GeneratedValue(strategy="AUTO")
  26. */
  27. private int $id;
  28. /**
  29. * @ORM\Column(type="datetime" ,nullable=true)
  30. */
  31. private ?\DateTime $dateNext;
  32. /**
  33. * @ORM\Column(type="integer", nullable=false, options={"default" : 0})
  34. */
  35. private ?int $quantity;
  36. /**
  37. * @ORM\Column(type="integer",name="id_purcharse_line", nullable=true)
  38. */
  39. private ?int $purchaseLineId;
  40. /**
  41. * @ORM\Column(type="integer", name="id_product", length=11, options={"default" : 0})
  42. */
  43. private int $productId;
  44. /**
  45. * @ORM\Column(type="integer",name="id_product_attribute", length=11, options={"default" : 0})
  46. */
  47. private int $productAttributeId;
  48. /**
  49. * @ORM\Column(type="string" , length=50)
  50. */
  51. private string $purchaseOrder;
  52. /**
  53. * @ORM\Column(type="boolean" , nullable=true, options={"default" : 0})
  54. */
  55. private ?bool $purchaseConfirmed;
  56. /**
  57. * @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
  58. */
  59. private bool $activeStock;
  60. /**
  61. * @ORM\Column(type="datetime" ,nullable=false, options={"default":"CURRENT_TIMESTAMP"})
  62. */
  63. private ?\DateTime $date;
  64. public function getId(): int
  65. {
  66. return $this->id;
  67. }
  68. public function getDateNext(): ?\DateTime
  69. {
  70. return $this->dateNext;
  71. }
  72. public function setDateNext(?\DateTime $dateNext): IncomingStock
  73. {
  74. $this->dateNext = $dateNext;
  75. return $this;
  76. }
  77. public function getQuantity(): ?int
  78. {
  79. return $this->quantity;
  80. }
  81. public function setQuantity(?int $quantity): IncomingStock
  82. {
  83. $this->quantity = $quantity;
  84. return $this;
  85. }
  86. public function getPurchaseLineId(): ?int
  87. {
  88. return $this->purchaseLineId;
  89. }
  90. public function setPurchaseLineId(?int $purchaseLineId): IncomingStock
  91. {
  92. $this->purchaseLineId = $purchaseLineId;
  93. return $this;
  94. }
  95. public function getProductId(): int
  96. {
  97. return $this->productId;
  98. }
  99. public function setProductId(int $productId): IncomingStock
  100. {
  101. $this->productId = $productId;
  102. return $this;
  103. }
  104. public function getProductAttributeId(): int
  105. {
  106. return $this->productAttributeId;
  107. }
  108. public function setProductAttributeId(int $productAttributeId): IncomingStock
  109. {
  110. $this->productAttributeId = $productAttributeId;
  111. return $this;
  112. }
  113. public function getPurchaseOrder(): string
  114. {
  115. return $this->purchaseOrder;
  116. }
  117. public function setPurchaseOrder(string $purchaseOrder): IncomingStock
  118. {
  119. $this->purchaseOrder = $purchaseOrder;
  120. return $this;
  121. }
  122. public function getPurchaseConfirmed(): ?bool
  123. {
  124. return $this->purchaseConfirmed;
  125. }
  126. public function setPurchaseConfirmed(?bool $purchaseConfirmed): IncomingStock
  127. {
  128. $this->purchaseConfirmed = $purchaseConfirmed;
  129. return $this;
  130. }
  131. public function getActiveStock(): ?bool
  132. {
  133. return $this->activeStock;
  134. }
  135. public function setActiveStock(?bool $activeStock): IncomingStock
  136. {
  137. $this->activeStock = $activeStock;
  138. return $this;
  139. }
  140. public function getDate(): ?\DateTime
  141. {
  142. return $this->date;
  143. }
  144. public function setDate(?\DateTime $date): IncomingStock
  145. {
  146. $this->date = $date;
  147. return $this;
  148. }
  149. }