package com.loan.system.domain.pojo;

import java.io.Serializable;

/**
 * @author EdwinXu
 * @date 2020/9/2 - 19:55
 */
public class Result implements Serializable {

    private static final long serialVersionUID = -6737213892547362600L;
    private Integer code;
    private String msg;
    private Object data;
    private static Result result;

    public static Result getInstance(){
        if (result == null){
            return new Result();
        }
        return result;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Integer getCode() {
        return code;
    }

    public Result setCode(Integer code) {
        this.code = code;
        return this;
    }

    public String getMsg() {
        return msg;
    }

    public Result setMsg(String msg) {
        this.msg = msg;
        return this;
    }

    public Object getData() {
        return data;
    }

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

    @Override
    public String toString() {
        return "Result{" +
                "code=" + code +
                ", msg='" + msg + '\'' +
                ", data=" + data +
                '}';
    }
}
