CmCoupon.java 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343
  1. package com.caimei.modules.coupon.entity;
  2. import com.caimei.modules.user.entity.NewCmShop;
  3. import com.fasterxml.jackson.annotation.JsonFormat;
  4. import com.thinkgem.jeesite.common.persistence.DataEntity;
  5. import org.hibernate.validator.constraints.Length;
  6. import java.math.BigDecimal;
  7. import java.util.Date;
  8. import java.util.List;
  9. /**
  10. * 优惠券管理Entity
  11. *
  12. * @author plf
  13. * @version 2021-08-02
  14. */
  15. public class CmCoupon extends DataEntity<CmCoupon> {
  16. private static final long serialVersionUID = 1L;
  17. private String name; // 活动主题
  18. private BigDecimal couponAmount; // 优惠券金额(面值)
  19. private BigDecimal touchPrice; // 优惠满减条件金额
  20. private Date startDate; // 使用开始时间(有效期)
  21. private Date endDate; // 使用结束时间(有效期)
  22. private Integer receivePeriod; // 领取期限(天)
  23. private Integer receiveFlag; // 领取期限同开始-结束时间
  24. private Integer usePeriod; // 使用期限(天)
  25. private String status; // 状态 0未生效 1已生效 2已关闭 3已失效
  26. private Integer couponType; // 劵类型 0活动券 1品类券 2用户专享券 3店铺券 4新用户券
  27. private Integer vipFlag; // 超级会员专享优惠券标志:0否,1是
  28. private Integer userId; //机构用户id(用户专享券有效)
  29. private Integer shopId; //供应商id(店铺券有效)
  30. private String productType; // 优惠商品:1全商城商品 2指定商品(活动券有效)
  31. private String pcBanner; //网站活动页banner
  32. private String appletsBanner; //小程序活动页banner
  33. private String categoryType; // 优惠品类:1产品 2仪器(品类券有效)
  34. private String couponsMode; // 领券方式:0正常 1使用兑换码
  35. private String productInfo; //商品json数据
  36. private String clubName; //机构名称
  37. private String claimStatus; //领取状态:1未领取 2已领取
  38. private String useStatus; //使用状态 1未使用 2已使用
  39. private String source; //领取渠道:1小程序 2网站 3订单退回
  40. private String shopName; //供应商名称
  41. private Integer codeNum; //兑换码数量
  42. private Integer clubCouponId; //机构领券id
  43. private String couponName; //优惠券名称
  44. private String couponDesc; //描述
  45. private String redemptionCode; //兑换码
  46. private CmCouponClub couponClub;
  47. private NewCmShop shop;
  48. private List<Integer> productIdList;
  49. private Date receiveDate; // 领取时间
  50. private Date useEndDate; // 使用截止时间
  51. public CmCoupon() {
  52. super();
  53. }
  54. public CmCoupon(String id) {
  55. super(id);
  56. }
  57. @Length(min = 0, max = 50, message = "活动主题长度必须介于 0 和 50 之间")
  58. public String getName() {
  59. return name;
  60. }
  61. public void setName(String name) {
  62. this.name = name;
  63. }
  64. public BigDecimal getCouponAmount() {
  65. return couponAmount;
  66. }
  67. public void setCouponAmount(BigDecimal couponAmount) {
  68. this.couponAmount = couponAmount;
  69. }
  70. public BigDecimal getTouchPrice() {
  71. return touchPrice;
  72. }
  73. public void setTouchPrice(BigDecimal touchPrice) {
  74. this.touchPrice = touchPrice;
  75. }
  76. @JsonFormat(pattern = "yyyy-MM-dd")
  77. public Date getStartDate() {
  78. return startDate;
  79. }
  80. public void setStartDate(Date startDate) {
  81. this.startDate = startDate;
  82. }
  83. @JsonFormat(pattern = "yyyy-MM-dd")
  84. public Date getEndDate() {
  85. return endDate;
  86. }
  87. public void setEndDate(Date endDate) {
  88. this.endDate = endDate;
  89. }
  90. @Length(min = 0, max = 2, message = "状态 0未生效 1已生效 2已关闭长度必须介于 0 和 2 之间")
  91. public String getStatus() {
  92. return status;
  93. }
  94. public void setStatus(String status) {
  95. this.status = status;
  96. }
  97. public Integer getCouponType() {
  98. return couponType;
  99. }
  100. public void setCouponType(Integer couponType) {
  101. this.couponType = couponType;
  102. }
  103. @Length(min = 0, max = 2, message = "优惠商品:1全商城商品 2指定商品(活动券有效)长度必须介于 0 和 2 之间")
  104. public String getProductType() {
  105. return productType;
  106. }
  107. public void setProductType(String productType) {
  108. this.productType = productType;
  109. }
  110. public Integer getVipFlag() {
  111. return vipFlag;
  112. }
  113. public void setVipFlag(Integer vipFlag) {
  114. this.vipFlag = vipFlag;
  115. }
  116. public String getPcBanner() {
  117. return pcBanner;
  118. }
  119. public void setPcBanner(String pcBanner) {
  120. this.pcBanner = pcBanner;
  121. }
  122. public String getAppletsBanner() {
  123. return appletsBanner;
  124. }
  125. public void setAppletsBanner(String appletsBanner) {
  126. this.appletsBanner = appletsBanner;
  127. }
  128. @Length(min = 0, max = 2, message = "优惠品类:1产品 2仪器(品类券有效)长度必须介于 0 和 2 之间")
  129. public String getCategoryType() {
  130. return categoryType;
  131. }
  132. public void setCategoryType(String categoryType) {
  133. this.categoryType = categoryType;
  134. }
  135. @Length(min = 0, max = 2, message = "领券方式:0正常 1使用兑换码长度必须介于 0 和 2 之间")
  136. public String getCouponsMode() {
  137. return couponsMode;
  138. }
  139. public void setCouponsMode(String couponsMode) {
  140. this.couponsMode = couponsMode;
  141. }
  142. public String getProductInfo() {
  143. return productInfo;
  144. }
  145. public void setProductInfo(String productInfo) {
  146. this.productInfo = productInfo;
  147. }
  148. public String getClubName() {
  149. return clubName;
  150. }
  151. public void setClubName(String clubName) {
  152. this.clubName = clubName;
  153. }
  154. public String getClaimStatus() {
  155. return claimStatus;
  156. }
  157. public void setClaimStatus(String claimStatus) {
  158. this.claimStatus = claimStatus;
  159. }
  160. public String getUseStatus() {
  161. return useStatus;
  162. }
  163. public void setUseStatus(String useStatus) {
  164. this.useStatus = useStatus;
  165. }
  166. public String getSource() {
  167. return source;
  168. }
  169. public void setSource(String source) {
  170. this.source = source;
  171. }
  172. public CmCouponClub getCouponClub() {
  173. return couponClub;
  174. }
  175. public void setCouponClub(CmCouponClub couponClub) {
  176. this.couponClub = couponClub;
  177. }
  178. public Integer getUserId() {
  179. return userId;
  180. }
  181. public void setUserId(Integer userId) {
  182. this.userId = userId;
  183. }
  184. public String getShopName() {
  185. return shopName;
  186. }
  187. public void setShopName(String shopName) {
  188. this.shopName = shopName;
  189. }
  190. public Integer getCodeNum() {
  191. return codeNum;
  192. }
  193. public void setCodeNum(Integer codeNum) {
  194. this.codeNum = codeNum;
  195. }
  196. public Integer getShopId() {
  197. return shopId;
  198. }
  199. public void setShopId(Integer shopId) {
  200. this.shopId = shopId;
  201. }
  202. public NewCmShop getShop() {
  203. return shop;
  204. }
  205. public void setShop(NewCmShop shop) {
  206. this.shop = shop;
  207. }
  208. public Integer getClubCouponId() {
  209. return clubCouponId;
  210. }
  211. public void setClubCouponId(Integer clubCouponId) {
  212. this.clubCouponId = clubCouponId;
  213. }
  214. public List<Integer> getProductIdList() {
  215. return productIdList;
  216. }
  217. public void setProductIdList(List<Integer> productIdList) {
  218. this.productIdList = productIdList;
  219. }
  220. public String getCouponName() {
  221. return couponName;
  222. }
  223. public void setCouponName(String couponName) {
  224. this.couponName = couponName;
  225. }
  226. public String getCouponDesc() {
  227. return couponDesc;
  228. }
  229. public void setCouponDesc(String couponDesc) {
  230. this.couponDesc = couponDesc;
  231. }
  232. public String getRedemptionCode() {
  233. return redemptionCode;
  234. }
  235. public void setRedemptionCode(String redemptionCode) {
  236. this.redemptionCode = redemptionCode;
  237. }
  238. public Integer getReceivePeriod() {
  239. return receivePeriod;
  240. }
  241. public void setReceivePeriod(Integer receivePeriod) {
  242. this.receivePeriod = receivePeriod;
  243. }
  244. public Integer getReceiveFlag() {
  245. return receiveFlag;
  246. }
  247. public void setReceiveFlag(Integer receiveFlag) {
  248. this.receiveFlag = receiveFlag;
  249. }
  250. public Integer getUsePeriod() {
  251. return usePeriod;
  252. }
  253. public void setUsePeriod(Integer usePeriod) {
  254. this.usePeriod = usePeriod;
  255. }
  256. public Date getReceiveDate() {
  257. return receiveDate;
  258. }
  259. public void setReceiveDate(Date receiveDate) {
  260. this.receiveDate = receiveDate;
  261. }
  262. public Date getUseEndDate() {
  263. return useEndDate;
  264. }
  265. public void setUseEndDate(Date useEndDate) {
  266. this.useEndDate = useEndDate;
  267. }
  268. }