-
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: 기수 이름 대신 숫자로 변경 - generation_name 대신 generation_number로 수정 - 관련 예외 처리도 변경 * refactor: dto 객체 정적 팩토리 메서드 패턴으로 변경 - class -> record로 변경 - 서비스에 buildGenerationInfo 메서드 삭제 - record에 static 메서드 추가 * refactor: 코드 길이 최적화 --------- Co-authored-by: Youth <[email protected]>
- Loading branch information
1 parent
563a70a
commit 0ecc90f
Showing
8 changed files
with
38 additions
and
45 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
12 changes: 0 additions & 12 deletions
12
src/main/java/cotato/csquiz/domain/dto/generation/GenerationInfo.java
This file was deleted.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
src/main/java/cotato/csquiz/domain/dto/generation/GenerationInfoResponse.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,16 @@ | ||
package cotato.csquiz.domain.dto.generation; | ||
|
||
import cotato.csquiz.domain.entity.Generation; | ||
|
||
public record GenerationInfoResponse( | ||
Long generationId, | ||
int generationNumber | ||
) { | ||
|
||
public static GenerationInfoResponse from(Generation generation) { | ||
return new GenerationInfoResponse( | ||
generation.getId(), | ||
generation.getNumber() | ||
); | ||
} | ||
} |
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