package edu.travel.resp; import lombok.Data; @Data public class PageResponse extends BaseResponse { private int total; private int size; private PageResponse() { } private PageResponse(int code, String msg,Object data) { super(code, msg, data); } private PageResponse(int code, String msg) { super(code, msg, null); } private PageResponse(int code, String msg,Object data,int total,int size) { super(code, msg, data); this.total = total; this.size = size; } public static BaseResponse out(Integer code,String msg,R data,int total, int size){ return new PageResponse(code,msg,data,total,size); } public static BaseResponse out(Integer code,String msg,R data){ return new PageResponse(code,msg,data); } public static BaseResponse out(Integer code,String msg){ return new PageResponse(code,msg); } }