forked from codesquad-members-2021/baseball
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BE] 기본 API 구현 완료 #9
Merged
Merged
Conversation
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
1. AWAY팀과 HOME팀을 가리키는 Venue 이넘 생성 (각각 전광판의 TOP, BOTTOM에 대응) 2. Oauth의 Resource Owner를 가리키는 ResourceOwner 이넘 생성
1. user aggregate에 속한 entity 객체들을 생성 2. UserRepository 생성 3. User의 생성 및 조회 테스트 코드 작성
response에 사용될 공통 형식인 ApiResult 클래스 생성
…ublic 1. acquireAttackTeam, acuqireDefenseTeam, acqurireCurrentInning() 메소드의 접근제어자를 public으로 변경 2. team id와 등번호로 BattingHistory를 반환해주는 메소드 추가
투구 기록을 담을 DTO 생성
게임 메인화면을 업데이트하기 위한 리스폰스 DTO입니다.
1. 야구 게임방의 서비스 레이어입니다. 2. 게임 만들기, 게임 참가하기, 게임진행하기, 게임결과받기 의 기본기능이 있습니다.
인증과정과 Request param을 받는 걸 생략한 game관련 contoroller입니다. (추후 추가 예정)
pitch_history 테이블에 투구 당시 스트라이크, 볼 상황을 기록하도록 두 개 칼럼 추가하였습니다.
변경된 테이블에 맞게 PitchHistory에 strikeCount, ballCount 추가
pitchHistory 기록할 때, 당시의 투구상황을 기록하도록 수정했습니다.
PitchHistoryDTO에 투구 당시의 스트라이크, 볼 카운트와 투수, 타자 정보 등을 추가로 담도록 수정
안타를 친상황에서 PitchHistory를 BALL로 기록하고 있었습니다.
…ngHistory` entities
1. Team 객체에서 uniform_number를 key로, Player를 value로 하는 Map을 들고 있습니다. 2. Player는 aggregate root인 Team을 통해서만 접근할 수 있기 때문에, Player 내부에 uniform_number는 필요 없습니다. 3. Player가 uniform_number를 갖고 있으면, spring data jdbc가 쿼리문을 생성할때 uniform_number 칼럼을 중복하여 호출합니다.
게임방 목록을 보여주기 위하여 각 테이블을 조인하는 커스텀 쿼리 작성
…ivate 정적 팩토리 메소드 패턴을 위해서 builder의 접근제어자를 private으로 변경
1. sendBatterOnPlate 메소드로 타석에 타자를 올리면 타자의 타석 수도 올려줍니다. 2. 게임 첫시작이나 다음이닝 변경 시, sendBatterOnPlate 없이 this.batterUniformNumber만 바꿔주고 있어서 타석 수가 올라가지 않고 있었습니다.
현재 게임 기록 (스코어, 타율) 을 반환해주는 API 구현
1. 현재 만든 API 요청을 json body로 읽기위한 request DTO 생성했습니다. 2. GameController에서 json body를 읽도록 수정
Open
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
사용자 인증을 제외한, 게임진행에 필요한 기본 API 구현 완료 했습니다.