package com.iformall.enums;

/**
 * Created by Stormeye on 2018/08/09.
 */
public enum EnumPayWay {

    PAY_WAY_WEAPP(0, "微信小程序"),
    PAY_WAY_WECHAT(1, "微信支付"),
    PAY_WAY_WECHAT_WAP(2, "微信H5"),
    PAY_WAY_ALIPAY(3, "支付宝"),
    PAY_WAY_ALIPAY_WAP(4, "支付宝H5"),
    PAY_WAY_POS_B(10, "POS B端"),
    PAY_WAY_POS_NEU(11, "POS 东软"),
    ;

    public static EnumPayWay getEnum(Integer code) {
        for (EnumPayWay value : values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }

    private Integer code;
    private String message;

    EnumPayWay(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
