Skip to content

Commit

Permalink
[#6] feat: Create PitchHistoryDTO
Browse files Browse the repository at this point in the history
투구 기록을 담을 DTO 생성
  • Loading branch information
isaac56 committed May 7, 2021
1 parent 044af1c commit e17c641
Showing 1 changed file with 22 additions and 0 deletions.
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();
}
}

0 comments on commit e17c641

Please sign in to comment.