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 SalaryAcctResultDataSourceEnum implements BaseEnum<Integer> {

    EDIT(1, "手动编辑", 91870),
    IMPORT(2, "导入", 91862)
    ;

    private int value;

    private String defaultLabel;

    private int labelId;

    SalaryAcctResultDataSourceEnum(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 SalaryAcctResultDataSourceEnum parseByValue(Integer value) {
        for (SalaryAcctResultDataSourceEnum SalaryAcctResultDataSourceEnum : SalaryAcctResultDataSourceEnum.values()) {
            if (Objects.equals(SalaryAcctResultDataSourceEnum.getValue(), value)) {
                return SalaryAcctResultDataSourceEnum;
            }
        }
        return null;
    }
}
