package com.engine.salary.enums.salaryaccounting;

import com.engine.salary.enums.BaseEnum;

import java.util.Objects;

/**
 * 薪资核算的状态
 * <p>Copyright: Copyright (c) 2022</p>
 * <p>Company: 泛微软件</p>
 *
 * @author qiantao
 * @version 1.0
 **/
public enum SalaryAcctRecordStatusEnum implements BaseEnum<Integer> {

    NOT_ARCHIVED(1, "未归档", 91870),
    ARCHIVED(2, "已归档", 91862),
    DECLARED(3, "已申报", 100119),
    ;

    private int value;

    private String defaultLabel;

    private int labelId;

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

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

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

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

    public static SalaryAcctRecordStatusEnum parseByValue(Integer value) {
        for (SalaryAcctRecordStatusEnum salaryAcctRecordStatusEnum : SalaryAcctRecordStatusEnum.values()) {
            if (Objects.equals(salaryAcctRecordStatusEnum.getValue(), value)) {
                return salaryAcctRecordStatusEnum;
            }
        }
        return null;
    }
}
