Conversation
Summary of ChangesHello, 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은 전체 문서 제목 조회 API의 응답 데이터 구성을 개선하는 작업을 수행합니다. 기존의 제목과 UUID만 반환하던 구조에서 문서 타입과 생성 시간을 포함하도록 확장하였으며, 이에 맞춰 데이터베이스 쿼리와 엔티티 매핑을 최적화하여 필요한 데이터만 효율적으로 조회할 수 있도록 변경하였습니다. Highlights
Using Gemini Code AssistThe 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 by creating a comment using either
Customization To customize the 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 Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. 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. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request updates the document title list retrieval to include the document type and generation time. It maps the dtype field in the Document entity, updates the DocumentTitleListResponse DTO, and modifies the repository query to fetch these new fields. The review feedback suggests mapping the dtype field in Document directly as a DocumentType enum using @Enumerated(EnumType.STRING). This improvement would enhance type safety and allow the removal of the secondary constructor in DocumentTitleListResponse that manually parses the string representation of the enum.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| @Column(name = "dtype", insertable = false, updatable = false) | ||
| private String dtype; |
There was a problem hiding this comment.
dtype 필드를 String 대신 DocumentType enum 타입으로 직접 매핑하면 타입 안정성을 높이고 불필요한 타입 변환 로직을 제거할 수 있습니다.
@Enumerated(EnumType.STRING) 어노테이션을 사용하여 DocumentType으로 매핑하면, DocumentTitleListResponse에서 String을 받아 DocumentType.valueOf()로 변환하는 부 생성자를 제거할 수 있어 코드가 훨씬 깔끔해집니다.
| @Column(name = "dtype", insertable = false, updatable = false) | |
| private String dtype; | |
| @jakarta.persistence.Enumerated(jakarta.persistence.EnumType.STRING) | |
| @Column(name = "dtype", insertable = false, updatable = false) | |
| private DocumentType dtype; |
| public DocumentTitleListResponse( | ||
| String title, | ||
| UUID uuid, | ||
| String documentType, | ||
| LocalDateTime generateTime | ||
| ) { | ||
| this(title, uuid, DocumentType.valueOf(documentType), generateTime); | ||
| } |
| } | ||
| } No newline at end of file |
작업 내용
전체 문서 제목 조회 API 응답 필드를 추가.
documentTypegenerateTimeDocumentTitleListResponse에 문서 타입과 생성 시간 필드를 추가.문서 상속 구분 컬럼인
dtype을 읽기 전용 필드로 매핑.전체 문서 제목 조회 쿼리에서 필요한 필드만 조회하도록 수정.
titleuuiddocumentTypegenerateTime