package com.demo.util;

import com.demo.constant.ResultStatus;

public class ResultObject {

    private int code;

    private String desc;

    private Object data;

    public ResultObject() {

    }

    public ResultObject(ResultStatus resultStatus) {
        this.code = resultStatus.getCode();
        this.desc = resultStatus.getDesc();
    }

    public ResultObject(Object data) {
        this.code = ResultStatus.SUCCESS.getCode();
        this.data = data;
        this.desc = ResultStatus.SUCCESS.getDesc();
    }

    public Object getData() {
        return data;
    }

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

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
