Skip to content

Commit

Permalink
#82 feat : 응답 일관성을 위한 PageInfo 레코드
Browse files Browse the repository at this point in the history
  • Loading branch information
rivkode committed Apr 29, 2024
1 parent ed3bd01 commit 9e99ea6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/main/java/com/seoultech/synergybe/domain/common/PageInfo.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.seoultech.synergybe.domain.common;

public record PageInfo(
long totalElements, boolean hasNext
) {
public static PageInfo of(long totalElements, boolean hasNext) {
return new PageInfo(totalElements, hasNext);
}

public static PageInfo of(long totalElements) {
return new PageInfo(totalElements, false);
}
}

0 comments on commit 9e99ea6

Please sign in to comment.