package com.dxhy.common.enums;

/**
 * 
 * 
 * 企业税务信息操作名称
 *
 * @author zhanghong
 * @date 2019年6月4日
 * 
 */
public enum CzmcEnum {

    /**
     * 释放
     */
    SF("0", 1),
    /**
     * 锁定
     */
    SD("1", 2);

    private static final String[] CZMC = {"释放", "锁定"};

    private String czmcDm;
    private int index;

    CzmcEnum(String czmcDm, int index) {
        this.czmcDm = czmcDm;
        this.index = index;
    }

    public String getCzmcDm(int index) {
        for (CzmcEnum czmc : CzmcEnum.values()) {
            if (czmc.getIndex() == index) {
                return czmc.czmcDm;
            }
        }
        return null;
    }

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

    public String getCzmcDm() {
        return czmcDm;
    }

    public void setCzmcDm(String czmcDm) {
        this.czmcDm = czmcDm;
    }

    public int getIndex() {
        return index;
    }

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