package com.virjar.echo.adr.bean;

import lombok.Data;

@Data
public class Result<O> {
    public static final int OK = 200;
    public static final int SERVER_ERROR = 500;
    public static final int CLIENT_ERROR = 400;
    public static final int NOT_FOUND = 404;
    public static final int AUTH_FAIL = 403;

    private O data;
    private int code;
    private String errorMessage;


    public boolean isOk() {
        return code == OK;
    }
}
