package com.yonge.cooleshow.biz.dal.queryInfo;

import com.alibaba.fastjson.JSON;
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 org.joda.time.DateTime;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * Description
 *
 * @author liujunchi
 * @date 2022-09-02
 */
public class CouponIssueQueryInfo implements Serializable {

    // 优惠券id
    private Long couponId;
    // 用户id
    private Long userId;

    // 真实姓名/昵称/手机号/编号
    private String keyword;

    // 客户端 TEACHER  STUDENT
    private ClientEnum clientType;

    // 发放方式 PLATFORM ACTIVITY
    private SendTypeEnum issueWay;

    // 使用状态 USED USABLE EXPIRED
    private CouponUseStateEnum useState;

    //  发放开始时间
    private Long issueStartTime;

    // 发放结束时间
    private Long issueEndTime;

    //  使用开始时间
    private Long usedStartTime;

    // 使用结束时间
    private Long usedEndTime;


    // 优惠券编号/名称
    private String couponKeyword;

    // 优惠券类型
    private CouponTypeEnum couponType;

    // 订单金额
    private BigDecimal amount;

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

    // 可用品类
    private List<CouponCategoryEnum> couponCategoryList;

    // 是否订单使用
    private Integer orderUse;

    // 过期时间
    private Long expiredTime = DateTime.now().getMillis();

    public Integer getOrderUse() {
        return orderUse;
    }

    public void setOrderUse(Integer orderUse) {
        this.orderUse = orderUse;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public List<CouponCategoryEnum> getCouponCategoryList() {
        return couponCategoryList;
    }

    public void setCouponCategoryList(List<CouponCategoryEnum> couponCategoryList) {
        this.couponCategoryList = couponCategoryList;
    }

    public Long getExpiredTime() {
        return expiredTime;
    }

    public void setExpiredTime(Long expiredTime) {
        this.expiredTime = expiredTime;
    }

    public static CouponIssueQueryInfo from(String recv) {

        return JSON.parseObject(recv, CouponIssueQueryInfo.class);
    }

    public String getCouponKeyword() {
        return couponKeyword;
    }

    public void setCouponKeyword(String couponKeyword) {
        this.couponKeyword = couponKeyword;
    }

    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 getUserId() {
        return userId;
    }

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

    public String getKeyword() {
        return keyword;
    }

    public void setKeyword(String keyword) {
        this.keyword = keyword;
    }

    public ClientEnum getClientType() {
        return clientType;
    }

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

    public SendTypeEnum getIssueWay() {
        return issueWay;
    }

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

    public Long getCouponId() {
        return couponId;
    }

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

    public CouponUseStateEnum getUseState() {
        return useState;
    }

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

    public Long getIssueStartTime() {
        return issueStartTime;
    }

    public void setIssueStartTime(Long issueStartTime) {
        this.issueStartTime = issueStartTime;
    }

    public Long getIssueEndTime() {
        return issueEndTime;
    }

    public void setIssueEndTime(Long issueEndTime) {
        this.issueEndTime = issueEndTime;
    }

    public Long getUsedStartTime() {
        return usedStartTime;
    }

    public void setUsedStartTime(Long usedStartTime) {
        this.usedStartTime = usedStartTime;
    }

    public Long getUsedEndTime() {
        return usedEndTime;
    }

    public void setUsedEndTime(Long usedEndTime) {
        this.usedEndTime = usedEndTime;
    }
}
