package com.engine.salary.enums.salaryarchive;

import java.util.Objects;

/**
 * 薪资档案状态
 * <p>Copyright: Copyright (c) 2022</p>
 * <p>Company: 泛微软件</p>
 *
 * @author qiantao
 * @version 1.0
 **/
public enum SalaryArchiveStatusEnum {

    PENDING("PENDING", "待定薪"),
    FIXED("FIXED", "发薪"),
    SUSPEND("SUSPEND", "待停薪"),
    STOP_FROM_PENDING("STOP_FROM_PENDING", "停薪_来自待定薪"),
    STOP_FROM_SUSPEND("STOP_FROM_SUSPEND", "停薪_来自待停薪");

    private String value;

    private String defaultLabel;

    SalaryArchiveStatusEnum(String value, String defaultLabel) {
        this.value = value;
        this.defaultLabel = defaultLabel;
    }

    public String getValue() {
        return value;
    }

    public String getDefaultLabel() {
        return defaultLabel;
    }

    public static SalaryArchiveStatusEnum parseByValue(String value) {
        for (SalaryArchiveStatusEnum salaryArchiveStatusEnum : SalaryArchiveStatusEnum.values()) {
            if (Objects.equals(salaryArchiveStatusEnum.getValue(), value)) {
                return salaryArchiveStatusEnum;
            }
        }
        return null;
    }
}
