package com.zhaohaoting.framework.abs.entity;



/**
 * author：Created by ZHT on 2017/11/2 9:23
 * email：526309416@qq.com
 * desc：服务器下发数据 实体基类
 */
public class ResultEntity<T>  {

  private int code;

  private T data;

  private String msg;

  public int getError() {
    return code;
  }

  public void setError(int error) {
    this.code = error;
  }

  public T getData() {
    return data;
  }

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

  public String getMessage() {
    return msg;
  }

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

  public ResultEntity(int error, T data, String message) {
    this.code = error;
    this.data = data;
    this.msg = message;
  }

  public ResultEntity() {
  }

  @Override
  public String toString() {
    return "ResultEntity{" +
            "error=" + code +
            ", data=" + data +
            ", message='" + msg + '\'' +
            '}';
  }
}
