package com.sptg.iot.api.beans;

import com.sptg.iot.api.entity.IotAuthentication;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Map;

/**
 * @author zwx
 * @create 2020/10/19 18:17
 */
@Setter
@Getter
public class ApiResultBean<T> implements Serializable {

    /**
     * 响应状态
     */
    private Integer code;

    /**
     * 响应信息描述
     */
    private String msg;

    /**
     * 响应对象
     */
    private T data;

    private IotAuthentication content;

    private Map<String, Object> status;

    public static ApiResultBean ok(){
        ApiResultBean apiResultBean = new ApiResultBean();
        apiResultBean.setCode(0);
        apiResultBean.setMsg("成功");
        return apiResultBean;
    }
}
