package com.iformall.enums;


/**
 * @author gongbiao
 */

public enum EnumOrderType {

    COUPON(0,"券"),
    MICROPAY(1,"B收款码支付"),
    NATIVEPAY(2,"C扫码支付"),
    PREPAIDCARD(3, "储值卡"),
    CREDIT(4,"积分支付"),
    POSPAY(10, "POS支付")
    ;

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

    private Integer code;
    private String message;

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

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
