src/Entity/System/FutureStock.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity\System;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * @ORM\Entity(repositoryClass="App\Repository\System\FutureStockRepository")
  6. *
  7. * @ORM\Table(name="ps_future_stock", indexes={
  8. *
  9. * @ORM\Index(name="id_purcharse_line", columns={"id_purcharse_line"})
  10. * })
  11. */
  12. class FutureStock
  13. {
  14. /**
  15. * @var int
  16. *
  17. * @ORM\Id
  18. *
  19. * @ORM\GeneratedValue(strategy="AUTO")
  20. *
  21. * @ORM\Column(type="integer", name="id_future_stock")
  22. */
  23. private $id;
  24. /**
  25. * @var \DateTime|null
  26. *
  27. * @ORM\Column(type="datetime", nullable=true)
  28. */
  29. private $dateNext;
  30. /**
  31. * @var int
  32. *
  33. * @ORM\Column(type="integer", options={"default":0})
  34. */
  35. private $quantity;
  36. /**
  37. * @var int|null
  38. *
  39. * @ORM\Column(type="integer", length=11, nullable=true, name="id_purcharse_line")
  40. */
  41. private $purchaseLineId;
  42. /**
  43. * @var string|null
  44. *
  45. * @ORM\Column(type="string", nullable=true, options={"default":"0"}, length=50)
  46. */
  47. private $purchaseOrder;
  48. /**
  49. * @var bool|null
  50. *
  51. * @ORM\Column(type="boolean", nullable=true, options={"default":0})
  52. */
  53. private $purchaseConfirmed;
  54. /**
  55. * @var bool|null
  56. *
  57. * @ORM\Column(type="boolean", nullable=true, options={"default":0})
  58. */
  59. private $activeStock;
  60. /**
  61. * @var ProductAttribute|null
  62. *
  63. * @ORM\ManyToOne(targetEntity="ProductAttribute", inversedBy="futureStocks")
  64. *
  65. * @ORM\JoinColumn(name="id_product_attribute", referencedColumnName="id_product_attribute")
  66. */
  67. private $productAttribute;
  68. /**
  69. * @var Product
  70. *
  71. * @ORM\ManyToOne(targetEntity="App\Entity\System\Product", inversedBy="futureStocks")
  72. *
  73. * @ORM\JoinColumn(referencedColumnName="id_product", name="id_product", nullable=false)
  74. */
  75. private $product;
  76. public function __construct()
  77. {
  78. $this->quantity = 0;
  79. $this->purchaseOrder = '0';
  80. $this->purchaseConfirmed = false;
  81. $this->activeStock = false;
  82. }
  83. /**
  84. * @return int
  85. */
  86. public function getId(): int
  87. {
  88. return $this->id;
  89. }
  90. /**
  91. * @param int $id
  92. *
  93. * @return FutureStock
  94. */
  95. public function setId(int $id): FutureStock
  96. {
  97. $this->id = $id;
  98. return $this;
  99. }
  100. /**
  101. * @return int
  102. */
  103. public function getQuantity(): int
  104. {
  105. return $this->quantity;
  106. }
  107. /**
  108. * @param int $quantity
  109. *
  110. * @return FutureStock
  111. */
  112. public function setQuantity(int $quantity): FutureStock
  113. {
  114. $this->quantity = $quantity;
  115. return $this;
  116. }
  117. /**
  118. * @return \DateTime|null
  119. */
  120. public function getDateNext(): ?\DateTime
  121. {
  122. return $this->dateNext;
  123. }
  124. /**
  125. * @param \DateTime|null $dateNext
  126. *
  127. * @return FutureStock
  128. */
  129. public function setDateNext(?\DateTime $dateNext): FutureStock
  130. {
  131. $this->dateNext = $dateNext;
  132. return $this;
  133. }
  134. /**
  135. * @return int|null
  136. */
  137. public function getPurchaseLineId(): ?int
  138. {
  139. return $this->purchaseLineId;
  140. }
  141. /**
  142. * @param int|null $purchaseLineId
  143. *
  144. * @return FutureStock
  145. */
  146. public function setPurchaseLineId(?int $purchaseLineId): FutureStock
  147. {
  148. $this->purchaseLineId = $purchaseLineId;
  149. return $this;
  150. }
  151. /**
  152. * @return string|null
  153. */
  154. public function getPurchaseOrder(): ?string
  155. {
  156. return $this->purchaseOrder;
  157. }
  158. /**
  159. * @param string|null $purchaseOrder
  160. *
  161. * @return FutureStock
  162. */
  163. public function setPurchaseOrder(?string $purchaseOrder): FutureStock
  164. {
  165. $this->purchaseOrder = $purchaseOrder;
  166. return $this;
  167. }
  168. /**
  169. * @return bool|null
  170. */
  171. public function getPurchaseConfirmed(): ?bool
  172. {
  173. return $this->purchaseConfirmed;
  174. }
  175. /**
  176. * @param bool|null $purchaseConfirmed
  177. *
  178. * @return FutureStock
  179. */
  180. public function setPurchaseConfirmed(?bool $purchaseConfirmed): FutureStock
  181. {
  182. $this->purchaseConfirmed = $purchaseConfirmed;
  183. return $this;
  184. }
  185. /**
  186. * @return bool|null
  187. */
  188. public function getActiveStock(): ?bool
  189. {
  190. return $this->activeStock;
  191. }
  192. /**
  193. * @param bool|null $activeStock
  194. *
  195. * @return FutureStock
  196. */
  197. public function setActiveStock(?bool $activeStock): FutureStock
  198. {
  199. $this->activeStock = $activeStock;
  200. return $this;
  201. }
  202. public function getProductAttribute(): ?ProductAttribute
  203. {
  204. return $this->productAttribute;
  205. }
  206. public function setProductAttribute(?ProductAttribute $productAttribute = null): FutureStock
  207. {
  208. $this->productAttribute = $productAttribute;
  209. return $this;
  210. }
  211. public function getProduct(): Product
  212. {
  213. return $this->product;
  214. }
  215. public function setProduct(Product $product): FutureStock
  216. {
  217. $this->product = $product;
  218. return $this;
  219. }
  220. }