-
Notifications
You must be signed in to change notification settings - Fork 37
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 #27 from Sonjh1306/BE/feature/issue-create
[#15] 이슈 추가하기 구현 완료
- Loading branch information
Showing
32 changed files
with
409 additions
and
58 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
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
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
28 changes: 28 additions & 0 deletions
28
BE/issue_tracker/src/main/java/team02/issue_tracker/dto/issue/IssueRequest.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,28 @@ | ||
package team02.issue_tracker.dto.issue; | ||
|
||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import team02.issue_tracker.domain.*; | ||
|
||
import java.util.List; | ||
|
||
@NoArgsConstructor | ||
@Getter | ||
public class IssueRequest { | ||
|
||
private String title; | ||
private String comment; | ||
private String file; | ||
private Long userId; | ||
private List<Long> labelIds; | ||
private Long milestoneId; | ||
private List<Long> assigneeIds; | ||
|
||
public Issue toIssue(User writer) { | ||
return new Issue(title, writer, true); | ||
} | ||
|
||
public Comment toComment(User writer) { | ||
return new Comment(comment, file, writer); | ||
} | ||
} |
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
28 changes: 28 additions & 0 deletions
28
BE/issue_tracker/src/main/java/team02/issue_tracker/dto/wrapping/ApiResult.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,28 @@ | ||
package team02.issue_tracker.dto.wrapping; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
|
||
@AllArgsConstructor | ||
@Getter | ||
public class ApiResult<T> { | ||
|
||
private T data; | ||
private String error; | ||
|
||
public static <T> ApiResult<T> success(T data) { | ||
return new ApiResult<>(data, null); | ||
} | ||
|
||
public static ApiResult<?> fail(String errorMessage) { | ||
return new ApiResult<>(null, errorMessage); | ||
} | ||
|
||
public static ApiResult<?> fail(Throwable cause) { | ||
return fail(cause.getMessage()); | ||
} | ||
|
||
public static ApiResult<String> ok() { | ||
return success("OK"); | ||
} | ||
} |
11 changes: 0 additions & 11 deletions
11
BE/issue_tracker/src/main/java/team02/issue_tracker/dto/wrapping/DataResponse.java
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
BE/issue_tracker/src/main/java/team02/issue_tracker/dto/wrapping/ListDataResponse.java
This file was deleted.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
BE/issue_tracker/src/main/java/team02/issue_tracker/exception/IssueNotFoundException.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,8 +1,8 @@ | ||
package team02.issue_tracker.exception; | ||
|
||
public class IssueNotFoundException extends RuntimeException{ | ||
public class IssueNotFoundException extends NotFoundException{ | ||
|
||
public IssueNotFoundException() { | ||
super("issue not found!!!"); | ||
super("해당 이슈가 존재하지 않습니다."); | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
BE/issue_tracker/src/main/java/team02/issue_tracker/exception/LabelNotFoundException.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,8 @@ | ||
package team02.issue_tracker.exception; | ||
|
||
public class LabelNotFoundException extends NotFoundException{ | ||
|
||
public LabelNotFoundException() { | ||
super("해당 라벨이 존재하지 않습니다."); | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
...ssue_tracker/src/main/java/team02/issue_tracker/exception/MilestoneNotFoundException.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,8 @@ | ||
package team02.issue_tracker.exception; | ||
|
||
public class MilestoneNotFoundException extends NotFoundException{ | ||
|
||
public MilestoneNotFoundException() { | ||
super("해당 마일스톤이 존재하지 않습니다."); | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
BE/issue_tracker/src/main/java/team02/issue_tracker/exception/NotFoundException.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,8 @@ | ||
package team02.issue_tracker.exception; | ||
|
||
public class NotFoundException extends RuntimeException{ | ||
|
||
public NotFoundException(String message) { | ||
super(message); | ||
} | ||
} |
Oops, something went wrong.