package com.dxhy.common.enums;

/**
 * @author peipei.li
 * @date 2019-04-26
 *
 */
public enum JxszcCancelEnum {
    /**
     * 未取消
     */
    WQX("0", 1),

    /**
     * 已取消
     */
    YQX("1", 2);

    private static final String[] QXZTMC = {"未取消", "已取消"};

    private String qxztDm;
    private int index;

    JxszcCancelEnum(String qxztDm, int index) {
        this.qxztDm = qxztDm;
        this.index = index;
    }

    public String getRzztDm(int index) {
        for (JxszcCancelEnum en : JxszcCancelEnum.values()) {
            if (en.getIndex() == index) {
                return en.qxztDm;
            }
        }
        return null;
    }

    public String getQxztMc(int index) {
        int length = QXZTMC.length;
        if (index <= length) {
            return QXZTMC[index - 1];
        }
        return null;
    }

    public String getQxztDm() {
        return qxztDm;
    }

    public void setQxztDm(String qxztDm) {
        this.qxztDm = qxztDm;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }
}
