package com.ruoyi.system.domain.vo;



public class ResultVo<T> {

    private String code;

    private String message;

    public static ResultVo error(String message) {
        ResultVo resultVo = new ResultVo();
        resultVo.setCode("99");
        resultVo.setMessage(message);
        return resultVo;
    }

    public String getCode() {
        return code;
    }

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

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }


    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    private T data;

    public  static   ResultVo success(){
        ResultVo resultVo = new ResultVo();
        resultVo.setCode("0");
        return resultVo;
    }
    public static <T>  ResultVo success(T t){
        ResultVo resultVo = new ResultVo();
        resultVo.setCode("0");
        resultVo.setData(t);
        return resultVo;
    }
    
}
