package com.inspect.patrol.domain;

import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

@Setter
@Getter
public class ResponseResult<T> implements Serializable {
    private int code;
    private String msg;
    private T data;
    private static final String SUC_MSG = "操作成功";

    public static <T> ResponseResult<T> success(T data) {
        ResponseResult<T> ajaxResult = new ResponseResult();
        ajaxResult.code = 200;
        ajaxResult.msg = "操作成功";
        ajaxResult.data = data;
        return ajaxResult;
    }

    public static <T> ResponseResult<T> success() {
        ResponseResult<T> ajaxResult = new ResponseResult();
        ajaxResult.code = 200;
        ajaxResult.msg = "操作成功";
        return ajaxResult;
    }

}
