package com.ibeetl.admin.flow.entity;

import com.ibeetl.admin.core.entity.BaseEntity;
import org.beetl.sql.core.annotatoin.ColumnIgnore;
import org.beetl.sql.core.annotatoin.Table;

@Table(name = "tb_ordercenter_product")
public class DirectedFestivalProductEntity extends BaseEntity {

    private String id;

    private String fescod;

    private String cpid;

    private String productid;

    private String productname;

    private String url;

    private String icon;

    private String smstype;

    private String smsord;

    private String smscan;

    private String stime;

    private String etime;

    /**
     * 订购验证码
     */
    @ColumnIgnore
    private String ordervercode;

    /**
     * 退订验证码
     */
    @ColumnIgnore
    private String cancelvercode;

    /**
     * 预约订购验证码
     */
    @ColumnIgnore
    private String prevercode;

    /**
     * 激活验证码
     */
    @ColumnIgnore
    private String activevercode;

    /**
     * 订购失败
     */
    @ColumnIgnore
    private String orderfail;

    /**
     * 领取权益验证码
     */
    @ColumnIgnore
    private String drawvercode;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getFescod() {
        return fescod;
    }

    public void setFescod(String fescod) {
        this.fescod = fescod;
    }

    public String getCpid() {
        return cpid;
    }

    public void setCpid(String cpid) {
        this.cpid = cpid;
    }

    public String getProductid() {
        return productid;
    }

    public void setProductid(String productid) {
        this.productid = productid;
    }

    public String getProductname() {
        return productname;
    }

    public void setProductname(String productname) {
        this.productname = productname;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
        String[] smss = icon.split(",");
        switch (smss.length) {
            case 0:
                break;
            case 1:
                this.setOrdervercode(smss[0]);
                break;
            case 2:
                this.setOrdervercode(smss[0]);
                this.setCancelvercode(smss[1]);
                break;
            case 3:
                this.setOrdervercode(smss[0]);
                this.setCancelvercode(smss[1]);
                this.setPrevercode(smss[2]);
                break;
            case 4:
                this.setOrdervercode(smss[0]);
                this.setCancelvercode(smss[1]);
                this.setPrevercode(smss[2]);
                this.setActivevercode(smss[3]);
                break;
            case 5:
                this.setOrdervercode(smss[0]);
                this.setCancelvercode(smss[1]);
                this.setPrevercode(smss[2]);
                this.setActivevercode(smss[3]);
                this.setDrawvercode(smss[4]);
                break;
            default:
                this.setOrdervercode(smss[0]);
                this.setCancelvercode(smss[1]);
                this.setPrevercode(smss[2]);
                this.setActivevercode(smss[3]);
                this.setDrawvercode(smss[4]);
                this.setOrderfail(smss[5]);
                break;
        }
    }

    public String getSmstype() {
        return smstype;
    }

    public void setSmstype(String smstype) {
        this.smstype = smstype;
    }

    public String getSmsord() {
        return smsord;
    }

    public void setSmsord(String smsord) {
        this.smsord = smsord;
    }

    public String getSmscan() {
        return smscan;
    }

    public void setSmscan(String smscan) {
        this.smscan = smscan;
    }

    public String getStime() {
        return stime;
    }

    public void setStime(String stime) {
        this.stime = stime;
    }

    public String getEtime() {
        return etime;
    }

    public void setEtime(String etime) {
        this.etime = etime;
    }

    public String getOrdervercode() {
        return ordervercode;
    }

    public void setOrdervercode(String ordervercode) {
        this.ordervercode = ordervercode;
    }

    public String getCancelvercode() {
        return cancelvercode;
    }

    public void setCancelvercode(String cancelvercode) {
        this.cancelvercode = cancelvercode;
    }

    public String getPrevercode() {
        return prevercode;
    }

    public void setPrevercode(String prevercode) {
        this.prevercode = prevercode;
    }

    public String getActivevercode() {
        return activevercode;
    }

    public void setActivevercode(String activevercode) {
        this.activevercode = activevercode;
    }

    public String getDrawvercode() {
        return drawvercode;
    }

    public void setDrawvercode(String drawvercode) {
        this.drawvercode = drawvercode;
    }

    public String getOrderfail() {
        return orderfail;
    }

    public void setOrderfail(String orderfail) {
        this.orderfail = orderfail;
    }
}
