forked from codesquad-members-2023/issue-tracker-max
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[BE] 이슈 라벨, 마일스톤, 참여자 목록 조회 응답 형식 변경
- Loading branch information
Showing
14 changed files
with
328 additions
and
288 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
22 changes: 7 additions & 15 deletions
22
be/issue/src/main/java/codesquad/issueTracker/issue/dto/IssueLabelResponseDto.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,30 +1,22 @@ | ||
package codesquad.issueTracker.issue.dto; | ||
|
||
import codesquad.issueTracker.label.vo.LabelVo; | ||
import codesquad.issueTracker.issue.vo.IssueLabelVo; | ||
import java.util.List; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
public class IssueLabelResponseDto { | ||
private Long id; | ||
private String name; | ||
private String backgroundColor; | ||
private String textColor; | ||
List<IssueLabelVo> labels; | ||
|
||
@Builder | ||
public IssueLabelResponseDto(Long id, String name, String backgroundColor, String textColor) { | ||
this.id = id; | ||
this.name = name; | ||
this.backgroundColor = backgroundColor; | ||
this.textColor = textColor; | ||
public IssueLabelResponseDto(List<IssueLabelVo> labels) { | ||
this.labels = labels; | ||
} | ||
|
||
public static IssueLabelResponseDto from(LabelVo label) { | ||
public static IssueLabelResponseDto from(List<IssueLabelVo> labels) { | ||
return IssueLabelResponseDto.builder() | ||
.id(label.getId()) | ||
.name(label.getName()) | ||
.backgroundColor(label.getBackgroundColor()) | ||
.textColor(label.getTextColor()) | ||
.labels(labels) | ||
.build(); | ||
} | ||
} |
16 changes: 7 additions & 9 deletions
16
be/issue/src/main/java/codesquad/issueTracker/issue/dto/IssueMilestoneResponseDto.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,24 +1,22 @@ | ||
package codesquad.issueTracker.issue.dto; | ||
|
||
import codesquad.issueTracker.milestone.vo.MilestoneVo; | ||
import codesquad.issueTracker.issue.vo.IssueMileStoneDetailVo; | ||
import java.util.List; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
public class IssueMilestoneResponseDto { | ||
private Long id; | ||
private String name; | ||
private List<IssueMileStoneDetailVo> milestones; | ||
|
||
@Builder | ||
public IssueMilestoneResponseDto(Long id, String name) { | ||
this.id = id; | ||
this.name = name; | ||
public IssueMilestoneResponseDto(List<IssueMileStoneDetailVo> milestones) { | ||
this.milestones = milestones; | ||
} | ||
|
||
public static IssueMilestoneResponseDto from(MilestoneVo milestoneVo) { | ||
public static IssueMilestoneResponseDto from(List<IssueMileStoneDetailVo> milestones) { | ||
return builder() | ||
.id(milestoneVo.getId()) | ||
.name(milestoneVo.getName()) | ||
.milestones(milestones) | ||
.build(); | ||
} | ||
} |
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
20 changes: 8 additions & 12 deletions
20
be/issue/src/main/java/codesquad/issueTracker/issue/dto/IssueUserResponseDto.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,27 +1,23 @@ | ||
package codesquad.issueTracker.issue.dto; | ||
|
||
import codesquad.issueTracker.user.domain.User; | ||
import codesquad.issueTracker.issue.vo.IssueUserVo; | ||
import java.util.List; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
public class IssueUserResponseDto { | ||
private Long id; | ||
private String name; | ||
private String imageUrl; | ||
private List<IssueUserVo> participants; | ||
|
||
|
||
@Builder | ||
public IssueUserResponseDto(Long id, String name, String imageUrl) { | ||
this.id = id; | ||
this.name = name; | ||
this.imageUrl = imageUrl; | ||
public IssueUserResponseDto(List<IssueUserVo> participants) { | ||
this.participants = participants; | ||
} | ||
|
||
public static IssueUserResponseDto from(User user) { | ||
public static IssueUserResponseDto from(List<IssueUserVo> participants) { | ||
return IssueUserResponseDto.builder() | ||
.id(user.getId()) | ||
.name(user.getName()) | ||
.imageUrl(user.getProfileImg()) | ||
.participants(participants) | ||
.build(); | ||
} | ||
} |
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.