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 Result {

    private boolean success;

    private Object data;

    private String error;


    public Result(boolean success, Object data) {

        this.success = success;
        this.data = data;
    }


    public Result(boolean success, String error) {

        this.success = success;
        this.error = error;
    }


    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;
    }

}
