Skip to content

Conversation

@2anizirong
Copy link
Member

#️⃣연관된 이슈

ex) #166

📝작업 내용

ㅈㄱㄴ

💬리뷰 요구사항(선택)

x

@2anizirong 2anizirong self-assigned this Aug 19, 2025
@2anizirong 2anizirong added the ♻️ Refactor 대망의 리팩토링 label Aug 19, 2025
@2anizirong 2anizirong linked an issue Aug 19, 2025 that may be closed by this pull request
3 tasks
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @2anizirong, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 CardDetailResponse 객체에서 날짜와 시간 정보를 제공하는 방식을 리팩토링합니다. 기존에 LocalDate와 LocalTime으로 분리되어 있던 필드를 LocalDateTime 단일 필드로 통합하여 데이터 모델을 간소화하고, 날짜/시간 처리를 일관되게 만듭니다.

Highlights

  • 날짜/시간 필드 통합: CardDetailResponse에서 date (LocalDate)와 time (LocalTime) 필드를 datetime (LocalDateTime) 단일 필드로 대체했습니다.
  • 컨버터 로직 업데이트: CardConverter에서 card.getCreatedAt() 메서드를 직접 사용하여 새로운 datetime 필드를 설정하도록 수정했습니다.
  • 직렬화 형식 지정: datetime 필드에 @DateTimeFormat 및 @jsonformat 어노테이션을 추가하여 JSON 직렬화 시 "yyyy-MM-dd HH:mm:ss" 형식으로 일관되게 출력되도록 했습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

날짜와 시간 필드를 datetime으로 통합하여 API 응답 구조를 개선한 점이 좋습니다. 리뷰에서는 CardDetailResponse DTO의 datetime 필드에 @NotNull 어노테이션을 추가하고, Swagger 문서의 예시(@Schemaexample)가 실제 JSON 포맷과 일치하도록 수정하는 것을 제안했습니다. 이를 통해 API의 명세가 더 명확해지고 안정성이 향상될 것입니다.

Comment on lines 86 to 89
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") // JSON 변환 시 포맷 지정
@Schema(description = "날짜/시간", example = "2025-08-09T08:17:29")
private LocalDateTime datetime;

Choose a reason for hiding this comment

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

medium

날짜와 시간을 합쳐서 datetime으로 제공하도록 리팩토링하신 점 좋습니다. 다만 몇 가지 개선할 점이 보입니다.

  1. 기존의 datetime 필드에는 @NotNull 어노테이션이 있었지만, datetime 필드에는 누락되었습니다. API 명세의 일관성과 명확성을 위해 @NotNull을 추가하는 것이 좋습니다. createdAt은 보통 null이 아니므로 DTO에도 이 제약조건을 명시하는 것이 안전합니다.
  2. @Schemaexample 값이 @JsonFormat에 지정된 패턴과 일치하지 않습니다. example 값을 "2025-08-09 08:17:29"로 수정하여 API 문서를 사용하는 개발자의 혼동을 줄일 수 있습니다.
Suggested change
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") // JSON 변환 시 포맷 지정
@Schema(description = "날짜/시간", example = "2025-08-09T08:17:29")
private LocalDateTime datetime;
@NotNull
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") // JSON 변환 시 포맷 지정
@Schema(description = "날짜/시간", example = "2025-08-09 08:17:29")
private LocalDateTime datetime;

@2anizirong 2anizirong merged commit 0da720d into main Aug 19, 2025
2 checks passed
@2anizirong 2anizirong deleted the refactor/166-card-detail-date-time branch August 19, 2025 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

♻️ Refactor 대망의 리팩토링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Refactor] 카드 상세 조회 date, time 형식 수정

2 participants