package com.izouma.awesomeadmin.dto;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonInclude;

/**
 * <p>封装json返回类型。</p>
 *
 * @author 姓名 <br />
 * 更新履历 <br />
 * 日期 : 姓名: 更新内容<br />
 * @version 1.0
 */
@JsonAutoDetect
@JsonInclude(JsonInclude.Include.NON_NULL)
public class WebServiceResult {

    private boolean success;

    private Object data;

    private String error;

    private String rtnMessage;

    private Integer rtnCode;

    public String getRtnMessage() {
        return rtnMessage;
    }

    public void setRtnMessage(String rtnMessage) {
        this.rtnMessage = rtnMessage;
    }

    public WebServiceResult(boolean success, String error) {
        this.success = success;
        this.error = error;
    }

    public WebServiceResult(boolean success, Object data, String rtnMessage, Integer rtnCode) {
        this.success = success;
        this.data = data;
        this.rtnMessage = rtnMessage;
        this.rtnCode = rtnCode;
    }

    public boolean isSuccess() {

        return success;
    }


    public void setSuccess(boolean success) {

        this.success = success;
    }


    public Object getData() {

        return data;
    }


    public void setData(Object data) {

        this.data = data;
    }


    public String getError() {

        return error;
    }


    public void setError(String error) {

        this.error = error;
    }

    public Object getRtnCode() {
        return rtnCode;
    }

    public void setRtnCode(Integer rtnCode) {
        this.rtnCode = rtnCode;
    }
}
