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 static final long serialVersionUID = -8301806726034267451L;
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);
}
}