package com.dxhy.common.enums;

/**
 *
 * @author jiaohongyang 逾期申请状态
 * 
 */
public enum YqsqztEnum {

    /**
     * 未申请
     */
    WSQ("0", 1),
    /**
     * 已申请待审核
     */
    YSQ("1", 2),
    /**
     * 审核中
     */
    SQZ("2", 3),
    /**
     * 审核成功
     */
    SQCG("4", 4),
    /**
     * 审核失败
     */
    SQSB("5", 5);

    private static final String[] SHZTMC = {"未申请", "待审核", "审核中", "审核成功", "审核失败"};

    private String shztDm;
    private int index;

    YqsqztEnum(String shztDm, int index) {
        this.shztDm = shztDm;
        this.index = index;
    }

    public String getShztDm(int index) {
        for (YqsqztEnum shzt : YqsqztEnum.values()) {
            if (shzt.getIndex() == index) {
                return shzt.shztDm;
            }
        }
        return null;
    }

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

    public String getShztDm() {
        return shztDm;
    }

    public void setShztDm(String shztDm) {
        this.shztDm = shztDm;
    }

    public int getIndex() {
        return index;
    }

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