-
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.
* feat: 스페이스의 완료 회고중 가장 최근에 시작된 회고의 액션 아이템 리스트 조회 구현 * chore: 최근 회고의 기준을 데드라인으로 변경 * chore: swagger에 설명 추가 * feat: 스페이스의 모든 실행 목표 API 조회 구현 * feat: 멤버의 실행 목표 controller, service 메서드 생성 * feat: 실행 목표 create, member와 관련한 실행 목표 조회 구현 * chore: 응답 변수명 변경 * chore: application-dev 수정 * chore: 멤버 실천 목표 응답 수정 * feat: 멤버 실행 목표 핀, 상태 기준 정렬 구현 * chore: 조회 DTO 이름 변경(prefix get 추가)
- Loading branch information
Showing
19 changed files
with
338 additions
and
253 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
21 changes: 21 additions & 0 deletions
21
layer-api/src/main/java/org/layer/domain/actionItem/controller/dto/ActionItemResponse.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,21 @@ | ||
package org.layer.domain.actionItem.controller.dto; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import jakarta.validation.constraints.NotNull; | ||
import lombok.Builder; | ||
import org.layer.domain.actionItem.entity.ActionItem; | ||
|
||
@Builder | ||
public record ActionItemResponse(@NotNull | ||
@Schema(description = "실행 목표 ID", examples = {"1", "2"}) | ||
Long actionItemId, | ||
@NotNull | ||
@Schema(description = "실행 목표 내용", examples = {"긴 회의 시간 줄이기", "회의 후 내용 꼭 기록해두기"}) | ||
String content) { | ||
public static ActionItemResponse of(ActionItem actionItem) { | ||
return ActionItemResponse.builder() | ||
.actionItemId(actionItem.getId()) | ||
.content(actionItem.getContent()) | ||
.build(); | ||
} | ||
} |
13 changes: 0 additions & 13 deletions
13
...pi/src/main/java/org/layer/domain/actionItem/controller/dto/CreateActionItemResponse.java
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
...pi/src/main/java/org/layer/domain/actionItem/controller/dto/DeleteActionItemResponse.java
This file was deleted.
Oops, something went wrong.
35 changes: 35 additions & 0 deletions
35
.../src/main/java/org/layer/domain/actionItem/controller/dto/GetSpaceActionItemResponse.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,35 @@ | ||
package org.layer.domain.actionItem.controller.dto; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import jakarta.validation.constraints.NotNull; | ||
import lombok.Builder; | ||
import org.layer.domain.actionItem.entity.ActionItem; | ||
import org.layer.domain.retrospect.entity.Retrospect; | ||
import org.layer.domain.space.entity.Space; | ||
|
||
import java.util.List; | ||
|
||
@Builder | ||
public record GetSpaceActionItemResponse(@NotNull | ||
@Schema(description = "액션 아이템이 속한 스페이스 ID") | ||
Long spaceId, | ||
@NotNull | ||
@Schema(description = "액션 아이템이 속한 스페이스 이름") | ||
String spaceName, | ||
@NotNull | ||
@Schema(description = "스페이스의 액션아이템 리스트") | ||
List<SpaceActionItemElementResponse> teamActionItemList | ||
) { | ||
|
||
public static GetSpaceActionItemResponse of(Space space, Retrospect retrospect, List<ActionItem> spaceActionItemList) { | ||
List<SpaceActionItemElementResponse> actionItemElements = spaceActionItemList.stream() | ||
.map(a -> SpaceActionItemElementResponse.of(a, retrospect)) | ||
.toList(); | ||
|
||
return GetSpaceActionItemResponse.builder() | ||
.spaceId(space.getId()) | ||
.spaceName(space.getName()) | ||
.teamActionItemList(actionItemElements) | ||
.build(); | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
...java/org/layer/domain/actionItem/controller/dto/GetSpaceRetrospectActionItemResponse.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,29 @@ | ||
package org.layer.domain.actionItem.controller.dto; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import jakarta.validation.constraints.NotNull; | ||
import lombok.Builder; | ||
import org.layer.domain.space.entity.Space; | ||
|
||
import java.util.List; | ||
|
||
@Builder | ||
public record GetSpaceRetrospectActionItemResponse(@NotNull | ||
@Schema(description = "액션 아이템이 속한 스페이스 ID") | ||
Long spaceId, | ||
@NotNull | ||
@Schema(description = "액션 아이템이 속한 스페이스 이름") | ||
String spaceName, | ||
@NotNull | ||
@Schema(description = "스페이스의 액션아이템 리스트") | ||
List<RetrospectActionItemResponse> teamActionItemList | ||
) { | ||
|
||
public static GetSpaceRetrospectActionItemResponse of(Space space, List<RetrospectActionItemResponse> actionItemList) { | ||
return GetSpaceRetrospectActionItemResponse.builder() | ||
.spaceId(space.getId()) | ||
.spaceName(space.getName()) | ||
.teamActionItemList(actionItemList) | ||
.build(); | ||
} | ||
} |
51 changes: 51 additions & 0 deletions
51
...main/java/org/layer/domain/actionItem/controller/dto/MemberActionItemElementResponse.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,51 @@ | ||
package org.layer.domain.actionItem.controller.dto; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import jakarta.validation.constraints.NotNull; | ||
import lombok.Builder; | ||
import org.layer.domain.actionItem.entity.ActionItem; | ||
import org.layer.domain.actionItem.enums.ActionItemStatus; | ||
import org.layer.domain.retrospect.entity.Retrospect; | ||
import org.layer.domain.space.entity.Space; | ||
|
||
@Builder | ||
public record MemberActionItemElementResponse( | ||
@NotNull | ||
@Schema(description = "실행 목표가 속한 스페이스 ID") | ||
Long spaceId, | ||
@NotNull | ||
@Schema(description = "실행 목표가 속한 스페이스 이름") | ||
String spaceName, | ||
@NotNull | ||
@Schema(description = "실행 목표가 속한 회고 ID") | ||
Long retrospectId, | ||
@NotNull | ||
@Schema(description = "실행 목표가 속한 회고 이름") | ||
String retrospectTitle, | ||
@NotNull | ||
@Schema(description = "실행 목표 ID", examples = {"1", "2"}) | ||
Long actionItemId, | ||
@NotNull | ||
@Schema(description = "실행 목표 내용", examples = {"긴 회의 시간 줄이기", "회의 후 내용 꼭 기록해두기"}) | ||
String content, | ||
@NotNull | ||
@Schema(description = "핀 여부", examples = {"Y", "N"}) | ||
String isPinned, | ||
@NotNull | ||
@Schema(description = "실행 목표 상태", examples = {"PROCEEDING", "BEFORE_START", "DONE"}) | ||
ActionItemStatus actionItemStatus | ||
) { | ||
|
||
public static MemberActionItemElementResponse of(Space space, Retrospect retrospect, ActionItem actionItem) { | ||
return MemberActionItemElementResponse.builder() | ||
.spaceId(space.getId()) | ||
.spaceName(space.getName()) | ||
.retrospectId(retrospect.getId()) | ||
.retrospectTitle(retrospect.getTitle()) | ||
.actionItemId(actionItem.getId()) | ||
.content(actionItem.getContent()) | ||
.isPinned(actionItem.getIsPinned() ? "Y" : "N") | ||
.actionItemStatus(actionItem.getActionItemStatus()) | ||
.build(); | ||
} | ||
} |
40 changes: 3 additions & 37 deletions
40
...pi/src/main/java/org/layer/domain/actionItem/controller/dto/MemberActionItemResponse.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 |
---|---|---|
@@ -1,43 +1,9 @@ | ||
package org.layer.domain.actionItem.controller.dto; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import jakarta.validation.constraints.NotNull; | ||
import lombok.Builder; | ||
import org.layer.domain.actionItem.entity.ActionItem; | ||
|
||
@Builder | ||
@Schema(description = "특정 회원이 작성한 액션 아이템") | ||
public record MemberActionItemResponse (@NotNull | ||
@Schema(description = "액션아이템 ID") | ||
Long actionItemId, | ||
@NotNull | ||
@Schema(description = "액션아이템 내용") | ||
String actionItemContent, | ||
@NotNull | ||
@Schema(description = "액션 아이템이 속해 있는 스페이스 ID") | ||
Long spaceId, | ||
@NotNull | ||
@Schema(description = "액션 아이템이 속해 있는 스페이스 이름") | ||
String spaceName, | ||
@NotNull | ||
@Schema(description = "액션 아이템과 매핑되는 회고 ID") | ||
Long retrospectId, | ||
@NotNull | ||
@Schema(description = "액션 아이템과 매핑되는 회고 이름") | ||
String retrospectName, | ||
@NotNull | ||
@Schema(description = "팀 스페이스의 액션 아이템인지, 개인 스페이스의 액션 아이템인지") | ||
Boolean isTeam){ | ||
import java.util.List; | ||
|
||
public static MemberActionItemResponse toResponse(ActionItem actionItem, String spaceName, String retrospectName, boolean isTeam) { | ||
return MemberActionItemResponse.builder() | ||
.actionItemId(actionItem.getId()) | ||
.actionItemContent(actionItem.getContent()) | ||
.spaceId(actionItem.getSpaceId()) | ||
.spaceName(spaceName) | ||
.retrospectId(actionItem.getRetrospectId()) | ||
.retrospectName(retrospectName) | ||
.isTeam(isTeam) | ||
.build(); | ||
} | ||
@Builder | ||
public record MemberActionItemResponse(List<MemberActionItemElementResponse> actionItemResponse) { | ||
} |
Oops, something went wrong.