src/Entity/System/CartProduct.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\Entity\System;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * Cart
  6. *
  7. * @ORM\Table(name="ps_cart_product", indexes={
  8. *
  9. * @ORM\Index(name="id_product_attribute", columns={"id_product_attribute"}),
  10. * @ORM\Index(name="cart_product_index", columns={"id_cart", "id_product"}),
  11. * @ORM\Index(name="locks", columns={"locks"})
  12. * })
  13. *
  14. * @ORM\Entity(repositoryClass="App\Repository\System\CartProductRepository")
  15. */
  16. class CartProduct
  17. {
  18. /**
  19. * @var int
  20. *
  21. * @ORM\Id
  22. *
  23. * @ORM\GeneratedValue(strategy="AUTO")
  24. *
  25. * @ORM\Column(type="integer", name="id_cart_product")
  26. */
  27. private $id;
  28. /**
  29. * @var Cart
  30. *
  31. * @ORM\ManyToOne(targetEntity="App\Entity\System\Cart", inversedBy="cartProducts")
  32. *
  33. * @ORM\JoinColumn(name="id_cart", referencedColumnName="id_cart", nullable=false)
  34. */
  35. private $cart;
  36. /**
  37. * @var int
  38. *
  39. * @ORM\Column(type="integer", name="id_product")
  40. */
  41. private $productId;
  42. /**
  43. * @var int|null
  44. *
  45. * @ORM\Column(type="integer", length=10, nullable=true, name="id_product_attribute")
  46. */
  47. private $productAttributeId;
  48. /**
  49. * @var int
  50. *
  51. * @ORM\Column(type="integer", length=10, options={"default" : 0})
  52. */
  53. private $quantity;
  54. /**
  55. * @var \DateTime
  56. *
  57. * @ORM\Column(type="datetime")
  58. */
  59. private $dateAdd;
  60. /**
  61. * @var \DateTime
  62. *
  63. * @ORM\Column(type="datetime")
  64. */
  65. private $dateUpd;
  66. /**
  67. * @var int|null
  68. *
  69. * @ORM\Column(type="integer", length=10, nullable=true, options={"default" : 0})
  70. */
  71. private $locks;
  72. /**
  73. * @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
  74. */
  75. private ?bool $futureStock;
  76. /**
  77. * @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
  78. */
  79. private ?bool $externStock;
  80. /**
  81. * @var string|null
  82. *
  83. * @ORM\Column(type="string", nullable=true, length=50, options={"default" : "0"})
  84. */
  85. private $purchaseOrder;
  86. /**
  87. * @var int|null
  88. *
  89. * @ORM\Column(name="id_purchase_line", type="integer", length=11, nullable=true, options={"default" : 0})
  90. */
  91. private $purchaseLineId;
  92. /**
  93. * @var bool|null
  94. *
  95. * @ORM\Column(name="envio_excluido", type="boolean", nullable=true, options={"default" : 0})
  96. */
  97. private $shippingExcluded;
  98. /**
  99. * @var string|null
  100. *
  101. * @ORM\Column(type="string", nullable=true, length=100)
  102. */
  103. private $internalReference;
  104. /**
  105. * @ORM\Column(name="extern_stock_3_5", type="boolean", nullable=true, options={"default" : 0})
  106. */
  107. private ?bool $externStock3To5;
  108. /**
  109. * @ORM\Column(name="shop_360_topic", type="integer", length=2, nullable=true)
  110. */
  111. private ?int $shop360Topic = null;
  112. public function __construct()
  113. {
  114. $this->futureStock = false;
  115. $this->externStock = false;
  116. $this->externStock3To5 = false;
  117. }
  118. /**
  119. * @return int
  120. */
  121. public function getId(): int
  122. {
  123. return $this->id;
  124. }
  125. /**
  126. * @param int|null $id
  127. *
  128. * @return CartProduct
  129. */
  130. public function setId(?int $id): CartProduct
  131. {
  132. $this->id = $id;
  133. return $this;
  134. }
  135. /**
  136. * @return Cart
  137. */
  138. public function getCart(): Cart
  139. {
  140. return $this->cart;
  141. }
  142. /**
  143. * @param Cart $cart
  144. *
  145. * @return CartProduct
  146. */
  147. public function setCart(Cart $cart): CartProduct
  148. {
  149. $this->cart = $cart;
  150. return $this;
  151. }
  152. /**
  153. * @return int
  154. */
  155. public function getProductId(): int
  156. {
  157. return $this->productId;
  158. }
  159. /**
  160. * @param int $productId
  161. *
  162. * @return CartProduct
  163. */
  164. public function setProductId(int $productId): CartProduct
  165. {
  166. $this->productId = $productId;
  167. return $this;
  168. }
  169. /**
  170. * @return int|null
  171. */
  172. public function getProductAttributeId(): ?int
  173. {
  174. return $this->productAttributeId ?: null;
  175. }
  176. public function setProductAttributeId(?int $productAttributeId): CartProduct
  177. {
  178. $this->productAttributeId = $productAttributeId;
  179. return $this;
  180. }
  181. /**
  182. * @return int|null
  183. */
  184. public function getQuantity(): ?int
  185. {
  186. return $this->quantity;
  187. }
  188. /**
  189. * @param int $quantity
  190. *
  191. * @return CartProduct
  192. */
  193. public function setQuantity(int $quantity): CartProduct
  194. {
  195. $this->quantity = $quantity;
  196. return $this;
  197. }
  198. /**
  199. * @return \DateTime|null
  200. */
  201. public function getDateAdd(): ?\DateTime
  202. {
  203. return $this->dateAdd;
  204. }
  205. /**
  206. * @param \DateTime $dateAdd
  207. *
  208. * @return CartProduct
  209. */
  210. public function setDateAdd(\DateTime $dateAdd): CartProduct
  211. {
  212. $this->dateAdd = $dateAdd;
  213. return $this;
  214. }
  215. /**
  216. * @return \DateTime
  217. */
  218. public function getDateUpd(): \DateTime
  219. {
  220. return $this->dateUpd;
  221. }
  222. /**
  223. * @param \DateTime $dateUpd
  224. *
  225. * @return CartProduct
  226. */
  227. public function setDateUpd(\DateTime $dateUpd): CartProduct
  228. {
  229. $this->dateUpd = $dateUpd;
  230. return $this;
  231. }
  232. /**
  233. * @return int|null
  234. */
  235. public function getLocks(): ?int
  236. {
  237. return $this->locks;
  238. }
  239. /**
  240. * @param int|null $locks
  241. *
  242. * @return CartProduct
  243. */
  244. public function setLocks(?int $locks): CartProduct
  245. {
  246. $this->locks = $locks;
  247. return $this;
  248. }
  249. public function getFutureStock(): ?bool
  250. {
  251. return $this->futureStock;
  252. }
  253. public function setFutureStock(bool $futureStock): CartProduct
  254. {
  255. $this->futureStock = $futureStock;
  256. return $this;
  257. }
  258. public function getExternStock(): ?bool
  259. {
  260. return $this->externStock;
  261. }
  262. public function setExternStock(bool $externStock): CartProduct
  263. {
  264. $this->externStock = $externStock;
  265. return $this;
  266. }
  267. /**
  268. * @return string|null
  269. */
  270. public function getPurchaseOrder(): ?string
  271. {
  272. return $this->purchaseOrder;
  273. }
  274. /**
  275. * @param string|null $purchaseOrder
  276. *
  277. * @return CartProduct
  278. */
  279. public function setPurchaseOrder(?string $purchaseOrder): CartProduct
  280. {
  281. $this->purchaseOrder = $purchaseOrder;
  282. return $this;
  283. }
  284. /**
  285. * @return int|null
  286. */
  287. public function getPurchaseLineId(): ?int
  288. {
  289. return $this->purchaseLineId;
  290. }
  291. /**
  292. * @param int|null $purchaseLineId
  293. *
  294. * @return CartProduct
  295. */
  296. public function setPurchaseLineId(?int $purchaseLineId): CartProduct
  297. {
  298. $this->purchaseLineId = $purchaseLineId;
  299. return $this;
  300. }
  301. public function getShippingExcluded(): ?bool
  302. {
  303. return $this->shippingExcluded;
  304. }
  305. /**
  306. * @return CartProduct
  307. */
  308. public function setShippingExcluded(?bool $shippingExcluded): CartProduct
  309. {
  310. $this->shippingExcluded = $shippingExcluded;
  311. return $this;
  312. }
  313. /**
  314. * @return string|null
  315. */
  316. public function getInternalReference(): ?string
  317. {
  318. return $this->internalReference;
  319. }
  320. /**
  321. * @param string|null $internalReference
  322. *
  323. * @return CartProduct
  324. */
  325. public function setInternalReference(?string $internalReference): CartProduct
  326. {
  327. $this->internalReference = $internalReference;
  328. return $this;
  329. }
  330. public function isExternStock3To5(): ?bool
  331. {
  332. return $this->externStock3To5;
  333. }
  334. public function setExternStock3To5(bool $externStock3To5): CartProduct
  335. {
  336. $this->externStock3To5 = $externStock3To5;
  337. return $this;
  338. }
  339. /**
  340. * @return int|null
  341. */
  342. public function getShop360Topic(): ?int
  343. {
  344. return $this->shop360Topic;
  345. }
  346. /**
  347. * @param int|null $shop360Topic
  348. *
  349. * @return CartProduct
  350. */
  351. public function setShop360Topic(?int $shop360Topic): CartProduct
  352. {
  353. $this->shop360Topic = $shop360Topic;
  354. return $this;
  355. }
  356. }