package com.ai.da.common.response;

/**
 * @ClassName ResultEnum
 * @Description 响应结果枚举
 * @Author dwjian
 * @Date 2019/9/8 21:58
 */
public enum ResultEnum {

    SUCCESS(true, 0, "SUCCESS"),
    FAIL(false, -1, "FAIL"),
    ERROR(false, -1, "system error!"),
    PARAMETER_ERROR(false, -2, "parameter error!"),

    NO_LOGIN(false, -100, "User not logged in"),
    NO_PERMISSION(false, -200, "No access"),
    ACCOUNT_LOCK(false, -300, "Account frozen"),

    PROMPT(false, 1, "Prompt"),
    WARNING(false, 2, "Warning"),

    ;
    private int code;
    private String msg;
    private boolean isOK;


    ResultEnum(boolean isOK, int code, String msg) {
        this.isOK = isOK;
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public boolean isOK() {
        return isOK;
    }

    public void setOK(boolean OK) {
        isOK = OK;
    }
}
