package com.iformall.enums;

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

    // 来源于Neusoft的定义 0微信;1支付宝;2现金;3优惠券;4预付卡;5银行卡
    WECHAT(0, "微信"),
    ALIPAY(1, "支付宝"),
    CASH(2, "现金"),
    MEM_COUPON(3, "优惠券"),
    MEM_CARD(4, "预付卡"),
    MEM_BANKCARD(5, "银行卡"),
    ;
    public static EnumNeuPosPamentType getEnum(Integer code) {
        for (EnumNeuPosPamentType value : values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }

    private Integer code;
    private String message;

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

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
