package com.iformall.enums;

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

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

    private Integer code;
    private String message;

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

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
