Skip to content

[FEAT/#12] teams / 팀 생성 · 조회 · 수정 · 삭제 로직 구현#21

Open
EunHaSong wants to merge 30 commits into
developfrom
#12-teams/in-he
Open

[FEAT/#12] teams / 팀 생성 · 조회 · 수정 · 삭제 로직 구현#21
EunHaSong wants to merge 30 commits into
developfrom
#12-teams/in-he

Conversation

@EunHaSong
Copy link
Copy Markdown
Collaborator

@EunHaSong EunHaSong commented May 25, 2026

이슈 번호

#12

작업 내용

  • 팀 생성/상세 조회/수정/삭제 API 기능 구현
  • Team, TeamUser, TeamPart, TeamLink 관련 Entity 및 Repository 구성
  • 팀 상세 조회 시 링크, 파트, 멤버 수를 함께 응답하도록 로직 추가
  • 팀 수정 시 변경된 값만 반영하고, 변경 사항이 없는 경우 예외 처리
  • 팀 수정/삭제 시 사용자 권한 검증 로직 추가
  • 삭제된 팀은 조회/수정/삭제 대상에서 제외되도록 처리
  • teamPublicId, userPublicId 기반으로 팀 및 사용자 조회하도록 수정
  • API 테스트를 위한 Swagger Header 설정 및 인증 헤더 파라미터 숨김 처리
  • Response DTO 및 Link 응답 구조 정리

기타

일단 기본적으로 swagger 테스트는 완료했습니다.

image

EunHaSong added 27 commits May 13, 2026 18:07
단, 현재 상태에서는 테스트를 진행하지 않았음.
@EunHaSong EunHaSong self-assigned this May 25, 2026
@EunHaSong EunHaSong added the ✨ feature New feature label May 25, 2026
@PatchMapping
fun updateTeamDetail(
@Parameter(hidden = true)
@RequestHeader("X-User-Public-Id") userPublicId: UUID,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

user id로 변경해주세요!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AuthenticationPrincipal 어노테이션으로 JWT토큰 이용한 userId 가져오기 로직으로 해주세요!

@RequestHeader("X-User-Public-Id") userPublicId: UUID,

@Parameter(hidden = true)
@RequestHeader("X-Team-Public-Id") teamPublicId: UUID,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

team id로 변경해주세요!

}
}

private fun isNotChanged(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

valid로 바꿔서 에러코드 반환까지 여기서 하는걸 추천합니다

Copy link
Copy Markdown
Contributor

@youngseo22 youngseo22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

구웃 ~ 처음 백엔드 개발인데 너무 잘햇다 ~

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JsonProperty로 invite_code 처럼 스네이크코드로 하면 responseBody를 스네이크코드로 받을텐데?!!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아하 그러면 Response와 Request 모두 수정해둘게요!!

@PatchMapping
fun updateTeamDetail(
@Parameter(hidden = true)
@RequestHeader("X-User-Public-Id") userPublicId: UUID,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AuthenticationPrincipal 어노테이션으로 JWT토큰 이용한 userId 가져오기 로직으로 해주세요!

Comment on lines +39 to +40
@Column(name = "deleted_at", nullable = true)
var deletedAt: OffsetDateTime? = null,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이것도 global에 파일 하나 만들어서 사용하는 거 어떻게 생각해?

Copy link
Copy Markdown
Collaborator Author

@EunHaSong EunHaSong May 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

그러면 하나 만들어서 사용해볼까?? 나는 좋아요~

import org.springframework.stereotype.Repository
import java.util.UUID

@Repository
Copy link
Copy Markdown
Contributor

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

Labels

✨ feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants