package com.kcim.util; import com.fasterxml.jackson.annotation.JsonInclude; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; @AllArgsConstructor @NoArgsConstructor public class ErrorResult { private Boolean success; @JsonInclude(JsonInclude.Include.NON_NULL) private Object data; private Integer errorCode; private String errorMessage; private Integer showType; public ErrorResult(Integer errorCode, String errorMessage) { this.success = false; this.data = null; this.errorCode = errorCode; this.errorMessage = errorMessage; this.showType = 4; } public static ErrorResult errorMsg(Integer errorCode, String errorMessage) { return new ErrorResult(errorCode, errorMessage); } public Boolean getSuccess() { return success; } public void setSuccess(Boolean success) { this.success = success; } public Object getData() { return data; } public void setData(Object data) { this.data = data; } public Integer getErrorCode() { return errorCode; } public void setErrorCode(Integer errorCode) { this.errorCode = errorCode; } public String getErrorMessage() { return errorMessage; } public void setErrorMessage(String errorMessage) { this.errorMessage = errorMessage; } public Integer getShowType() { return showType; } public void setShowType(Integer showType) { this.showType = showType; } }