package com.community.commom.mode;

import java.io.Serializable;

/**
 * 接口统一状态返回BEAN.
 */
public class HkResponseBean<T> implements Serializable {

    private static final long serialVersionUID = 3593827217136880822L;

    public static final String CODE_SUCCESS =  "0";
    public static final String CODE_FAIL =  "1";

    private String errorCode = "0";

    private String errorMessage = "成功";

    private T data;

    public HkResponseBean() {
    }
 
    public void addSuccess(String errorMessage,T data) {
        this.errorCode = "0";
        this.errorMessage = errorMessage;
        this.data = data;
    }
    
    public String getErrorCode() {
        return errorCode;
    }
    
    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }
    
    public String getErrorMessage() {
        return errorMessage;
    }
    
    public void setErrorMessage(String errorMessage) {
        this.errorMessage = errorMessage;
    }
    
    public T getData() {
        return data;
    }
    
    public void setData(T data) {
        this.data = data;
    }
}
