package com.iformall.domain.vo;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.iformall.domain.po.WxCouponChannel;
import javax.persistence.Transient;
import java.io.Serializable;
import java.math.BigDecimal;

import java.util.Date;
import java.util.List;

/**
 * Created by syf on 2018/8/22.
 */
@JsonIgnoreProperties(value = {"handler"})
public class WxCouponChannelVo extends WxCouponChannel implements Serializable {
    private static final long serialVersionUID = 1L;

    @Transient
    private Integer activityStatus;

    public Integer getActivityStatus() {
        return activityStatus;
    }

    public void setActivityStatus(Integer activityStatus) {
        this.activityStatus = activityStatus;
    }



    /*总库存**/
    @io.swagger.annotations.ApiModelProperty(value="总库存",name="inventory")
    private Integer inventory;
    /*剩余库存**/
    @io.swagger.annotations.ApiModelProperty(value="剩余库存",name="remainInventory")
    private Integer remainInventory;
    /*封面图**/
    @io.swagger.annotations.ApiModelProperty(value="封面图",name="coverImg")
    private String coverImg;
    /*券名称**/
    @io.swagger.annotations.ApiModelProperty(value="券名称",name="title")
    private String title;
    /*副标题**/
    @io.swagger.annotations.ApiModelProperty(value="副标题",name="subTitle")
    private String subTitle;
    /*售价（适用于类型2，3，4，5）**/
    @io.swagger.annotations.ApiModelProperty(value="售价（适用于类型2，3，4，5）",name="salePrice")
    private Integer salePrice;
    /*使用条件金额（适用于类型1,2,3,4）**/
    @io.swagger.annotations.ApiModelProperty(value="使用条件金额（适用于类型1,2,3,4）",name="usePrice")
    private Integer usePrice;
    /*面额**/
    @io.swagger.annotations.ApiModelProperty(value="面额",name="price")
    private Integer price;
    /*单位**/
    @io.swagger.annotations.ApiModelProperty(value="单位0:钱分，1:小时",name="unit")
    private Integer unit;

    /*限领张数**/
    @io.swagger.annotations.ApiModelProperty(value="限领张数",name="useLimitQuantity")
    private Integer useLimitQuantity;

    /*1.主动领取2.定向投放**/
    @io.swagger.annotations.ApiModelProperty(value="1.主动领取2.定向投放",name="sendType")
    private Integer sendType;

    /**过期退款(0:正常,1不退)**/
    @io.swagger.annotations.ApiModelProperty(value="过期退款(0:正常,1不退)",name="autoRefund")
    private Integer autoRefund;

    /**有效时间类型1.时间范围(valid_start_date,valid_end_date). 2领取后几日有效(valid_days)**/
    @io.swagger.annotations.ApiModelProperty(value="有效时间类型1.时间范围(valid_start_date,valid_end_date). 2领取后几日有效(valid_days)",name="validType")
    private Integer validType;
    /**有效日期-开始**/
    @io.swagger.annotations.ApiModelProperty(value="有效日期-开始",name="validStartDate")
    private Date validStartDate;
    /**有效日期-结束**/
    @io.swagger.annotations.ApiModelProperty(value="有效日期-结束",name="validEndDate")
    private Date validEndDate;
    /**自领取之日几日有效，（停车券当天有效）**/
    @io.swagger.annotations.ApiModelProperty(value="自领取之日几日有效，（停车券当天有效）",name="validDays")
    private Integer validDays;

    @Transient
    private String salePriceStr;

    @Transient
    private String usePriceStr;

    @Transient
    private String priceStr;

    /*发券商户信息*/
    @io.swagger.annotations.ApiModelProperty(value="商户列表",name="merchantVoList")
    private List<WxMerchantVo> merchantVoList;

    @Transient
    private Integer gameWeight;

    @io.swagger.annotations.ApiModelProperty(value = "是否可转赠", name = "supportTransfer")
    private Integer supportTransfer;

    @io.swagger.annotations.ApiModelProperty(value = "砍价/拼团人数", name = "pressLimitNum")
    private Integer pressLimitNum;




    public Integer getGameWeight() {
        return gameWeight;
    }

    public void setGameWeight(Integer gameWeight) {
        this.gameWeight = gameWeight;
    }

    public Integer getInventory() {
        return inventory;
    }

    public void setInventory(Integer inventory) {
        this.inventory = inventory;
    }

    public Integer getRemainInventory() {
        return remainInventory;
    }

    public void setRemainInventory(Integer remainInventory) {
        this.remainInventory = remainInventory;
    }

    public String getCoverImg() {
        return coverImg;
    }

    public void setCoverImg(String coverImg) {
        this.coverImg = coverImg;
    }

    public String getSubTitle() {
        return subTitle;
    }

    public void setSubTitle(String subTitle) {
        this.subTitle = subTitle;
    }

    public Integer getSalePrice() {
        return salePrice;
    }

    public void setSalePrice(Integer salePrice) {
        this.salePrice = salePrice;
    }

    public Integer getUsePrice() {
        return usePrice;
    }

    public void setUsePrice(Integer usePrice) {
        this.usePrice = usePrice;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }

    public Integer getPrice() {
        return price;
    }

    public Integer getUnit() {
        return unit;
    }

    public void setUnit(Integer unit) {
        this.unit = unit;
    }

    public Integer getUseLimitQuantity() {
        return useLimitQuantity;
    }

    public void setUseLimitQuantity(Integer useLimitQuantity) {
        this.useLimitQuantity = useLimitQuantity;
    }

    public Integer getSendType() {
        return sendType;
    }

    public void setSendType(Integer sendType) {
        this.sendType = sendType;
    }

    public String getSalePriceStr() {
        if(salePrice!=null) {
            salePriceStr = new BigDecimal(salePrice).divide(new BigDecimal(100)).toString();
        }
        return salePriceStr;
    }

    public void setSalePriceStr(String salePriceStr) {
        this.salePriceStr = salePriceStr;
    }

    public String getUsePriceStr() {
        if(usePrice!=null) {
            usePriceStr = new BigDecimal(usePrice).divide(new BigDecimal(100)).toString();
        }
        return usePriceStr;
    }

    public void setUsePriceStr(String usePriceStr) {
        this.usePriceStr = usePriceStr;
    }

    public String getPriceStr() {
        if(price!=null) {
            priceStr = new BigDecimal(price).divide(new BigDecimal(100)).toString();
        }
        return priceStr;
    }

    public void setPriceStr(String priceStr) {
        this.priceStr = priceStr;
    }

    public List<WxMerchantVo> getMerchantVoList() {
        return merchantVoList;
    }

    public void setMerchantVoList(List<WxMerchantVo> merchantVoList) {
        this.merchantVoList = merchantVoList;
    }

    public Integer getSupportTransfer() {
        return supportTransfer;
    }

    public void setSupportTransfer(Integer supportTransfer) {
        this.supportTransfer = supportTransfer;
    }

    @Override
    public String getTitle() {
        return title;
    }

    @Override
    public void setTitle(String title) {
        this.title = title;
    }

    public Integer getPressLimitNum() {
        return pressLimitNum;
    }

    public void setPressLimitNum(Integer pressLimitNum) {
        this.pressLimitNum = pressLimitNum;
    }

    public Integer getAutoRefund() {
        return autoRefund;
    }

    public void setAutoRefund(Integer autoRefund) {
        this.autoRefund = autoRefund;
    }

    public Integer getValidType() {
        return validType;
    }

    public void setValidType(Integer validType) {
        this.validType = validType;
    }

    public Date getValidStartDate() {
        return validStartDate;
    }

    public void setValidStartDate(Date validStartDate) {
        this.validStartDate = validStartDate;
    }

    public Date getValidEndDate() {
        return validEndDate;
    }

    public void setValidEndDate(Date validEndDate) {
        this.validEndDate = validEndDate;
    }

    public Integer getValidDays() {
        return validDays;
    }

    public void setValidDays(Integer validDays) {
        this.validDays = validDays;
    }
}
