-
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 #59 from PLOTTING-PLOWER/feat/syj/refactorLast
✨:isStar 추가하기 위한 dto 생성
- Loading branch information
Showing
9 changed files
with
87 additions
and
20 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
17 changes: 17 additions & 0 deletions
17
src/main/java/com/plotting/server/plogging/dto/response/PloggingGetStarListResponse.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,17 @@ | ||
package com.plotting.server.plogging.dto.response; | ||
|
||
import lombok.Builder; | ||
|
||
import java.util.List; | ||
|
||
@Builder | ||
public record PloggingGetStarListResponse( | ||
List<PloggingGetStarResponse> ploggingGetStarResponseList | ||
) { | ||
public static PloggingGetStarListResponse from(List<PloggingGetStarResponse> ploggingGetStarResponseList) { | ||
return PloggingGetStarListResponse.builder() | ||
// .currentPeople(currentPeople) | ||
.ploggingGetStarResponseList(ploggingGetStarResponseList) | ||
.build(); | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
src/main/java/com/plotting/server/plogging/dto/response/PloggingGetStarResponse.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,37 @@ | ||
package com.plotting.server.plogging.dto.response; | ||
|
||
import com.plotting.server.plogging.domain.Plogging; | ||
import com.plotting.server.plogging.domain.type.PloggingType; | ||
import lombok.Builder; | ||
|
||
import java.time.LocalDate; | ||
import java.time.LocalDateTime; | ||
|
||
@Builder | ||
public record PloggingGetStarResponse( | ||
Long ploggingId, | ||
String title, | ||
Long currentPeople, | ||
Long maxPeople, | ||
PloggingType ploggingType, | ||
LocalDate recruitEndDate, | ||
LocalDateTime startTime, | ||
Long spendTime, | ||
String startLocation, | ||
Boolean isStar | ||
) { | ||
public static PloggingGetStarResponse of(Plogging plogging, Long currentPeople, Boolean isStar) { | ||
return PloggingGetStarResponse.builder() | ||
.ploggingId(plogging.getId()) | ||
.title(plogging.getTitle()) | ||
.currentPeople(currentPeople) | ||
.maxPeople(plogging.getMaxPeople()) | ||
.ploggingType(plogging.getPloggingType()) | ||
.recruitEndDate(plogging.getRecruitEndDate()) | ||
.startTime(plogging.getStartTime()) | ||
.spendTime(plogging.getSpendTime()) | ||
.startLocation(plogging.getStartLocation()) | ||
.isStar(isStar) | ||
.build(); | ||
} | ||
} |
1 change: 0 additions & 1 deletion
1
src/main/java/com/plotting/server/plogging/dto/response/PloggingStarListResponse.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
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