package com.zzwtec.third.common;

import java.io.Serializable;

/**
 * 返回数据对象
 * @author yangtonggan
 * @date 2016-3-2
 */
@SuppressWarnings("serial")
public class DataObject implements Serializable{	
	
	private int code;
	private String msg;
	private Object data;	

	public DataObject(int code, String msg){
		this.code = code;
		this.msg = msg;
	}
	
	public DataObject(String code, String msg){
		this.code = Integer.parseInt(code);
		this.msg = msg;
	}
	
	public DataObject(int code, String msg, Object data){
		this.code = code;
		this.msg = msg;
		this.data = data;
	}
	
	
	public DataObject(String msg){
		this.code = 0;
		this.msg = msg;
	}
	
	public DataObject(){
		this.code = 0;
		this.msg = "操作成功";
	}
	
	public int getCode() {
		return code;
	}
	public void setCode(int code) {
		this.code = code;
	}
	public Object getMsg() {
		return msg;
	}
	public void setMsg(String msg) {
		this.msg = msg;
	}
	public Object getData() {
		return data;
	}

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