-
Notifications
You must be signed in to change notification settings - Fork 1
refactor: 동아리 정보 수정 관련 리팩토링 #137
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
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
d87145a
refactor: 동아리 상세 정보 DTO - 회장 이름을 포함하도록 변경
JanooGwan f031a5f
refactor: 동아리 프로필/상세정보 조회 및 수정 API 분리
JanooGwan 8802cc5
chore: 코드 정렬
JanooGwan 55b0a96
fix: 태그 Repository 조회 불가 오류 수정
JanooGwan e28cbe4
fix: 동아리 태그 조회 실패 시 발생하는 예외 수정
JanooGwan 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
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
19 changes: 19 additions & 0 deletions
19
src/main/java/gg/agit/konect/domain/club/dto/ClubBasicInfoUpdateRequest.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 gg.agit.konect.domain.club.dto; | ||
|
|
||
| import gg.agit.konect.domain.club.enums.ClubCategory; | ||
| import io.swagger.v3.oas.annotations.media.Schema; | ||
| import jakarta.validation.constraints.NotBlank; | ||
| import jakarta.validation.constraints.NotNull; | ||
| import jakarta.validation.constraints.Size; | ||
|
|
||
| public record ClubBasicInfoUpdateRequest( | ||
| @Schema(description = "동아리 이름", example = "BCSD Lab", requiredMode = Schema.RequiredMode.REQUIRED) | ||
| @NotBlank(message = "동아리 이름은 필수 입력입니다.") | ||
| @Size(max = 50, message = "동아리 이름은 50자 이하여야 합니다.") | ||
| String name, | ||
|
|
||
| @Schema(description = "동아리 분과", example = "ACADEMIC", requiredMode = Schema.RequiredMode.REQUIRED) | ||
| @NotNull(message = "동아리 분과는 필수 입력입니다.") | ||
| ClubCategory clubCategory | ||
| ) { | ||
| } |
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
18 changes: 18 additions & 0 deletions
18
src/main/java/gg/agit/konect/domain/club/dto/ClubDetailUpdateRequest.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,18 @@ | ||
| package gg.agit.konect.domain.club.dto; | ||
|
|
||
| import io.swagger.v3.oas.annotations.media.Schema; | ||
| import jakarta.validation.constraints.NotBlank; | ||
| import jakarta.validation.constraints.Size; | ||
|
|
||
| public record ClubDetailUpdateRequest( | ||
| @Schema(description = "동아리 방 위치", example = "학생회관 101호", requiredMode = Schema.RequiredMode.REQUIRED) | ||
| @NotBlank(message = "동아리 위치는 필수 입력입니다.") | ||
| @Size(max = 255, message = "동아리 위치는 255자 이하여야 합니다.") | ||
| String location, | ||
|
|
||
| @Schema(description = "동아리 상세 소개", example = "BCSD에서 얻을 수 있는 경험\n1. IT 실무 경험", | ||
| requiredMode = Schema.RequiredMode.REQUIRED) | ||
| @NotBlank(message = "상세 소개는 필수 입력입니다.") | ||
| String introduce | ||
| ) { | ||
| } |
28 changes: 28 additions & 0 deletions
28
src/main/java/gg/agit/konect/domain/club/dto/ClubProfileUpdateRequest.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,28 @@ | ||
| package gg.agit.konect.domain.club.dto; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| import io.swagger.v3.oas.annotations.media.Schema; | ||
| import jakarta.validation.constraints.NotBlank; | ||
| import jakarta.validation.constraints.NotNull; | ||
| import jakarta.validation.constraints.Size; | ||
|
|
||
| public record ClubProfileUpdateRequest( | ||
| @Schema(description = "동아리 한 줄 소개", example = "즐겁게 일하고 열심히 노는 IT 특성화 동아리", | ||
| requiredMode = Schema.RequiredMode.REQUIRED) | ||
| @NotBlank(message = "한 줄 소개는 필수 입력입니다.") | ||
| @Size(max = 20, message = "한 줄 소개는 20자 이하여야 합니다.") | ||
| String introduce, | ||
|
|
||
| @Schema(description = "동아리 로고 이미지 URL", example = "https://example.com/logo.png", | ||
| requiredMode = Schema.RequiredMode.REQUIRED) | ||
| @NotBlank(message = "이미지 URL은 필수 입력입니다.") | ||
| @Size(max = 255, message = "이미지 URL은 255자 이하여야 합니다.") | ||
| String imageUrl, | ||
|
|
||
| @Schema(description = "동아리 태그 ID 목록", example = "[1, 2, 3]", | ||
| requiredMode = Schema.RequiredMode.REQUIRED) | ||
| @NotNull(message = "태그 목록은 필수 입력입니다.") | ||
| List<Integer> tagIds | ||
| ) { | ||
| } |
16 changes: 16 additions & 0 deletions
16
src/main/java/gg/agit/konect/domain/club/dto/ClubTagResponse.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,16 @@ | ||
| package gg.agit.konect.domain.club.dto; | ||
|
|
||
| import gg.agit.konect.domain.club.model.ClubTag; | ||
| import io.swagger.v3.oas.annotations.media.Schema; | ||
|
|
||
| public record ClubTagResponse( | ||
| @Schema(description = "태그 ID", example = "1", requiredMode = Schema.RequiredMode.REQUIRED) | ||
| Integer id, | ||
|
|
||
| @Schema(description = "태그 이름", example = "웹개발", requiredMode = Schema.RequiredMode.REQUIRED) | ||
| String name | ||
| ) { | ||
| public static ClubTagResponse from(ClubTag clubTag) { | ||
| return new ClubTagResponse(clubTag.getId(), clubTag.getName()); | ||
| } | ||
| } |
18 changes: 18 additions & 0 deletions
18
src/main/java/gg/agit/konect/domain/club/dto/ClubTagsResponse.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,18 @@ | ||
| package gg.agit.konect.domain.club.dto; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| import gg.agit.konect.domain.club.model.ClubTag; | ||
| import io.swagger.v3.oas.annotations.media.Schema; | ||
|
|
||
| public record ClubTagsResponse( | ||
| @Schema(description = "태그 목록", requiredMode = Schema.RequiredMode.REQUIRED) | ||
| List<ClubTagResponse> tags | ||
| ) { | ||
| public static ClubTagsResponse from(List<ClubTag> clubTags) { | ||
| List<ClubTagResponse> tags = clubTags.stream() | ||
| .map(ClubTagResponse::from) | ||
| .toList(); | ||
| return new ClubTagsResponse(tags); | ||
| } | ||
| } |
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
Oops, something went wrong.
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.
ClubDetailResponse에서 기존representatives(연락처/이메일 포함) 필드를 제거하고presidentName만 내려주도록 변경되어 응답 스키마가 깨지는 변경입니다. 하위 호환이 필요하다면 기존 필드를 유지하거나 버저닝/마이그레이션 계획(프론트/외부 소비자 반영)을 명확히 해 주세요.