-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from K-Hackathon-Fledge/21-PagingTotalPage
21 paging total page
- Loading branch information
Showing
20 changed files
with
359 additions
and
216 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/main/java/com/fledge/fledgeserver/support/dto/response/PostPagingResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package com.fledge.fledgeserver.support.dto.response; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.Getter; | ||
|
||
import java.time.LocalDate; | ||
import java.time.temporal.ChronoUnit; | ||
|
||
@Getter | ||
@Schema(description = "후원하기 게시글 Paging") | ||
public class PostPagingResponse { | ||
@Schema(description = "후원하기 게시글 ID", example = "2") | ||
private Long supportId; | ||
|
||
@Schema(description = "후원하기 게시글 제목", example = "") | ||
private String title; | ||
|
||
@Schema(description = "남은 기간", example = "99") | ||
private String leftDays; | ||
|
||
@Schema(description = "후원하기 게시글 사진 URL", example = "https://fledge-bucket.s3.ap-northeast-2.amazonaws.com/asdfndsvaksmdf") | ||
private String supportPostImageUrl; | ||
|
||
@Schema(description = "후원 받은 내역", example = "") | ||
private RecordProgressGetResponse supportRecord; | ||
|
||
|
||
|
||
public PostPagingResponse(Long supportId, String title, LocalDate expirationDate, String supportPostImageUrl, RecordProgressGetResponse supportRecord) { | ||
this.supportId = supportId; | ||
this.title = title; | ||
this.leftDays = String.valueOf(ChronoUnit.DAYS.between(LocalDate.now(), expirationDate)); | ||
this.supportPostImageUrl = supportPostImageUrl; | ||
this.supportRecord = supportRecord; | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/main/java/com/fledge/fledgeserver/support/dto/response/PostTotalPagingResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.fledge.fledgeserver.support.dto.response; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.Getter; | ||
|
||
import java.util.List; | ||
|
||
@Getter | ||
@Schema(description = "후원하기 게시글 Paging - Total 페이지 수 포함") | ||
public class PostTotalPagingResponse { | ||
@Schema(description = "총 게시글 수", example = "100") | ||
private int totalPosts; | ||
|
||
@Schema(description = "총 페이지 수", example = "10") | ||
private int totalPages; | ||
|
||
@Schema(description = "후원하기 게시글 목록") | ||
private List<PostPagingResponse> supportPosts; | ||
|
||
public PostTotalPagingResponse(int totalPosts, int totalPages, List<PostPagingResponse> supportPosts) { | ||
this.totalPosts = totalPosts; | ||
this.totalPages = totalPages; | ||
this.supportPosts = supportPosts; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 0 additions & 30 deletions
30
src/main/java/com/fledge/fledgeserver/support/dto/response/SupportPostPagingResponse.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.