package com.wuban.tron.explore.util;

/**
 * ClassName:ApiResponse <br/>
 * Function: API返回结果 <br/>
 * Date: 2018年9月17日 下午4:51:24 <br/>
 * @author Jack Bai
 * @version 1.0.0
 * @see
 */
public class ApiResponse<T> {

	/**
	 * 执行成功.
	 */
	public static final Integer OK = 200;
	/**
	 * 内部异常.
	 */
	public static final Integer INNER_ERROR = 500;

	public static final String DEFAULT_SUCCESS_MESSAGE = "操作成功";

	private Integer error;
	private String err_msg;
	private T data;

	public ApiResponse() {
	}

	public ApiResponse(Integer error, String message, T data) {
		this.error = error;
		this.err_msg = message;
		this.data = data;
	}

	public Integer getError() {
		return error;
	}

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

	public String getErr_msg() {
		return err_msg;
	}

	public void setErr_msg(String err_msg) {
		this.err_msg = err_msg;
	}

	public T getData() {
		return data;
	}

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