|
@@ -1,30 +1,43 @@
|
|
|
package com.caimei.modules.coupon.entity;
|
|
|
|
|
|
-import java.io.Serializable;
|
|
|
+import com.fasterxml.jackson.annotation.JsonFormat;
|
|
|
+import com.thinkgem.jeesite.common.persistence.DataEntity;
|
|
|
+import org.hibernate.validator.constraints.Length;
|
|
|
+
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.util.Date;
|
|
|
|
|
|
/**
|
|
|
- * Description
|
|
|
+ * 优惠券管理Entity
|
|
|
*
|
|
|
- * @author : plf
|
|
|
- * @date : 2021/8/5
|
|
|
+ * @author plf
|
|
|
+ * @version 2021-08-10
|
|
|
*/
|
|
|
-public class CmCouponClub implements Serializable {
|
|
|
- private Integer id;
|
|
|
- private Integer userId; //机构用户Id
|
|
|
- private Integer couponId; //优惠券id
|
|
|
- private String source; //领取渠道:1小程序 2网站 3订单退回
|
|
|
- private String status; //使用状态 1未使用 2已使用
|
|
|
- private Date createDate; //领取时间
|
|
|
- private Date useDate; //使用时间
|
|
|
- private String delFlag; //删除标记 0否 其余是
|
|
|
+public class CmCouponClub extends DataEntity<CmCouponClub> {
|
|
|
+
|
|
|
+ private static final long serialVersionUID = 1L;
|
|
|
+ private Integer userId; // 机构用户Id
|
|
|
+ private Integer couponId; // 优惠券id
|
|
|
+ private Integer orderId; // 订单id
|
|
|
+ private String source; // 领取渠道:1小程序 2网站 3订单退回
|
|
|
+ private String status; // 使用状态 1未使用 2已使用
|
|
|
+ private Date useDate; // 使用时间
|
|
|
+ private String clubName; //机构名称
|
|
|
+ private Integer couponType; // 劵类型 0活动券 1品类券 2用户专享券 3店铺券 4新用户券
|
|
|
+ private Integer num; //可用券的数量
|
|
|
+ private BigDecimal couponAmount; // 优惠券金额(面值)
|
|
|
+ private BigDecimal touchPrice; // 优惠满减条件金额
|
|
|
+ private String couponStatus; // 状态 0未生效 1已生效 2已关闭 3已失效
|
|
|
+ private Date startDate; // 使用开始时间(有效期)
|
|
|
+ private Date endDate; // 使用结束时间(有效期)
|
|
|
+ private String orderNo; //订单编号
|
|
|
|
|
|
- public Integer getId() {
|
|
|
- return id;
|
|
|
+ public CmCouponClub() {
|
|
|
+ super();
|
|
|
}
|
|
|
|
|
|
- public void setId(Integer id) {
|
|
|
- this.id = id;
|
|
|
+ public CmCouponClub(String id) {
|
|
|
+ super(id);
|
|
|
}
|
|
|
|
|
|
public Integer getUserId() {
|
|
@@ -43,6 +56,15 @@ public class CmCouponClub implements Serializable {
|
|
|
this.couponId = couponId;
|
|
|
}
|
|
|
|
|
|
+ public Integer getOrderId() {
|
|
|
+ return orderId;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setOrderId(Integer orderId) {
|
|
|
+ this.orderId = orderId;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Length(min = 0, max = 1, message = "领取渠道:1小程序 2网站 3订单退回长度必须介于 0 和 1 之间")
|
|
|
public String getSource() {
|
|
|
return source;
|
|
|
}
|
|
@@ -51,6 +73,7 @@ public class CmCouponClub implements Serializable {
|
|
|
this.source = source;
|
|
|
}
|
|
|
|
|
|
+ @Length(min = 0, max = 10, message = "使用状态 1未使用 2已使用长度必须介于 0 和 10 之间")
|
|
|
public String getStatus() {
|
|
|
return status;
|
|
|
}
|
|
@@ -59,14 +82,7 @@ public class CmCouponClub implements Serializable {
|
|
|
this.status = status;
|
|
|
}
|
|
|
|
|
|
- public Date getCreateDate() {
|
|
|
- return createDate;
|
|
|
- }
|
|
|
-
|
|
|
- public void setCreateDate(Date createDate) {
|
|
|
- this.createDate = createDate;
|
|
|
- }
|
|
|
-
|
|
|
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
|
|
public Date getUseDate() {
|
|
|
return useDate;
|
|
|
}
|
|
@@ -75,11 +91,75 @@ public class CmCouponClub implements Serializable {
|
|
|
this.useDate = useDate;
|
|
|
}
|
|
|
|
|
|
- public String getDelFlag() {
|
|
|
- return delFlag;
|
|
|
+ public String getClubName() {
|
|
|
+ return clubName;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setClubName(String clubName) {
|
|
|
+ this.clubName = clubName;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Integer getCouponType() {
|
|
|
+ return couponType;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setCouponType(Integer couponType) {
|
|
|
+ this.couponType = couponType;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Integer getNum() {
|
|
|
+ return num;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setNum(Integer num) {
|
|
|
+ this.num = num;
|
|
|
+ }
|
|
|
+
|
|
|
+ public BigDecimal getCouponAmount() {
|
|
|
+ return couponAmount;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setCouponAmount(BigDecimal couponAmount) {
|
|
|
+ this.couponAmount = couponAmount;
|
|
|
+ }
|
|
|
+
|
|
|
+ public BigDecimal getTouchPrice() {
|
|
|
+ return touchPrice;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setTouchPrice(BigDecimal touchPrice) {
|
|
|
+ this.touchPrice = touchPrice;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getCouponStatus() {
|
|
|
+ return couponStatus;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setCouponStatus(String couponStatus) {
|
|
|
+ this.couponStatus = couponStatus;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Date getStartDate() {
|
|
|
+ return startDate;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setStartDate(Date startDate) {
|
|
|
+ this.startDate = startDate;
|
|
|
+ }
|
|
|
+
|
|
|
+ public Date getEndDate() {
|
|
|
+ return endDate;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setEndDate(Date endDate) {
|
|
|
+ this.endDate = endDate;
|
|
|
+ }
|
|
|
+
|
|
|
+ public String getOrderNo() {
|
|
|
+ return orderNo;
|
|
|
}
|
|
|
|
|
|
- public void setDelFlag(String delFlag) {
|
|
|
- this.delFlag = delFlag;
|
|
|
+ public void setOrderNo(String orderNo) {
|
|
|
+ this.orderNo = orderNo;
|
|
|
}
|
|
|
-}
|
|
|
+}
|