package com.njcn.manufactinflux.response;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author hongawen
 * @version 1.0.0
 * @date  2021年03月25日 15:38
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class HttpResult<T> implements Serializable {

    /**状态码*/
    private String code;

    /**回执信息*/
    private String message;

    /**响应数据*/
    private T data;

    public HttpResult(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public HttpResult(Integer code, String message) {
        this.code = String.valueOf(code);
        this.message = message;
    }


}
