src/Entity/System/ProductStock.php line 14

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="product_stock")
  7. *
  8. * @ORM\Entity(repositoryClass="App\Repository\System\ProductStockRepository")
  9. */
  10. class ProductStock
  11. {
  12. /**
  13. * @ORM\Column(type="integer")
  14. *
  15. * @ORM\Id
  16. *
  17. * @ORM\GeneratedValue(strategy="AUTO")
  18. */
  19. protected int $id;
  20. /**
  21. * @ORM\Column(type="string", length=64)
  22. */
  23. protected string $uuid;
  24. /**
  25. * @ORM\Column(type="string", length=32)
  26. */
  27. protected string $reference;
  28. /**
  29. * @ORM\Column(type="string", length=32)
  30. */
  31. protected string $sku;
  32. /**
  33. * @ORM\ManyToOne(targetEntity="App\Entity\System\Product", inversedBy="productStocks", cascade={"persist"})
  34. *
  35. * @ORM\JoinColumn(referencedColumnName="id_product")
  36. */
  37. private Product $product;
  38. /**
  39. * @ORM\ManyToOne(targetEntity="ProductAttribute", cascade={"persist"})
  40. *
  41. * @ORM\JoinColumn(referencedColumnName="id_product_attribute")
  42. */
  43. private ?ProductAttribute $productAttribute;
  44. /**
  45. * @ORM\Column(name="quantity", type="integer")
  46. */
  47. private int $quantity;
  48. /**
  49. * @ORM\Column(type="integer")
  50. */
  51. private int $minimumHandlingDays;
  52. /**
  53. * @ORM\Column(type="integer")
  54. */
  55. private int $maximumHandlingDays;
  56. /**
  57. * @ORM\Column(type="datetime")
  58. */
  59. private \DateTime $dateAdd;
  60. /**
  61. * @ORM\Column(type="datetime")
  62. */
  63. private \DateTime $dateUpdate;
  64. public function __construct()
  65. {
  66. $this->dateAdd = new \DateTime();
  67. }
  68. public function getId(): int
  69. {
  70. return $this->id;
  71. }
  72. public function getUuid(): string
  73. {
  74. return $this->uuid;
  75. }
  76. public function setUuid(string $uuid): ProductStock
  77. {
  78. $this->uuid = $uuid;
  79. return $this;
  80. }
  81. public function getReference(): string
  82. {
  83. return $this->reference;
  84. }
  85. public function setReference(string $reference): ProductStock
  86. {
  87. $this->reference = $reference;
  88. return $this;
  89. }
  90. public function getSku(): string
  91. {
  92. return $this->sku;
  93. }
  94. public function setSku(string $sku): ProductStock
  95. {
  96. $this->sku = $sku;
  97. return $this;
  98. }
  99. public function getProduct(): Product
  100. {
  101. return $this->product;
  102. }
  103. public function setProduct(Product $product): ProductStock
  104. {
  105. $this->product = $product;
  106. return $this;
  107. }
  108. public function getProductAttribute(): ?ProductAttribute
  109. {
  110. return $this->productAttribute;
  111. }
  112. public function setProductAttribute(?ProductAttribute $productAttribute): ProductStock
  113. {
  114. $this->productAttribute = $productAttribute;
  115. return $this;
  116. }
  117. public function getQuantity(): int
  118. {
  119. return $this->quantity;
  120. }
  121. public function setQuantity(int $quantity): ProductStock
  122. {
  123. $this->quantity = $quantity;
  124. return $this;
  125. }
  126. public function getMinimumHandlingDays(): int
  127. {
  128. return $this->minimumHandlingDays;
  129. }
  130. public function setMinimumHandlingDays(int $minimumHandlingDays): ProductStock
  131. {
  132. $this->minimumHandlingDays = $minimumHandlingDays;
  133. return $this;
  134. }
  135. public function getMaximumHandlingDays(): int
  136. {
  137. return $this->maximumHandlingDays;
  138. }
  139. public function setMaximumHandlingDays(int $maximumHandlingDays): ProductStock
  140. {
  141. $this->maximumHandlingDays = $maximumHandlingDays;
  142. return $this;
  143. }
  144. public function getDateAdd(): \DateTime
  145. {
  146. return $this->dateAdd;
  147. }
  148. public function setDateAdd(\DateTime $dateAdd): ProductStock
  149. {
  150. $this->dateAdd = $dateAdd;
  151. return $this;
  152. }
  153. public function getDateUpdate(): \DateTime
  154. {
  155. return $this->dateUpdate;
  156. }
  157. public function setDateUpdate(\DateTime $dateUpdate): ProductStock
  158. {
  159. $this->dateUpdate = $dateUpdate;
  160. return $this;
  161. }
  162. }