-
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.
[Refactor] move feedback package (#109)
* refactor(Feedback): Feedback 페키지를 User 하부로 이동 * refactor(Content): Feedback의 본문 내용인 Content 를 값객체로 리팩토링 * test(Feedback): 피드백 도메인 테스트 작성 * test(FeedbackTest): 피드백 동등성 테스트 작성 * test(FeedbackTest): 접근제어자 제거 * test(FeedbackTest):clear_all_feedback 에서 사이즈를 확인하는 단언문을 hasSize를 사용하도록 변경
- Loading branch information
1 parent
ead1bf8
commit fd554a0
Showing
18 changed files
with
155 additions
and
285 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
src/main/java/com/kustacks/kuring/admin/common/dto/FeedbackDto.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
21 changes: 0 additions & 21 deletions
21
src/main/java/com/kustacks/kuring/feedback/common/dto/SaveFeedbackV1Request.java
This file was deleted.
Oops, something went wrong.
34 changes: 0 additions & 34 deletions
34
src/main/java/com/kustacks/kuring/feedback/presentation/FeedbackControllerV1.java
This file was deleted.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
...ng/feedback/business/FeedbackService.java → ...kuring/user/business/FeedbackService.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
2 changes: 1 addition & 1 deletion
2
...back/common/dto/SaveFeedbackResponse.java → ...user/common/dto/SaveFeedbackResponse.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
31 changes: 31 additions & 0 deletions
31
src/main/java/com/kustacks/kuring/user/domain/Content.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,31 @@ | ||
package com.kustacks.kuring.user.domain; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.NoArgsConstructor; | ||
|
||
import javax.persistence.Column; | ||
import javax.persistence.Embeddable; | ||
|
||
@Embeddable | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class Content { | ||
|
||
private static final int MAX_LENGTH = 256; | ||
|
||
@Column(name = "content", length = 256, nullable = false) | ||
private String value; | ||
|
||
public Content(String content) { | ||
validate(content); | ||
this.value = content; | ||
} | ||
|
||
public String getValue() { | ||
return value; | ||
} | ||
|
||
private void validate(String content) { | ||
if (content.length() > MAX_LENGTH) throw new IllegalArgumentException("본문 내용은 " + MAX_LENGTH + "자 이하여야 합니다"); | ||
if (content.isBlank()) throw new IllegalArgumentException("본문은 공백일 수 없습니다"); | ||
} | ||
} |
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
2 changes: 1 addition & 1 deletion
2
...g/feedback/domain/FeedbackRepository.java → ...uring/user/domain/FeedbackRepository.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
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
2 changes: 1 addition & 1 deletion
2
src/main/java/com/kustacks/kuring/user/facade/UserCommandFacade.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
2 changes: 1 addition & 1 deletion
2
src/main/java/com/kustacks/kuring/user/facade/UserQueryFacade.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
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
Oops, something went wrong.