package com.mortals.xhx.busiz.rsp;

import com.mortals.xhx.common.code.YesNoEnum;
import lombok.Data;
import org.apache.commons.lang.StringUtils;

/**
 * @author karlhoo
 */
@Data
public class ApiResp<T> {
    /**
     * 结果编码
     */
    private int code;
    /**
     * 结果描述
     */
    private String msg;
    /**
     * 响应数据
     */
    private T data;

    public boolean isSuccess() {
        if (YesNoEnum.YES.getValue() == code) {
            return true;
        }
        return false;
    }
}
