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 PayrollCheckTypeEnum implements BaseEnum<String> {

    PWD("PWD", "密码验证", 1),
    SMS("SMS", "短信验证", 1);

    private String value;

    private String defaultLabel;

    private int labelId;


    PayrollCheckTypeEnum(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 PayrollCheckTypeEnum parseByValue(String value) {
        for (PayrollCheckTypeEnum payrollCheckTypeEnum : PayrollCheckTypeEnum.values()) {
            if (StringUtils.equals(payrollCheckTypeEnum.getValue(), value)) {
                return payrollCheckTypeEnum;
            }
        }
        return PWD;
    }
}
