package com.jeeplus.center.enums;

import java.util.Arrays;
import java.util.List;

public enum ServiceAliasEnum {
    CPA_EVALUATION ("xgzcpg", "CPA-评估"),
    CPA_FINANCE ("xgkjssws", "CPA-财务"),
    CPA_AUDIT ("zsjsfs", "CPA-中审"),
    CPA_HR ("hr", "CPA-人力资源"),
    CPA_PUBLIC ("public", "公共部门");

    private String value;

    private String label;

    private ServiceAliasEnum(String value, String label) {
        this.value = value;
        this.label = label;
    }

    public String getValue() {
        return value;
    }

    public String getLabel() {
        return label;
    }

    @Override
    public String toString() {
        return this.value;
    }

    /**
     * 根据枚举value值匹配到对应的枚举
     * @param value
     * @return
     */
    public static ServiceAliasEnum getByValue(String value) {
        ServiceAliasEnum result = null;
        for (ServiceAliasEnum s : values()) {
            if (s.value.equals(value)) {
                return s;
            }
        }
        return result;
    }
}
