-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
39 changed files
with
1,347 additions
and
31 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
13 changes: 13 additions & 0 deletions
13
src/main/java/com/depromeet/domain/member/dto/MemberProfileDto.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,13 @@ | ||
package com.depromeet.domain.member.dto; | ||
|
||
import com.depromeet.domain.member.domain.Member; | ||
|
||
public record MemberProfileDto(Long memberId, String nickname, String profileImageUrl) { | ||
|
||
public static MemberProfileDto from(Member member) { | ||
return new MemberProfileDto( | ||
member.getId(), | ||
member.getProfile().getNickname(), | ||
member.getProfile().getProfileImageUrl()); | ||
} | ||
} |
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
33 changes: 33 additions & 0 deletions
33
src/main/java/com/depromeet/domain/mission/dto/response/MissionSummaryItem.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,33 @@ | ||
package com.depromeet.domain.mission.dto.response; | ||
|
||
import com.depromeet.domain.mission.domain.*; | ||
import com.fasterxml.jackson.annotation.JsonFormat; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import java.time.LocalDateTime; | ||
|
||
public record MissionSummaryItem( | ||
@Schema(description = "미션 ID", defaultValue = "1") Long missionId, | ||
@Schema(description = "미션 이름", defaultValue = "default name") String name, | ||
@Schema(description = "미션 카테고리", defaultValue = "STUDY") MissionCategory category, | ||
@Schema(description = "미션 공개여부", defaultValue = "ALL") MissionVisibility visibility, | ||
@Schema(description = "미션 상태", defaultValue = "1") MissionStatus missionStatus, | ||
@JsonFormat( | ||
shape = JsonFormat.Shape.STRING, | ||
pattern = "yyyy-MM-dd HH:mm:ss", | ||
timezone = "Asia/Seoul") | ||
@Schema( | ||
description = "미션 종료 시간", | ||
defaultValue = "2024-01-03 00:34:00", | ||
type = "string") | ||
LocalDateTime finishedAt) { | ||
|
||
public static MissionSummaryItem of(Mission mission, MissionStatus missionStatus) { | ||
return new MissionSummaryItem( | ||
mission.getId(), | ||
mission.getName(), | ||
mission.getCategory(), | ||
mission.getVisibility(), | ||
missionStatus, | ||
mission.getFinishedAt()); | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
src/main/java/com/depromeet/domain/mission/dto/response/MissionSummaryListResponse.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,18 @@ | ||
package com.depromeet.domain.mission.dto.response; | ||
|
||
import java.util.List; | ||
|
||
public record MissionSummaryListResponse( | ||
long missionAllCount, | ||
long missionCompleteCount, | ||
long missionNoneCount, | ||
List<MissionSummaryItem> missionSummaryItems) { | ||
public static MissionSummaryListResponse of( | ||
long missionAllCount, | ||
long missionCompleteCount, | ||
long missionNoneCount, | ||
List<MissionSummaryItem> missionSummaryItems) { | ||
return new MissionSummaryListResponse( | ||
missionAllCount, missionCompleteCount, missionNoneCount, missionSummaryItems); | ||
} | ||
} |
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
12 changes: 12 additions & 0 deletions
12
src/main/java/com/depromeet/domain/missionRecord/dto/response/UrgingStatus.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,12 @@ | ||
package com.depromeet.domain.missionRecord.dto.response; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
@AllArgsConstructor | ||
public enum UrgingStatus { | ||
URGING, | ||
NONE, | ||
; | ||
} |
Oops, something went wrong.