package com.yonge.cooleshow.biz.dal.vo.coupon;

import com.baomidou.mybatisplus.annotation.TableField;
import com.yonge.cooleshow.biz.dal.enums.ClientEnum;
import com.yonge.cooleshow.biz.dal.enums.SendTypeEnum;
import com.yonge.cooleshow.biz.dal.enums.coupon.CouponCategoryEnum;
import com.yonge.cooleshow.biz.dal.enums.coupon.CouponTypeEnum;
import com.yonge.cooleshow.biz.dal.enums.coupon.CouponUseStateEnum;
import io.swagger.annotations.ApiModelProperty;

import java.math.BigDecimal;
import java.util.Optional;

/**
 * Description
 *
 * @author liujunchi
 * @date 2022-09-05
 */
public class CouponIssueWrapper {

    @ApiModelProperty("用户id")
    private Long userId;

    @ApiModelProperty("优惠券发放id")
    private Long couponIssueId;

    @ApiModelProperty("优惠券id")
    private Long couponId;

    @ApiModelProperty("使用类型")
    private CouponCategoryEnum useType;

    @ApiModelProperty("优惠券名称")
    private String couponName;

    @ApiModelProperty("优惠券类型 ")
    private CouponTypeEnum couponType;

    @ApiModelProperty("可用品类 UNIVERSAL：全场通用 VIP：小酷Ai PIANO：云酷琴房 MALL：商场购物券 MUSIC：单曲点播券 SPARRING：陪练课购买券 LIVE：直播课购买券  VIDEO：视频课购买券")
    private CouponCategoryEnum couponCategory;


    @ApiModelProperty("用户实名")
    private String realName;

    @ApiModelProperty("用户昵称")
    private String username;

    @ApiModelProperty("用户手机号")
    private String phone;

    @ApiModelProperty("客户端类型 TEACHER :老师端 STUDENT:学生端")
    private ClientEnum clientType;

    @ApiModelProperty("使用状态 USED:已使用 USABLE：未使用 EXPIRED：过期")
    private CouponUseStateEnum useState;

    @ApiModelProperty("订单号")
    private String orderNo;

    @ApiModelProperty("有效期开始时间")
    private Long startTime;

    @ApiModelProperty("有效期结束时间")
    private Long endTime;

    @ApiModelProperty("发放时间")
    private Long issueTime;

    @ApiModelProperty("使用时间")
    private Long useTime;

    @ApiModelProperty("发放途径PLATFORM：后台发放 ACTIVITY：活动领取")
    private SendTypeEnum issueWay;

    @ApiModelProperty("发放人id")
    private Long issuer;

    @ApiModelProperty("发放人昵称")
    private String issueUsername;

    @ApiModelProperty("发放人实名")
    private String issueRealName;

    @ApiModelProperty("使用门槛")
    private BigDecimal useLimit;

    @ApiModelProperty("优惠金额")
    private BigDecimal discountPrice;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("可用数量")
    private Long usable;

    public CouponCategoryEnum getUseType() {
        return useType;
    }

    public void setUseType(CouponCategoryEnum useType) {
        this.useType = useType;
    }

    public Long getUsable() {
        return usable;
    }

    public void setUsable(Long usable) {
        this.usable = usable;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public BigDecimal getUseLimit() {
        return useLimit;
    }

    public void setUseLimit(BigDecimal useLimit) {
        this.useLimit = useLimit;
    }

    public BigDecimal getDiscountPrice() {
        return discountPrice;
    }

    public void setDiscountPrice(BigDecimal discountPrice) {
        this.discountPrice = discountPrice;
    }

    public CouponTypeEnum getCouponType() {
        return couponType;
    }

    public void setCouponType(CouponTypeEnum couponType) {
        this.couponType = couponType;
    }

    public CouponCategoryEnum getCouponCategory() {
        return couponCategory;
    }

    public void setCouponCategory(CouponCategoryEnum couponCategory) {
        this.couponCategory = couponCategory;
    }

    public Long getCouponId() {
        return couponId;
    }

    public void setCouponId(Long couponId) {
        this.couponId = couponId;
    }

    public String getCouponName() {
        return couponName;
    }

    public void setCouponName(String couponName) {
        this.couponName = couponName;
    }

    public Long getIssuer() {
        return issuer;
    }

    public void setIssuer(Long issuer) {
        this.issuer = issuer;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getCouponIssueId() {
        return couponIssueId;
    }

    public void setCouponIssueId(Long couponIssueId) {
        this.couponIssueId = couponIssueId;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public ClientEnum getClientType() {
        return clientType;
    }

    public void setClientType(ClientEnum clientType) {
        this.clientType = clientType;
    }

    public CouponUseStateEnum getUseState() {
        return useState;
    }

    public void setUseState(CouponUseStateEnum useState) {
        this.useState = useState;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public Long getStartTime() {
        return startTime;
    }

    public void setStartTime(Long startTime) {
        this.startTime = startTime;
    }

    public Long getEndTime() {
        return endTime;
    }

    public void setEndTime(Long endTime) {
        this.endTime = endTime;
    }

    public Long getIssueTime() {
        return issueTime;
    }

    public void setIssueTime(Long issueTime) {
        this.issueTime = issueTime;
    }

    public Long getUseTime() {
        return Optional.ofNullable(useTime).filter(x -> x > 0).orElse(null);
    }

    public void setUseTime(Long useTime) {
        this.useTime = useTime;
    }

    public SendTypeEnum getIssueWay() {
        return issueWay;
    }

    public void setIssueWay(SendTypeEnum issueWay) {
        this.issueWay = issueWay;
    }

    public String getIssueUsername() {
        return issueUsername;
    }

    public void setIssueUsername(String issueUsername) {
        this.issueUsername = issueUsername;
    }

    public String getIssueRealName() {
        return issueRealName;
    }

    public void setIssueRealName(String issueRealName) {
        this.issueRealName = issueRealName;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
}
