package com.engine.salary.report.enums;


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

    CUSTOM(0, "自定义表单", 83993),
    SYSTEM(1, "系统表单", 83994),
    ;

    private int value;

    private String defaultLabel;

    private int labelId;

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

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

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

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

    public static SalarySystemTypeEnum parseByValue(int value) {
        for (SalarySystemTypeEnum typeEnum : SalarySystemTypeEnum.values()) {
            if (Objects.equals(typeEnum.getValue(), value)) {
                return typeEnum;
            }
        }
        return null;
    }
}
