package com.iformall.domain.vo;

import com.iformall.domain.po.WxCoupon;

import java.io.Serializable;
import java.util.Date;

/**
 * Created by syf on 2018/9/6.
 * 返回投放错误列表使用
 */
public class WxCouponChannelAddVo implements Serializable {
    private static final long serialVersionUID = 1L;
    private Long couponId;
    private String title;
    private Integer channelId;
    private Date validEndDate;
    private String errorMsg;

    public String getErrorMsg() {
        return errorMsg;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }

    public WxCouponChannelAddVo toCouponChannnelVo(WxCoupon wxCoupon, Integer channelId){
        if ( wxCoupon != null ) {
            this.couponId = wxCoupon.getId();
            this.title = wxCoupon.getTitle();
            this.validEndDate = wxCoupon.getValidEndDate();
        }

        this.channelId = channelId;
        return this;
    }


    public Long getCouponId() {
        return couponId;
    }

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

    public String getTitle() {
        return title;
    }

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

    public Integer getChannelId() {
        return channelId;
    }

    public void setChannelId(Integer channelId) {
        this.channelId = channelId;
    }

    public Date getValidEndDate() {
        return validEndDate;
    }

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