-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BE] refactor: CreateCommand, UpdateCommand 클래스 빌더 패턴 적용 및 테스트 코드 적용 (#…
…940) (#943) * refactor: Command 빌더 패턴 적용 (cherry picked from commit 9f34f2b) * test: 테스트 코드에서 Command 생성 빌더 사용하도록 변경 (cherry picked from commit 7279977) * refactor: SchoolCreateCommand, SchoolUpdateCommand 패키지 이동 및 검증 로직 제거 - 도메인 응집도 향상을 위해 DTO 검증 로직 제거 (cherry picked from commit ab06daa) * test: 누락된 빌터 패턴 적용 추가 * fix: evnet -> event 패키지명 수정
- Loading branch information
1 parent
48e199e
commit 133b107
Showing
44 changed files
with
594 additions
and
509 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
2 changes: 1 addition & 1 deletion
2
backend/src/main/java/com/festago/admin/dto/school/SchoolV1CreateRequest.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
backend/src/main/java/com/festago/admin/dto/school/SchoolV1UpdateRequest.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
3 changes: 3 additions & 0 deletions
3
backend/src/main/java/com/festago/artist/dto/command/ArtistCreateCommand.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
3 changes: 3 additions & 0 deletions
3
backend/src/main/java/com/festago/artist/dto/command/ArtistUpdateCommand.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
3 changes: 3 additions & 0 deletions
3
backend/src/main/java/com/festago/auth/dto/command/AdminLoginCommand.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
3 changes: 3 additions & 0 deletions
3
backend/src/main/java/com/festago/auth/dto/command/AdminSignupCommand.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
2 changes: 2 additions & 0 deletions
2
backend/src/main/java/com/festago/festival/dto/command/FestivalUpdateCommand.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
2 changes: 1 addition & 1 deletion
2
backend/src/main/java/com/festago/school/application/SchoolDeleteService.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
37 changes: 0 additions & 37 deletions
37
backend/src/main/java/com/festago/school/dto/SchoolCreateCommand.java
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
backend/src/main/java/com/festago/school/dto/SchoolUpdateCommand.java
This file was deleted.
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
26
backend/src/main/java/com/festago/school/dto/command/SchoolCreateCommand.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,26 @@ | ||
package com.festago.school.dto.command; | ||
|
||
import com.festago.school.domain.School; | ||
import com.festago.school.domain.SchoolRegion; | ||
import lombok.Builder; | ||
|
||
@Builder | ||
public record SchoolCreateCommand( | ||
String name, | ||
String domain, | ||
SchoolRegion region, | ||
String logoUrl, | ||
String backgroundImageUrl | ||
) { | ||
|
||
public School toEntity() { | ||
return new School( | ||
null, | ||
domain, | ||
name, | ||
logoUrl, | ||
backgroundImageUrl, | ||
region | ||
); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
backend/src/main/java/com/festago/school/dto/command/SchoolUpdateCommand.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,14 @@ | ||
package com.festago.school.dto.command; | ||
|
||
import com.festago.school.domain.SchoolRegion; | ||
import lombok.Builder; | ||
|
||
@Builder | ||
public record SchoolUpdateCommand( | ||
String name, | ||
String domain, | ||
SchoolRegion region, | ||
String logoUrl, | ||
String backgroundImageUrl | ||
) { | ||
} |
2 changes: 1 addition & 1 deletion
2
.../school/dto/evnet/SchoolCreatedEvent.java → .../school/dto/event/SchoolCreatedEvent.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
.../school/dto/evnet/SchoolDeletedEvent.java → .../school/dto/event/SchoolDeletedEvent.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
.../school/dto/evnet/SchoolUpdatedEvent.java → .../school/dto/event/SchoolUpdatedEvent.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
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.