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 int
  44. *
  45. * @ORM\Column(type="integer", name="id_product", length=11)
  46. */
  47. private $productId;
  48. /**
  49. * @var string|null
  50. *
  51. * @ORM\Column(type="string", nullable=true, options={"default":"0"}, length=50)
  52. */
  53. private $purchaseOrder;
  54. /**
  55. * @var bool|null
  56. *
  57. * @ORM\Column(type="boolean", nullable=true, options={"default":0})
  58. */
  59. private $purchaseConfirmed;
  60. /**
  61. * @var bool|null
  62. *
  63. * @ORM\Column(type="boolean", nullable=true, options={"default":0})
  64. */
  65. private $activeStock;
  66. /**
  67. * @var ProductAttribute
  68. *
  69. * @ORM\OneToOne(targetEntity="ProductAttribute", inversedBy="futureStock")
  70. *
  71. * @ORM\JoinColumn(name="id_product_attribute", referencedColumnName="id_product_attribute")
  72. */
  73. private $productAttribute;
  74. /**
  75. * @var Product
  76. *
  77. * @ORM\ManyToOne(targetEntity="App\Entity\System\Product", inversedBy="futureStocks")
  78. *
  79. * @ORM\JoinColumn(referencedColumnName="id_product", name="id_product")
  80. */
  81. private $product;
  82. public function __construct()
  83. {
  84. $this->quantity = 0;
  85. $this->productId = 0;
  86. $this->purchaseOrder = '0';
  87. $this->purchaseConfirmed = 0;
  88. $this->activeStock = 0;
  89. }
  90. /**
  91. * @return int
  92. */
  93. public function getId(): int
  94. {
  95. return $this->id;
  96. }
  97. /**
  98. * @param int $id
  99. *
  100. * @return FutureStock
  101. */
  102. public function setId(int $id): FutureStock
  103. {
  104. $this->id = $id;
  105. return $this;
  106. }
  107. /**
  108. * @return int
  109. */
  110. public function getQuantity(): int
  111. {
  112. return $this->quantity;
  113. }
  114. /**
  115. * @param int $quantity
  116. *
  117. * @return FutureStock
  118. */
  119. public function setQuantity(int $quantity): FutureStock
  120. {
  121. $this->quantity = $quantity;
  122. return $this;
  123. }
  124. /**
  125. * @return \DateTime|null
  126. */
  127. public function getDateNext(): ?\DateTime
  128. {
  129. return $this->dateNext;
  130. }
  131. /**
  132. * @param \DateTime|null $dateNext
  133. *
  134. * @return FutureStock
  135. */
  136. public function setDateNext(?\DateTime $dateNext): FutureStock
  137. {
  138. $this->dateNext = $dateNext;
  139. return $this;
  140. }
  141. /**
  142. * @return int|null
  143. */
  144. public function getPurchaseLineId(): ?int
  145. {
  146. return $this->purchaseLineId;
  147. }
  148. /**
  149. * @param int|null $purchaseLineId
  150. *
  151. * @return FutureStock
  152. */
  153. public function setPurchaseLineId(?int $purchaseLineId): FutureStock
  154. {
  155. $this->purchaseLineId = $purchaseLineId;
  156. return $this;
  157. }
  158. /**
  159. * @return int
  160. */
  161. public function getProductId(): int
  162. {
  163. return $this->productId;
  164. }
  165. /**
  166. * @param int $productId
  167. *
  168. * @return FutureStock
  169. */
  170. public function setProductId(int $productId): FutureStock
  171. {
  172. $this->productId = $productId;
  173. return $this;
  174. }
  175. /**
  176. * @return string|null
  177. */
  178. public function getPurchaseOrder(): ?string
  179. {
  180. return $this->purchaseOrder;
  181. }
  182. /**
  183. * @param string|null $purchaseOrder
  184. *
  185. * @return FutureStock
  186. */
  187. public function setPurchaseOrder(?string $purchaseOrder): FutureStock
  188. {
  189. $this->purchaseOrder = $purchaseOrder;
  190. return $this;
  191. }
  192. /**
  193. * @return bool|null
  194. */
  195. public function getPurchaseConfirmed(): ?bool
  196. {
  197. return $this->purchaseConfirmed;
  198. }
  199. /**
  200. * @param bool|null $purchaseConfirmed
  201. *
  202. * @return FutureStock
  203. */
  204. public function setPurchaseConfirmed(?bool $purchaseConfirmed): FutureStock
  205. {
  206. $this->purchaseConfirmed = $purchaseConfirmed;
  207. return $this;
  208. }
  209. /**
  210. * @return bool|null
  211. */
  212. public function getActiveStock(): ?bool
  213. {
  214. return $this->activeStock;
  215. }
  216. /**
  217. * @param bool|null $activeStock
  218. *
  219. * @return FutureStock
  220. */
  221. public function setActiveStock(?bool $activeStock): FutureStock
  222. {
  223. $this->activeStock = $activeStock;
  224. return $this;
  225. }
  226. public function getProductAttribute(): ProductAttribute
  227. {
  228. return $this->productAttribute;
  229. }
  230. public function setProductAttribute(ProductAttribute $productAttribute): FutureStock
  231. {
  232. $this->productAttribute = $productAttribute;
  233. return $this;
  234. }
  235. public function getProduct(): Product
  236. {
  237. return $this->product;
  238. }
  239. public function setProduct(Product $product): FutureStock
  240. {
  241. $this->product = $product;
  242. return $this;
  243. }
  244. }