-
Notifications
You must be signed in to change notification settings - Fork 3
[feat] 게임방 생성 api 구현 #13
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
Merged
Conversation
This file contains hidden or 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
Closed
3 tasks
dlsrks1021
reviewed
Jul 12, 2025
backend/src/main/java/io/f1/backend/domain/game/store/RoomRepository.java
Outdated
Show resolved
Hide resolved
backend/src/main/java/io/f1/backend/domain/game/store/RoomRepository.java
Outdated
Show resolved
Hide resolved
backend/src/main/java/io/f1/backend/domain/game/dto/request/RoomCreateRequest.java
Outdated
Show resolved
Hide resolved
LimKangHyun
requested changes
Jul 12, 2025
backend/src/main/java/io/f1/backend/domain/game/dto/request/RoomCreateRequest.java
Outdated
Show resolved
Hide resolved
LimKangHyun
requested changes
Jul 12, 2025
backend/src/main/java/io/f1/backend/domain/game/store/RoomRepository.java
Outdated
Show resolved
Hide resolved
dlsrks1021
approved these changes
Jul 12, 2025
# Conflicts: # backend/src/main/java/io/f1/backend/domain/game/api/RoomController.java # backend/src/main/java/io/f1/backend/domain/game/app/RoomService.java # backend/src/main/java/io/f1/backend/domain/game/dto/request/RoomCreateRequest.java # backend/src/main/java/io/f1/backend/domain/game/store/RoomRepository.java # backend/src/test/java/io/f1/backend/domain/game/store/RoomRepositoryTests.java
LimKangHyun
approved these changes
Jul 12, 2025
Collaborator
LimKangHyun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다!
# Conflicts: # backend/src/main/java/io/f1/backend/domain/game/api/RoomController.java
jiwon1217
approved these changes
Jul 12, 2025
Collaborator
jiwon1217
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다 !
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.
🛰️ Issue Number
🪐 작업 내용
서비스에서 new Room 으로 생성 후 room 만 넘겨주고싶었으나, repository에서 room의 id를 생성해주고있기 때문에
room생성시 필요한 필드들을 service에서 생성후 넘겨주게 되었습니다.
(id생성은 db에서 increase해주는 것 과 같이 책임이 repository에게 있다고 생각해서 id 생성 부분은 repository로 넣었습니다.)
메모리 저장소에는 주로 store라는 패키지 네이밍을 쓴다고하여 store라는 이름으로 패키지 생성했습니다.
동시성을 보장해주는 ConcurreentHashMap, AtomicLong 을 사용하였습니다.
room을 조회하는 api는 없지만 저장 후 테스트를 위해서 만들어놨습니다.(테스트 코드 작성 완료)
클라이언트에서 보내주는 이름과 일치하지 않아서 클라이언트 기준으로 통일
model은 비즈니스에서 의미 있는 도메인 객체를 뜻한다고합니다.
game 밑에 있던 객체,enum들을 model 패키지를 생성하여 아래로 이동했습니다. (/game/model/)
메모리에 저장을 하기 때문에 new 로 객체를 새로 생성해서 테스트와 데이터를 분리하였습니다.
(테스트가 끝나면 GC 대상이 됨)
validation적용을 하였습니다. globalExcpetionhandler를 구현해서 message를 응답에 같이 넣어 줘야합니다.
📚 Reference
✅ Check List