package com.ywt.outpatient.domain.models.enums;

/**
 * @author Walker
 * Created on 2023/11/1
 */
public enum MpTypeEnum {

    UNKNOWN("", 0),
    WX("微信", 1),
    ALIPAY("支付宝", 2),
    ;

    private final String displayName;

    private final int value;

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

    public String getDisplayName() {
        return displayName;
    }

    public int getValue() {
        return value;
    }

    public static MpTypeEnum valueOf(int value) {
        for (MpTypeEnum e : MpTypeEnum.values()) {
            if (e.getValue() == value) {
                return e;
            }
        }
        return UNKNOWN;
    }
}