package com.iformall.enums;

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

    PAY_PAYMENT(0, "付款"),
    PAY_B_REFUND(1, "B端退款"),
    PAY_AUTO_REFUND(2, "自动退款"),
    PAY_ADMIN_REFUND(3, "A端退款"),
    PAY_POS_REFUND(4, "POS发起退款");

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

    private Integer code;
    private String message;

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

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
