forked from codesquad-members-2021/issue-tracker
-
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.
fix: IssueUpdateRequest 추가하여 수정에 맞도록 항목 수정
- Loading branch information
Showing
4 changed files
with
82 additions
and
15 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
...sue-tracker-be/src/main/java/com/codesquad/issuetracker/issue/dto/IssueUpdateRequest.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,41 @@ | ||
package com.codesquad.issuetracker.issue.dto; | ||
|
||
import com.codesquad.issuetracker.issue.domain.Milestone; | ||
import com.codesquad.issuetracker.issue.domain.Users; | ||
import com.codesquad.issuetracker.label.domain.Labels; | ||
import com.codesquad.issuetracker.label.mapper.LabelDtoMapper; | ||
import com.codesquad.issuetracker.milestone.mapper.MilestoneDtoMapper; | ||
import com.codesquad.issuetracker.user.mapper.UserDtoMapper; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import javax.validation.constraints.NotEmpty; | ||
import java.util.Set; | ||
|
||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
public class IssueUpdateRequest { | ||
@NotEmpty | ||
private String title; | ||
|
||
private boolean isClosed; | ||
private Set<Long> assigneeIds; | ||
private Set<Long> labelIds; | ||
private Long milestoneId; | ||
|
||
public Users assignees() { | ||
return UserDtoMapper.toEntities(assigneeIds); | ||
} | ||
|
||
public Labels labels() { | ||
return LabelDtoMapper.toEntities(labelIds); | ||
} | ||
|
||
public Milestone milestone() { | ||
return MilestoneDtoMapper.toEntity(milestoneId); | ||
} | ||
} |
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