package cn.ysk.cashier.vo;

import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class TbUserCouponVo {
    private Integer id;
    private BigDecimal fullAmount;
    private BigDecimal discountAmount;
    private Integer couponId;
    private Integer proId;
    // 商品名称
    private String productName;
    private String productCover;
    //优惠券名称
    private String name;

    //优惠券类型 1 满减 2 商品券
    private Integer type;
    //数量
    private Integer num;
    //到期时间
    private Date endTime;
    private Long expireTime;
    private String useRestrictions;
    private boolean isUse = false;
    //当前使用数量
    private BigDecimal currentUseNum;
    private Integer finalUseNum;
    private BigDecimal finalDiscountAmount = new BigDecimal(0);


    public void setEndTime(Date endTime) {
        this.endTime = endTime;
        if(endTime!=null){
            expireTime=endTime.getTime();
        }
    }

}
