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

    private T data;

    private String message;

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

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