package com.iformall.domain.vo;

import com.iformall.domain.po.WxCoupon;
import lombok.Data;

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

/**
 * Created by syf on 2018/9/6.
 * 返回投放错误列表使用
 */
@Data
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;

    private boolean suc = false;
    private Long id;
    private Integer type;

    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;
    }

}
