package com.tykj.dev.misc.base;

import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author dengdiyi
 * @description 接口返回统一标准类
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@JsonPropertyOrder(value = {"message","data"})
public class ResultObj {

    private Object data;

    private String message;

    public ResultObj(Object o) {
        this.data = o;
        this.message = "no message";
    }

    public ResultObj(String m) {
        this.message = m;
        this.data = new Object();
    }
}
