package com.engine.salary.sys.enums;

import com.engine.salary.enums.BaseEnum;
import org.apache.commons.lang3.StringUtils;

/**
 * 个税计算启用状态
 * <p>Copyright: Copyright (c) 2022</p>
 * <p>Company: 泛微软件</p>
 *
 * @author qiantao
 * @version 1.0
 **/
public enum TaxDeclarationFunctionEnum implements BaseEnum<String> {
    OPEN("1", "开启", 1),
    CLOSURE("0", "关闭", 1),
    REBOOT("2", "重启", 1);

    private String value;

    private String defaultLabel;

    private int labelId;


    TaxDeclarationFunctionEnum(String value, String defaultLabel, int labelId) {
        this.value = value;
        this.defaultLabel = defaultLabel;
        this.labelId = labelId;
    }

    @Override
    public String getValue() {
        return value;
    }

    @Override
    public String getDefaultLabel() {
        return defaultLabel;
    }

    @Override
    public Integer getLabelId() {
        return labelId;
    }

    public static TaxDeclarationFunctionEnum parseByValue(String value) {
        for (TaxDeclarationFunctionEnum taxDeclarationFunctionEnum : TaxDeclarationFunctionEnum.values()) {
            if (StringUtils.equals(taxDeclarationFunctionEnum.getValue(), value)) {
                return taxDeclarationFunctionEnum;
            }
        }
        return null;
    }
}
