package com.engine.salary.enums.sicategory;


import com.engine.salary.enums.BaseEnum;

import java.util.Arrays;

public enum PaymentScopeEnum implements BaseEnum<Integer> {
    SCOPE_COMPANY(1, "公司", 87158),
    SCOPE_PERSON(2, "个人", 87159);

    private Integer value;
    private String defaultLable;
    private Integer labelId;

    PaymentScopeEnum(Integer value, String defaultLable, Integer labelId) {
        this.value = value;
        this.defaultLable = defaultLable;
        this.labelId = labelId;
    }

    public Integer getValue() {
        return this.value;
    }

    public Integer getLabelId() {
        return this.labelId;
    }

    public String getDefaultLabel() {
        return this.defaultLable;
    }

    public static String getDefaultLabelByValue(Integer value){
        if (value == null) {
            return "";
        };
        PaymentScopeEnum[] enumAry = PaymentScopeEnum.values();
        for(int i = 0; i < Arrays.asList(enumAry).size(); i++){
            if (Integer.valueOf(enumAry[i].getValue()).equals(value)) {
                return enumAry[i].getDefaultLabel();
            }
        }
        return "";
    }
}
