package com.iformall.enums;

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

    PAY_PAYMENT(0, "付款"),
    PAY_B_REFUND(1, "B端退款"),
    PAY_AUTO_REFUND(2, "自动退款"),
    PAY_ADMIN_REFUND(3, "A端退款"),
    PAY_VERIFY_INDEPENT(10, "核销"),
    ;
    public static EnumPosPayType getEnum(Integer code) {
        for (EnumPosPayType value : values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }

    private Integer code;
    private String message;

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

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
