package com.ywt.alipaympapi.models.enums;

import com.ywt.alipaympapi.core.utils.Checker;

public enum HospitalNameEnum {

    BAIYUN("南方医科大学南方医院白云分院", 41),
    TAIHE("南方医院太和分院", 12);

    private final String displayName;

    private final int value;

    HospitalNameEnum(String displayName, int value) {
        this.displayName = displayName;
        this.value = value;
    }

    public String getDisplayName() {
        return displayName;
    }

    public int getValue() {
        return value;
    }

    public static HospitalNameEnum valueOf(int value) {
        for (HospitalNameEnum enumObj : HospitalNameEnum.values()) {
            if (enumObj.getValue() == value) {
                return enumObj;
            }
        }
        return null;
    }
    public static String getDisplayName(int value) {
        HospitalNameEnum enumObj = valueOf(value);
        if (!Checker.isNone(enumObj)){
            return enumObj.displayName;
        }
        return "";
    }
}
