Skip to content

[WTH-475] 캘린더 api 구현 - #99

Merged
woneeeee merged 8 commits into
devfrom
feat/WTH-475-캘린더-API-구현
Aug 25, 2026

Hidden character warning

The head ref may contain hidden characters: "feat/WTH-475-\uce98\ub9b0\ub354-API-\uad6c\ud604"
Merged

[WTH-475] 캘린더 api 구현#99
woneeeee merged 8 commits into
devfrom
feat/WTH-475-캘린더-API-구현

Conversation

@woneeeee

@woneeeee woneeeee commented Aug 25, 2026

Copy link
Copy Markdown
Member

📌 Summary

어떤 작업인지 한 줄 요약해 주세요.

캘린더 화면에서 사용할 월별 일정 조회 및 일정 상세 조회 API를 추가합니다

📝 Changes

변경사항을 what, why, how로 구분해 작성해 주세요.

What

  • GET /api/v4/clubs/{clubId}/schedules/monthly — 월별 일정 조회에 cardinal 쿼리 파라미터 추가
  • GET /api/v4/clubs/{clubId}/schedules/{id}?type=EVENT|SESSION — 일정 상세 조회 API 신규 추가
  • GET /api/v4/clubs/{clubId}/schedules/yearly — Swagger에서 hidden 처리 (미사용)

Why

캘린더 화면에서 기수 드롭다운으로 선택한 기수의 일정을 조회합니다
상세 조회는 일반 일정(Event)과 세션(Session)의 ID가 각각 독립 시퀀스로 생성되어 중복될 수 있기 때문에, type 파라미터로 구분합니다

How

월별 일정 조회

  • EventRepository, SessionRepositoryclubId + cardinal + 날짜 범위 조건의 쿼리 추가
  • GetScheduleQueryService.findMonthly()cardinal: Int 파라미터 추가 및 기수 필터 쿼리 적용

상세 일정 조회

  • type=EVENT: Event 테이블에서 조회, 출석 관련 필드 전부 null 반환
  • type=SESSION: Session 조회 + AttendanceReader로 참석자 목록 및 현재 유저 출석 상태 계산
  • 출석 상태(ScheduleAttendanceStatus) 도출 로직:
    • COMPLETED: Attendance.status == ATTENDattendedAt(= modifiedAt) 포함
    • ABSENT: Attendance.status == ABSENT
    • OPEN: PENDING + Session.status == OPEN + 현재 시각이 세션 시간 내
    • UPCOMING: 그 외 PENDING
  • 참석자 목록: AttendanceRepository.findAllBySession() (EntityGraph로 N+1 방지)
  • 프로필 이미지: FileAccessUrlPort로 storageKey → URL 변환

📸 Screenshots / Logs

필요시 스크린샷 or 로그를 첨부해주세요.

image

💡 Reviewer 참고사항

리뷰에 참고할 내용을 작성해주세요.

출석 완료 시간(attendedAt) 관련

  • Attendance 엔티티에 별도 attendedAt 컬럼이 없어서 BaseEntity.modifiedAt을 출석 완료 시간으로 사용했습니다! attend() 호출 시 JPA가 modifiedAt을 갱신하기에 출석 시각과 동일하다고 생각해서 사용했습니다...!!

cardinal 파라미터 필요 여부 논의

  • 월별 일정 조회에 cardinal 파라미터를 추가했습니다. 기수별 활동 기간이 겹치지 않는다면 날짜 범위만으로도 필터가 가능하지만, 프론트에서 해당 기수의 기간을 알 수 없다고 판단해 기수를 명시적으로 전달하는 방식을 채택했습니닷...!! 의견 있으시면 코멘트 남겨주세요!

✅ Checklist

  • PR 제목 설정 완료 (WTH-123 인증 필터 설정)
  • 테스트 구현 완료
  • 리뷰어 등록 완료
  • 자체 코드 리뷰 완료

@woneeeee
woneeeee requested review from hyxklee and soo0711 August 25, 2026 09:29
@woneeeee woneeeee self-assigned this Aug 25, 2026
@woneeeee woneeeee added the 📬 API 서버 API 통신 label Aug 25, 2026
@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9de8c0a4-b759-49f2-a022-940b4d76e71c


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

val name: String,
@field:Schema(description = "학과", example = "컴퓨터공학과")
val department: String?,
@field:Schema(description = "직급", example = "USER")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

저희가 지금 직급이라고 용어를 쓰고 있었나용..? 기억이...가물가물..

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.

직급이란 용어 안 썼던것 같은데 역할...? 뭐라고 해야할까요..

@woneeeee woneeeee Aug 25, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

다른 dto에서는 권한이나 멤버 권한으로 통일되어 있는데 피그마에 직급으로 표기되어 있어서 그대로 사용했었습니다,,, 권한으로 수정하겠습니당!

else -> ScheduleAttendanceStatus.ABSENT
}
}
return when (attendance.status) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

if 문 대신 쓰면 좋을 kotlin 문법입니당 한 번 찾아보시면 좋을 것 같아용

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

넵 감사합니당~~👍🏻


@GetMapping("/yearly")
@Operation(summary = "연도별 일정 조회")
@Operation(summary = "연도별 일정 조회", hidden = true)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

안쓰고 있다면 Deprecated 처리해줘도 좋을 것 같아요 FE 분들이 구분하기 편하게

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

hidden = true는 제거하고 deprecated = true로 처리했습니다!!

@hyxklee hyxklee left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

문제 없는 것 같네영! 고생하셨습니다앙

@soo0711 soo0711 left a comment

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.

수고하셨습니닷!

Comment on lines +103 to +104
now.isBefore(session.start) -> ScheduleAttendanceStatus.UPCOMING
session.status == SessionStatus.OPEN && !now.isAfter(session.end) -> ScheduleAttendanceStatus.OPEN

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.

저희 세션 시작 전후 10분까지 출석이 가능해서 +- 10을 추가해야할 것 같습니도!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Session.isCheckInAllowed()에 이미 +-10분 로직이 있어서 해당 메서드를 활용하는 방향으로 수정했습니당!!

@woneeeee
woneeeee merged commit 62726ba into dev Aug 25, 2026
2 checks passed
@woneeeee
woneeeee deleted the feat/WTH-475-캘린더-API-구현 branch August 25, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📬 API 서버 API 통신

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants