package com.iformall.enums;

/**
 * Created by Stormeye on 2018/08/09.
 */
public enum EnumRefundStatus {
    REFUND_UNKNOWN(-1, "未知"),
    REFUND_WAIT(0, "退款中"),
    REFUND_REQ_SUCCESS(1, "退款申请成功"),
    REFUND_REQ_FAIL(2, "退款申请失败"),
    REFUND_SUCCESS(3, "退款成功"),
    REFUND_FAIL(4, "退款失败"),
    ;

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

    private Integer code;
    private String message;

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

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
