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. * @var bool
  74. *
  75. * @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
  76. */
  77. private $futureStock;
  78. /**
  79. * @var bool
  80. *
  81. * @ORM\Column(type="boolean", nullable=true, options={"default" : 0})
  82. */
  83. private $externStock;
  84. /**
  85. * @var string|null
  86. *
  87. * @ORM\Column(type="string", nullable=true, length=50, options={"default" : "0"})
  88. */
  89. private $purchaseOrder;
  90. /**
  91. * @var int|null
  92. *
  93. * @ORM\Column(name="id_purchase_line", type="integer", length=11, nullable=true, options={"default" : 0})
  94. */
  95. private $purchaseLineId;
  96. /**
  97. * @var int|null
  98. *
  99. * @ORM\Column(name="envio_excluido", type="boolean", nullable=true, options={"default" : 0})
  100. */
  101. private $shippingExcluded;
  102. /**
  103. * @var string|null
  104. *
  105. * @ORM\Column(type="string", nullable=true, length=100)
  106. */
  107. private $internalReference;
  108. /**
  109. * @var bool
  110. *
  111. * @ORM\Column(name="extern_stock_3_5", type="boolean", nullable=true, options={"default" : 0})
  112. */
  113. private $externStock3To5;
  114. /**
  115. * @ORM\Column(name="shop_360_topic", type="integer", length=2, nullable=true)
  116. */
  117. private ?int $shop360Topic = null;
  118. public function __construct()
  119. {
  120. $this->futureStock = false;
  121. $this->externStock = false;
  122. $this->externStock3To5 = false;
  123. }
  124. /**
  125. * @return int
  126. */
  127. public function getId(): int
  128. {
  129. return $this->id;
  130. }
  131. /**
  132. * @param int|null $id
  133. *
  134. * @return CartProduct
  135. */
  136. public function setId(?int $id): CartProduct
  137. {
  138. $this->id = $id;
  139. return $this;
  140. }
  141. /**
  142. * @return Cart
  143. */
  144. public function getCart(): Cart
  145. {
  146. return $this->cart;
  147. }
  148. /**
  149. * @param Cart $cart
  150. *
  151. * @return CartProduct
  152. */
  153. public function setCart(Cart $cart): CartProduct
  154. {
  155. $this->cart = $cart;
  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 CartProduct
  169. */
  170. public function setProductId(int $productId): CartProduct
  171. {
  172. $this->productId = $productId;
  173. return $this;
  174. }
  175. /**
  176. * @return int|null
  177. */
  178. public function getProductAttributeId(): ?int
  179. {
  180. return $this->productAttributeId;
  181. }
  182. /**
  183. * @param int|null $productAttributeId
  184. *
  185. * @return CartProduct
  186. */
  187. public function setProductAttributeId(?int $productAttributeId): CartProduct
  188. {
  189. $this->productAttributeId = $productAttributeId;
  190. return $this;
  191. }
  192. /**
  193. * @return int|null
  194. */
  195. public function getQuantity(): ?int
  196. {
  197. return $this->quantity;
  198. }
  199. /**
  200. * @param int $quantity
  201. *
  202. * @return CartProduct
  203. */
  204. public function setQuantity(int $quantity): CartProduct
  205. {
  206. $this->quantity = $quantity;
  207. return $this;
  208. }
  209. /**
  210. * @return \DateTime|null
  211. */
  212. public function getDateAdd(): ?\DateTime
  213. {
  214. return $this->dateAdd;
  215. }
  216. /**
  217. * @param \DateTime $dateAdd
  218. *
  219. * @return CartProduct
  220. */
  221. public function setDateAdd(\DateTime $dateAdd): CartProduct
  222. {
  223. $this->dateAdd = $dateAdd;
  224. return $this;
  225. }
  226. /**
  227. * @return \DateTime
  228. */
  229. public function getDateUpd(): \DateTime
  230. {
  231. return $this->dateUpd;
  232. }
  233. /**
  234. * @param \DateTime $dateUpd
  235. *
  236. * @return CartProduct
  237. */
  238. public function setDateUpd(\DateTime $dateUpd): CartProduct
  239. {
  240. $this->dateUpd = $dateUpd;
  241. return $this;
  242. }
  243. /**
  244. * @return int|null
  245. */
  246. public function getLocks(): ?int
  247. {
  248. return $this->locks;
  249. }
  250. /**
  251. * @param int|null $locks
  252. *
  253. * @return CartProduct
  254. */
  255. public function setLocks(?int $locks): CartProduct
  256. {
  257. $this->locks = $locks;
  258. return $this;
  259. }
  260. public function getFutureStock(): bool
  261. {
  262. return $this->futureStock;
  263. }
  264. public function setFutureStock(bool $futureStock): CartProduct
  265. {
  266. $this->futureStock = $futureStock;
  267. return $this;
  268. }
  269. public function getExternStock(): ?bool
  270. {
  271. return $this->externStock;
  272. }
  273. public function setExternStock(bool $externStock): CartProduct
  274. {
  275. $this->externStock = $externStock;
  276. return $this;
  277. }
  278. /**
  279. * @return string|null
  280. */
  281. public function getPurchaseOrder(): ?string
  282. {
  283. return $this->purchaseOrder;
  284. }
  285. /**
  286. * @param string|null $purchaseOrder
  287. *
  288. * @return CartProduct
  289. */
  290. public function setPurchaseOrder(?string $purchaseOrder): CartProduct
  291. {
  292. $this->purchaseOrder = $purchaseOrder;
  293. return $this;
  294. }
  295. /**
  296. * @return int|null
  297. */
  298. public function getPurchaseLineId(): ?int
  299. {
  300. return $this->purchaseLineId;
  301. }
  302. /**
  303. * @param int|null $purchaseLineId
  304. *
  305. * @return CartProduct
  306. */
  307. public function setPurchaseLineId(?int $purchaseLineId): CartProduct
  308. {
  309. $this->purchaseLineId = $purchaseLineId;
  310. return $this;
  311. }
  312. /**
  313. * @return int|null
  314. */
  315. public function getShippingExcluded(): ?int
  316. {
  317. return $this->shippingExcluded;
  318. }
  319. /**
  320. * @param int|null $shippingExcluded
  321. *
  322. * @return CartProduct
  323. */
  324. public function setShippingExcluded(?int $shippingExcluded): CartProduct
  325. {
  326. $this->shippingExcluded = $shippingExcluded;
  327. return $this;
  328. }
  329. /**
  330. * @return string|null
  331. */
  332. public function getInternalReference(): ?string
  333. {
  334. return $this->internalReference;
  335. }
  336. /**
  337. * @param string|null $internalReference
  338. *
  339. * @return CartProduct
  340. */
  341. public function setInternalReference(?string $internalReference): CartProduct
  342. {
  343. $this->internalReference = $internalReference;
  344. return $this;
  345. }
  346. public function isExternStock3To5(): bool
  347. {
  348. return $this->externStock3To5;
  349. }
  350. public function setExternStock3To5(bool $externStock3To5): CartProduct
  351. {
  352. $this->externStock3To5 = $externStock3To5;
  353. return $this;
  354. }
  355. /**
  356. * @return int|null
  357. */
  358. public function getShop360Topic(): ?int
  359. {
  360. return $this->shop360Topic;
  361. }
  362. /**
  363. * @param int|null $shop360Topic
  364. *
  365. * @return CartProduct
  366. */
  367. public function setShop360Topic(?int $shop360Topic): CartProduct
  368. {
  369. $this->shop360Topic = $shop360Topic;
  370. return $this;
  371. }
  372. }