package com.njzscloud.supervisory.gps.jike;

import lombok.Data;
import lombok.experimental.Accessors;

/**
 * 即刻物联通用响应
 */
@Data
@Accessors(chain = true)
public class JikeResponse<T> {

    private Header header;
    private T data;

    @Data
    public static class Header {
        private Integer code;
        private String message;
        private String requestId;
        private Long ts;
        private String rts;
    }

    public boolean isSuccess() {
        return header != null && header.getCode() != null && header.getCode() == 0;
    }
}
