CartEntity.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <?php
  2. namespace app\entity\data\store;
  3. use app\entity\data\DataEntity;
  4. class CartEntity extends DataEntity
  5. {
  6. public $cartId = 0; // 购物车表ID
  7. public $uid = 0; // 用户ID
  8. public $merId = 0; // 商户ID
  9. public $productType = 0; // 类型 0=普通产品
  10. public $productId = 0; // 商品ID
  11. public $productAttrUnique = ''; // 商品属性
  12. public $cartNum = 0; // 商品数量
  13. public $createTime = null; // 添加时间
  14. public $source = 0; // 来源 1=直播间
  15. public $sourceId = 0; // 来源关联ID
  16. public $isPay = 0; // 0 = 未购买 1 = 已购买
  17. public $isDel = 0; // 是否删除
  18. public $isNew = 0; // 是否为立即购买
  19. public $isFail = 0; // 是否失效
  20. public function getCartId(): int
  21. {
  22. return $this->cartId;
  23. }
  24. public function setCartId(int $cartId): CartEntity
  25. {
  26. $this->cartId = $cartId;
  27. return $this;
  28. }
  29. public function getUid(): int
  30. {
  31. return $this->uid;
  32. }
  33. public function setUid(int $uid): CartEntity
  34. {
  35. $this->uid = $uid;
  36. return $this;
  37. }
  38. public function getMerId(): int
  39. {
  40. return $this->merId;
  41. }
  42. public function setMerId(int $merId): CartEntity
  43. {
  44. $this->merId = $merId;
  45. return $this;
  46. }
  47. public function getProductType(): int
  48. {
  49. return $this->productType;
  50. }
  51. public function setProductType(int $productType): CartEntity
  52. {
  53. $this->productType = $productType;
  54. return $this;
  55. }
  56. public function getProductId(): int
  57. {
  58. return $this->productId;
  59. }
  60. public function setProductId(int $productId): CartEntity
  61. {
  62. $this->productId = $productId;
  63. return $this;
  64. }
  65. public function getProductAttrUnique(): string
  66. {
  67. return $this->productAttrUnique;
  68. }
  69. public function setProductAttrUnique(string $productAttrUnique): CartEntity
  70. {
  71. $this->productAttrUnique = $productAttrUnique;
  72. return $this;
  73. }
  74. public function getCartNum(): int
  75. {
  76. return $this->cartNum;
  77. }
  78. public function setCartNum(int $cartNum): CartEntity
  79. {
  80. $this->cartNum = $cartNum;
  81. return $this;
  82. }
  83. /**
  84. * @return null
  85. */
  86. public function getCreateTime()
  87. {
  88. return $this->createTime;
  89. }
  90. /**
  91. * @param null $createTime
  92. * @return CartEntity
  93. */
  94. public function setCreateTime($createTime)
  95. {
  96. $this->createTime = $createTime;
  97. return $this;
  98. }
  99. public function getSource(): int
  100. {
  101. return $this->source;
  102. }
  103. public function setSource(int $source): CartEntity
  104. {
  105. $this->source = $source;
  106. return $this;
  107. }
  108. public function getSourceId(): int
  109. {
  110. return $this->sourceId;
  111. }
  112. public function setSourceId(int $sourceId): CartEntity
  113. {
  114. $this->sourceId = $sourceId;
  115. return $this;
  116. }
  117. public function getIsPay(): int
  118. {
  119. return $this->isPay;
  120. }
  121. public function setIsPay(int $isPay): CartEntity
  122. {
  123. $this->isPay = $isPay;
  124. return $this;
  125. }
  126. public function getIsDel(): int
  127. {
  128. return $this->isDel;
  129. }
  130. public function setIsDel(int $isDel): CartEntity
  131. {
  132. $this->isDel = $isDel;
  133. return $this;
  134. }
  135. public function getIsNew(): int
  136. {
  137. return $this->isNew;
  138. }
  139. public function setIsNew(int $isNew): CartEntity
  140. {
  141. $this->isNew = $isNew;
  142. return $this;
  143. }
  144. public function getIsFail(): int
  145. {
  146. return $this->isFail;
  147. }
  148. public function setIsFail(int $isFail): CartEntity
  149. {
  150. $this->isFail = $isFail;
  151. return $this;
  152. }
  153. }