Explorar el Código

add specification of Response class.

171870002 hace 5 años
padre
commit
37dad1b050
Se han modificado 1 ficheros con 43 adiciones y 0 borrados
  1. 43 0
      src/main/java/com/example/data_structure/common/Response.java

+ 43 - 0
src/main/java/com/example/data_structure/common/Response.java

@@ -1,4 +1,47 @@
 package com.example.data_structure.common;
 package com.example.data_structure.common;
 
 
 public class Response {
 public class Response {
+
+    private Object content;
+    private String message;
+    private boolean success;
+
+    public Response(Object content, String message, boolean success) {
+        this.content = content;
+        this.message = message;
+        this.success = success;
+    }
+
+    public Response(Object content, boolean success) {
+        this.content = content;
+        this.success = success;
+        this.message=null;
+    }
+
+    public Response(String message, boolean success) {
+        this.message = message;
+        this.success = success;
+        this.content=null;
+    }
+
+    public Response(boolean success) {
+        this.success = success;
+        this.message=null;
+        this.content=null;
+    }
+
+    public static Response buildSuccess(){
+        return null;
+    }
+
+    public static  Response buildSuccess(Object content,String message){
+        return null;
+    }
+
+    public static Response buildSuccess(Object content){
+        return null;
+    }
+
+    
+
 }
 }