package com.iformall.enums;

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

    // 0-authorized, 1-unauthorized

    AUTHORIZED(0, "authorized"),
    UNAUTHORIZED(1, "unauthorized")
    ;

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

    private Integer code;
    private String message;

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

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
