-
Notifications
You must be signed in to change notification settings - Fork 2
Refactor: date time 제공 수정 #169
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
Conversation
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.
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
-
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. ↩
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.
Code Review
날짜와 시간 필드를 datetime으로 통합하여 API 응답 구조를 개선한 점이 좋습니다. 리뷰에서는 CardDetailResponse DTO의 datetime 필드에 @NotNull 어노테이션을 추가하고, Swagger 문서의 예시(@Schema의 example)가 실제 JSON 포맷과 일치하도록 수정하는 것을 제안했습니다. 이를 통해 API의 명세가 더 명확해지고 안정성이 향상될 것입니다.
| @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; |
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.
날짜와 시간을 합쳐서 datetime으로 제공하도록 리팩토링하신 점 좋습니다. 다만 몇 가지 개선할 점이 보입니다.
- 기존의
date와time필드에는@NotNull어노테이션이 있었지만,datetime필드에는 누락되었습니다. API 명세의 일관성과 명확성을 위해@NotNull을 추가하는 것이 좋습니다.createdAt은 보통 null이 아니므로 DTO에도 이 제약조건을 명시하는 것이 안전합니다. @Schema의example값이@JsonFormat에 지정된 패턴과 일치하지 않습니다.example값을"2025-08-09 08:17:29"로 수정하여 API 문서를 사용하는 개발자의 혼동을 줄일 수 있습니다.
| @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; |
#️⃣연관된 이슈
📝작업 내용
💬리뷰 요구사항(선택)
x