package com.iformall.enums;

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

    INSIDE_C(0, "C端支付"),
    POS(1, "POS"),
    INSIDE_B(2, "B端支付");

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

    private Integer code;
    private String message;

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

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
