All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.soento.core.lang.Response Maven / Gradle / Ivy

package com.soento.core.lang;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.soento.core.consts.BaseCode;
import lombok.Getter;
import lombok.Setter;

/**
 * @author yantao.zeng
 */
@Getter
@Setter
public class Response extends BaseObject {
    private String code;
    private String message;
    private T data;

    @JsonIgnore
    public boolean isSuccess() {
        return BaseCode.SUCCESS.equals(code);
    }

    @JsonIgnore
    public boolean isPending() {
        return BaseCode.PENDING.equals(code);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy