package com.engine.salary.enums.salaryformula;


import com.engine.salary.enums.BaseEnum;

import java.util.Objects;

/**
 * 薪资项目SQL公式引用分类
 * <p>Copyright: Copyright (c) 2022</p>
 * <p>Company: 泛微软件</p>
 *
 * @author qiantao
 * @version 1.0
 **/
public enum SalarySQLReferenceEnum implements BaseEnum<String> {

    EMPLOYEE_INFO("employeeInfo", "员工基本信息", 85366),
    SALARY_ACCT_EMPLOYEE("salaryAcctEmployee", "核算基本信息", 85368),
    SALARY_CYCLE("SalaryCycle", "核算日期", 85368),
    SALARY_ITEM("salaryItem", "薪资项目", 85368);
    private String value;

    private String defaultLabel;

    private int labelId;

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