-
Notifications
You must be signed in to change notification settings - Fork 2
크루 참여 요청 #29
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
Merged
크루 참여 요청 #29
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
c27a816
fix: conflict repair
mandykr d704fce
fix: conflict repair
mandykr b7ad288
feat: 크루 모집상태 변경시 최대 인원수 검증 추가
mandykr cb36d7e
fix: conflict repair
mandykr fae20ed
fix: conflict repair
mandykr 2a6704e
fix: conflict repair
mandykr ca4810f
refactor: CrewMembers size 조회 메서드 추가
mandykr 7d791cc
fix: conflict repair
mandykr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
53 changes: 46 additions & 7 deletions
53
src/main/java/com/retrip/crew/application/in/CrewService.java
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
8 changes: 8 additions & 0 deletions
8
src/main/java/com/retrip/crew/application/in/request/CreateDemandRequest.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| package com.retrip.crew.application.in.request; | ||
|
|
||
| import java.util.UUID; | ||
|
|
||
| public record CreateDemandRequest( | ||
| UUID memberId | ||
| ) { | ||
| } |
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
20 changes: 20 additions & 0 deletions
20
src/main/java/com/retrip/crew/application/in/request/CrewUpdateRequest.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| package com.retrip.crew.application.in.request; | ||
|
|
||
| import io.swagger.v3.oas.annotations.media.Schema; | ||
| import jakarta.validation.constraints.Size; | ||
|
|
||
| @Schema(description = "크루 정보 수정 Request") | ||
| public record CrewUpdateRequest( | ||
| @Schema(description = "크루 타이틀") | ||
| @Size(min = 1, max = 30) | ||
| String title, | ||
|
|
||
| @Schema(description = "크루 설명") | ||
| @Size(min = 1, max = 500) | ||
| String description, | ||
|
|
||
| @Schema(description = "크루 최대 인원수") | ||
| @Size(min = 5, max = 1000) | ||
| int maxMembers | ||
| ) { | ||
| } | ||
19 changes: 19 additions & 0 deletions
19
src/main/java/com/retrip/crew/application/in/response/ChangeRecruitmentStatusResponse.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| package com.retrip.crew.application.in.response; | ||
|
|
||
| import com.retrip.crew.domain.entity.Crew; | ||
| import com.retrip.crew.domain.vo.RecruitmentStatus; | ||
| import io.swagger.v3.oas.annotations.media.Schema; | ||
|
|
||
| import java.util.UUID; | ||
|
|
||
| public record ChangeRecruitmentStatusResponse( | ||
| @Schema(description = "크루 ID") | ||
| UUID id, | ||
|
|
||
| @Schema(description = "모집 상태") | ||
| RecruitmentStatus status | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 해당 값 Enum 값 Swagger에 어떻게 표시되는지 확인 가능하실까요?? |
||
| ) { | ||
| public static ChangeRecruitmentStatusResponse of(Crew crew) { | ||
| return new ChangeRecruitmentStatusResponse(crew.getId(), crew.getRecruitment().getStatus()); | ||
| } | ||
| } | ||
14 changes: 14 additions & 0 deletions
14
src/main/java/com/retrip/crew/application/in/response/CreateDemandResponse.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| package com.retrip.crew.application.in.response; | ||
|
|
||
| import com.retrip.crew.domain.entity.Demand; | ||
|
|
||
| import java.util.UUID; | ||
|
|
||
| public record CreateDemandResponse( | ||
| UUID crewId, | ||
| UUID memberId | ||
| ) { | ||
| public static CreateDemandResponse of(UUID crewId, Demand demand) { | ||
| return new CreateDemandResponse(crewId, demand.getMemberId()); | ||
| } | ||
| } |
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
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
38 changes: 38 additions & 0 deletions
38
src/main/java/com/retrip/crew/application/in/response/CrewUpdateResponse.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| package com.retrip.crew.application.in.response; | ||
|
|
||
| import com.retrip.crew.domain.entity.Crew; | ||
| import com.retrip.crew.domain.vo.RecruitmentStatus; | ||
| import io.swagger.v3.oas.annotations.media.Schema; | ||
|
|
||
| import java.util.UUID; | ||
|
|
||
| public record CrewUpdateResponse( | ||
| @Schema(description = "크루 ID") | ||
| UUID id, | ||
|
|
||
| @Schema(description = "크루 타이틀") | ||
| String title, | ||
|
|
||
| @Schema(description = "크루 설명") | ||
| String description, | ||
|
|
||
| @Schema(description = "리더 ID") | ||
| UUID leaderId, | ||
|
|
||
| @Schema(description = "크루 최대 인원수") | ||
| int maxMembers, | ||
|
|
||
| @Schema(description = "모집 상태") | ||
| RecruitmentStatus status | ||
| ) { | ||
| public static CrewUpdateResponse of(Crew crew) { | ||
| return new CrewUpdateResponse( | ||
| crew.getId(), | ||
| crew.getTitle().getValue(), | ||
| crew.getDescription(), | ||
| crew.getLeader().getId(), | ||
| crew.getRecruitment().getMaxMembers(), | ||
| crew.getRecruitment().getStatus() | ||
| ); | ||
| } | ||
| } |
8 changes: 0 additions & 8 deletions
8
src/main/java/com/retrip/crew/application/in/usecase/CreateCrewUseCase.java
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
src/main/java/com/retrip/crew/application/in/usecase/ManageCrewUseCase.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| package com.retrip.crew.application.in.usecase; | ||
|
|
||
| import com.retrip.crew.application.in.request.CrewCreateRequest; | ||
| import com.retrip.crew.application.in.request.CrewUpdateRequest; | ||
| import com.retrip.crew.application.in.response.CrewCreateResponse; | ||
| import com.retrip.crew.application.in.response.CrewUpdateResponse; | ||
|
|
||
| import java.util.UUID; | ||
|
|
||
| public interface ManageCrewUseCase { | ||
| CrewCreateResponse createCrew(CrewCreateRequest request); | ||
|
|
||
| CrewUpdateResponse updateCrew(UUID crewId, CrewUpdateRequest request); | ||
| } |
10 changes: 10 additions & 0 deletions
10
src/main/java/com/retrip/crew/application/in/usecase/ManageDemandUseCase.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| package com.retrip.crew.application.in.usecase; | ||
|
|
||
| import com.retrip.crew.application.in.request.CreateDemandRequest; | ||
| import com.retrip.crew.application.in.response.CreateDemandResponse; | ||
|
|
||
| import java.util.UUID; | ||
|
|
||
| public interface ManageDemandUseCase { | ||
| CreateDemandResponse createDemand(UUID crewId, CreateDemandRequest request); | ||
| } |
11 changes: 11 additions & 0 deletions
11
src/main/java/com/retrip/crew/application/in/usecase/UpdateRecruitmentUseCase.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| package com.retrip.crew.application.in.usecase; | ||
|
|
||
| import com.retrip.crew.application.in.response.ChangeRecruitmentStatusResponse; | ||
|
|
||
| import java.util.UUID; | ||
|
|
||
| public interface UpdateRecruitmentUseCase { | ||
| ChangeRecruitmentStatusResponse startRecruitment(UUID crewId); | ||
|
|
||
| ChangeRecruitmentStatusResponse stopRecruitment(UUID crewId); | ||
| } |
Oops, something went wrong.
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.
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.
ditto