package com.deepchart.utils; import lombok.AllArgsConstructor; import lombok.Data; /** * 请求响应返回结果工具类 * @param */ @Data @AllArgsConstructor public class Result { private Integer code; //状态码 private String msg; //返回信息 private T data; //返回数据 public static Result success(String message, T data) { return new Result<>(200, message, data); } public static Result error(Integer resultCode, String message) { return new Result<>(resultCode, message, null); } }