-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
투구 기록을 담을 DTO 생성
- Loading branch information
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
BE/baseball/src/main/java/team9/baseball/DTO/response/PitchHistoryDTO.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,22 @@ | ||
package team9.baseball.DTO.response; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import team9.baseball.domain.aggregate.game.PitchHistory; | ||
|
||
@Getter | ||
@Builder | ||
@AllArgsConstructor(access = AccessLevel.PRIVATE) | ||
public class PitchHistoryDTO { | ||
private String result; | ||
private String log; | ||
|
||
public static PitchHistoryDTO of(PitchHistory pitchHistory) { | ||
return builder() | ||
.result(pitchHistory.getResult().name()) | ||
.log(null) | ||
.build(); | ||
} | ||
} |