Skip to content

Conversation

@IISweetHeartII
Copy link
Contributor

Summary

PDF 포트폴리오의 AI 구조화 결과를 수정/삭제하는 API를 구현했습니다.

Changes

  • PATCH /external-portfolios/:portfolioId - PDF 포트폴리오 수정
  • DELETE /external-portfolios/:portfolioId - PDF 포트폴리오 삭제
  • ExternalPortfolioService에 update, delete 메서드 추가
  • PortfolioRepository에 update, delete 메서드 추가 (NOT_FOUND 처리)
  • CorrectionItemService에 correctionId 역조회 메서드 추가
  • DTO 정의: UpdatePortfolioBlockReqDTO, StructuredPortfolioResDTO

Type of Change

  • New feature (새로운 기능 추가)

Target Environment

  • Dev (`dev`)

Related Issues

Testing

  • 로컬에서 빌드가 성공합니다 (`pnpm run build`)
  • 로컬에서 린트가 통과합니다 (`pnpm run lint`)
  • LSP diagnostics 검증 완료
  • Postman/Swagger로 API 호출 확인

Checklist

  • 코드 컨벤션을 준수했습니다 (`docs/development/CODE_STYLE.md`)
  • Git 컨벤션을 준수했습니다 (`docs/development/GIT_CONVENTIONS.md`)
  • 네이밍 컨벤션을 준수했습니다 (`docs/development/NAMING_CONVENTIONS.md`)
  • 로컬에서 빌드가 성공합니다 (`pnpm run build`)
  • 로컬에서 린트가 통과합니다 (`pnpm run lint`)
  • (API 변경 시) Swagger 문서가 업데이트되었습니다

Screenshots (Optional)

N/A

Additional Notes

  • 수정/삭제 후 해당 첨삭의 포트폴리오 목록을 반환 (UX 개선)
  • Repository 계층에서 PORTFOLIO_NOT_FOUND 에러 처리
  • FK CASCADE 삭제로 CorrectionItem 자동 정리
  • BusinessException + ErrorCode 패턴 준수
  • DTO 네이밍: ReqDTO, ResDTO (최신 컨벤션 적용)

@gemini-code-assist
Copy link

Summary of Changes

Hello @IISweetHeartII, 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은 AI가 구조화한 PDF 포트폴리오 블록을 사용자가 직접 수정하고 삭제할 수 있는 기능을 도입합니다. 이는 사용자 경험을 개선하고 데이터 관리의 유연성을 높이는 데 중점을 둡니다. 또한, 코드베이스 전반에 걸쳐 DTO 명명 규칙을 표준화하여 일관성과 유지보수성을 향상시키는 중요한 리팩토링 작업도 포함되어 있습니다.

Highlights

  • PDF 포트폴리오 수정/삭제 API 구현: AI 구조화된 PDF 포트폴리오 블록을 수정하고 삭제하는 새로운 API 엔드포인트와 관련 백엔드 로직이 추가되었습니다. 이를 통해 사용자는 개별 포트폴리오 활동을 유연하게 관리할 수 있습니다.
  • DTO 명명 규칙 통일: 프로젝트 전반에 걸쳐 DTO(Data Transfer Object) 명명 규칙이 *Dto에서 *DTO로 통일되었습니다. 이는 코드의 일관성과 가독성을 향상시키는 리팩토링 작업입니다.
  • ExternalPortfolioService 및 Repository 확장: ExternalPortfolioService와 PortfolioRepository에 포트폴리오 수정 및 삭제를 위한 새로운 메서드가 추가되었습니다. 이들 메서드는 PORTFOLIO_NOT_FOUND와 같은 예외 처리를 포함하여 견고성을 높였습니다.
  • CorrectionItemService 역조회 기능 추가: CorrectionItemService에 portfolioId를 통해 correctionId를 역으로 조회하는 기능이 추가되어, 포트폴리오 블록과 첨삭 간의 관계를 효율적으로 관리할 수 있게 되었습니다.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • src/modules/auth/application/dtos/sms-auth.dto.ts
    • DTO 클래스 이름이 SendSmsReqDto에서 SendSmsReqDTO로, VerifySmsReqDto에서 VerifySmsReqDTO로 변경되었습니다.
  • src/modules/auth/presentation/auth.controller.ts
    • 업데이트된 DTO 명명 규칙에 맞춰 SendSmsReqDTOVerifySmsReqDTO의 import 및 사용이 수정되었습니다.
  • src/modules/experience/application/dtos/experience.dto.ts
    • DTO 클래스 이름이 CreateExperienceReqDto에서 CreateExperienceReqDTO로, ExperienceResDto에서 ExperienceResDTO로, ExperienceStateResDto에서 ExperienceStateResDTO로 변경되었습니다.
  • src/modules/experience/application/facades/experience.facade.ts
    • 업데이트된 DTO 명명 규칙에 맞춰 ExperienceResDTO의 import 및 사용이 수정되었습니다.
  • src/modules/experience/application/services/experience.service.ts
    • 업데이트된 DTO 명명 규칙에 맞춰 ExperienceResDTO의 import 및 사용이 수정되었습니다.
  • src/modules/experience/presentation/experience.controller.ts
    • 업데이트된 DTO 명명 규칙에 맞춰 CreateExperienceReqDTO, ExperienceResDTO, ExperienceStateResDTO의 import 및 사용이 수정되었습니다.
  • src/modules/insight/application/dtos/insight-log.dto.ts
    • DTO 클래스 이름이 InsightLogResDto에서 InsightLogResDTO로, DeletedInsightLogResDto에서 DeletedInsightLogResDTO로, CreateInsightLogReqDto에서 CreateInsightLogReqDTO로, UpdateInsightReqDto에서 UpdateInsightReqDTO로 변경되었습니다.
  • src/modules/insight/application/services/insight.service.ts
    • 업데이트된 DTO 명명 규칙에 맞춰 InsightLogResDTOUpdateInsightReqDTO의 import 및 사용이 수정되었습니다.
  • src/modules/insight/presentation/insight.controller.ts
    • 업데이트된 DTO 명명 규칙에 맞춰 CreateInsightLogReqDTO, DeletedInsightLogResDTO, InsightLogResDTO, UpdateInsightReqDTO의 import 및 사용이 수정되었습니다.
  • src/modules/portfolio-correction/application/dtos/company-insight.dto.ts
    • DTO 클래스 이름이 UpdateCompanyInsightReqDto에서 UpdateCompanyInsightReqDTO로, UpdateCompanyInsightResDto에서 UpdateCompanyInsightResDTO로 변경되었습니다.
  • src/modules/portfolio-correction/application/dtos/correction-result.dto.ts
    • DTO 클래스 이름이 CorrectionResultResDto에서 CorrectionResultResDTO로, CorrectionItemResDto에서 CorrectionItemResDTO로 변경되었습니다.
  • src/modules/portfolio-correction/application/dtos/external-portfolio.dto.ts
    • DTO 클래스 이름이 StructuredPortfolioResDto에서 StructuredPortfolioResDTO로, CreateExternalPortfolioReqDto에서 CreateExternalPortfolioReqDTO로, UpdatePortfolioBlockReqDto에서 UpdatePortfolioBlockReqDTO로 변경되었습니다.
  • src/modules/portfolio-correction/application/dtos/portfolio-correction.dto.ts
    • DTO 클래스 이름이 CorrectionResDto에서 CorrectionResDTO로, CreateCorrectionReqDto에서 CreateCorrectionReqDTO로, CorrectionStatusResDto에서 CorrectionStatusResDTO로, MapCorrectionWithPortfoliosReqDto에서 MapCorrectionWithPortfoliosReqDTO로, UpdateCorrectionTitleReqDto에서 UpdateCorrectionTitleReqDTO로 변경되었습니다.
  • src/modules/portfolio-correction/application/facades/external-portfolio.facade.ts
    • PDF 포트폴리오 블록을 수정하는 updateExternalPortfolio 메서드가 추가되었습니다.
    • PDF 포트폴리오 블록을 삭제하는 deleteExternalPortfolio 메서드가 추가되었습니다.
    • 수정/삭제 후 해당 첨삭의 포트폴리오 목록을 반환하도록 로직이 구현되었습니다.
    • 업데이트된 DTO 명명 규칙에 맞춰 StructuredPortfolioResDTOUpdatePortfolioBlockReqDTO의 import 및 사용이 수정되었습니다.
  • src/modules/portfolio-correction/application/services/correction-item.service.ts
    • 주어진 portfolioId에 해당하는 correctionId를 찾아 반환하는 findCorrectionIdByPortfolioIdOrThrow 메서드가 추가되었습니다.
  • src/modules/portfolio-correction/infrastructure/repositories/correction-item.repository.ts
    • findCorrectionIdByPortfolioIdOrThrow 메서드가 구현되어 portfolioIdcorrectionId를 조회하고, 찾지 못할 경우 PORTFOLIO_NOT_FOUND 예외를 발생시킵니다.
    • BusinessExceptionErrorCode가 import 되었습니다.
  • src/modules/portfolio-correction/presentation/external-portfolio.controller.ts
    • PATCH /external-portfolios/:portfolioId 엔드포인트가 추가되어 PDF 포트폴리오 블록을 수정합니다.
    • DELETE /external-portfolios/:portfolioId 엔드포인트가 추가되어 PDF 포트폴리오 블록을 삭제합니다.
    • 업데이트된 DTO 명명 규칙에 맞춰 CreateExternalPortfolioReqDTO, StructuredPortfolioResDTO, UpdatePortfolioBlockReqDTO의 import 및 사용이 수정되었습니다.
  • src/modules/portfolio-correction/presentation/portfolio-correction.controller.ts
    • 업데이트된 DTO 명명 규칙에 맞춰 CorrectionResDTO, CorrectionStatusResDTO, CreateCorrectionReqDTO, MapCorrectionWithPortfoliosReqDTO, UpdateCorrectionTitleReqDTO, UpdateCompanyInsightReqDTO, UpdateCompanyInsightResDTO, CorrectionItemResDTO, CorrectionResultResDTO의 import 및 사용이 수정되었습니다.
  • src/modules/portfolio/application/dtos/portfolio.dto.ts
    • DTO 클래스 이름이 PortfolioDetailResDto에서 PortfolioDetailResDTO로, UpdatePortfolioReqDto에서 UpdatePortfolioReqDTO로, ExportPortfolioResDto에서 ExportPortfolioResDTO로 변경되었습니다.
  • src/modules/portfolio/application/services/external-portfolio.service.ts
    • 외부 포트폴리오를 업데이트하는 updateExternalPortfolio 메서드가 추가되었습니다.
    • 외부 포트폴리오를 삭제하는 deleteExternalPortfolio 메서드가 추가되었습니다.
    • 외부 포트폴리오 업데이트를 위한 ExternalPortfolioUpdateValues 타입이 정의되었습니다.
  • src/modules/portfolio/infrastructure/repositories/portfolio.repository.ts
    • 외부 포트폴리오를 업데이트하는 updateExternalPortfolio 메서드가 추가되었습니다.
    • 외부 포트폴리오를 삭제하는 deleteExternalPortfolio 메서드가 추가되었습니다.
    • 외부 포트폴리오 ID로 조회하고 예외를 발생시키는 findExternalByIdOrThrow 프라이빗 메서드가 추가되었습니다.
    • BusinessExceptionErrorCode가 import 되었습니다.
    • 외부 포트폴리오 업데이트를 위한 ExternalPortfolioUpdateValues 타입이 정의되었습니다.
  • src/modules/portfolio/presentation/portfolio.controller.ts
    • 업데이트된 DTO 명명 규칙에 맞춰 ExportPortfolioResDTO, PortfolioDetailResDTO, UpdatePortfolioReqDTO의 import 및 사용이 수정되었습니다.
  • src/modules/user/application/dtos/marketing-agree.dto.ts
    • DTO 클래스 이름이 AgreeMarketingReqDto에서 AgreeMarketingReqDTO로, AgreeMarketingResDto에서 AgreeMarketingResDTO로 변경되었습니다.
  • src/modules/user/application/dtos/user-profile.dto.ts
    • DTO 클래스 이름이 UserProfileResDto에서 UserProfileResDTO로, UpdateUserNameReqDto에서 UpdateUserNameReqDTO로 변경되었습니다.
  • src/modules/user/application/services/user.service.ts
    • 업데이트된 DTO 명명 규칙에 맞춰 UserProfileResDTO의 import 및 사용이 수정되었습니다.
  • src/modules/user/presentation/user.controller.ts
    • 업데이트된 DTO 명명 규칙에 맞춰 UpdateUserNameReqDTO, UserProfileResDTO, AgreeMarketingReqDTO, AgreeMarketingResDTO의 import 및 사용이 수정되었습니다.
Ignored Files
  • Ignored by pattern: *.md (7)
    • CLAUDE.md
    • docs/architecture/ARCHITECTURE.md
    • docs/development/CODE_STYLE.md
    • docs/development/CONVENTIONS.md
    • docs/development/ERROR_HANDLING.md
    • docs/development/GIT_CONVENTIONS.md
    • docs/development/NAMING_CONVENTIONS.md
Activity
  • IISweetHeartII님이 PDF 포트폴리오의 AI 구조화 결과를 수정/삭제하는 API를 구현했습니다.
  • 이 PR은 새로운 기능 추가(Feat) 유형으로 분류되었습니다.
  • 개발 환경(dev)을 대상으로 변경사항이 적용됩니다.
  • 로컬 빌드 및 린트 검사를 성공적으로 통과했으며, LSP 진단 검증도 완료되었습니다.
  • 코드, Git, 네이밍 컨벤션을 준수했습니다.
  • 수정/삭제 후 해당 첨삭의 포트폴리오 목록을 반환하여 사용자 경험을 개선했습니다.
  • Repository 계층에서 PORTFOLIO_NOT_FOUND 에러를 처리하도록 구현되었습니다.
  • 외래 키(FK) CASCADE 삭제를 통해 CorrectionItem이 자동으로 정리되도록 설정되었습니다.
  • BusinessException + ErrorCode 패턴을 준수하여 예외 처리가 이루어졌습니다.
  • DTO 네이밍은 최신 컨벤션인 ReqDTO, ResDTO를 적용했습니다.
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 by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

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 pull request 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

PDF 포트폴리오 수정/삭제 API 구현 및 DTO 네이밍 컨벤션 통일 관련 변경 사항을 검토했습니다. 기능 구현은 올바르게 이루어졌으나, 코드 유지보수성 관점에서 개선할 점이 두 가지 있습니다. 첫째, Facade 계층에 중복된 코드가 존재하여 리팩토링이 필요합니다. 둘째, 여러 파일에 동일한 타입이 중복 선언되어 있어 하나로 통합해야 합니다. 자세한 내용은 아래 코멘트를 확인해주세요.

@IISweetHeartII IISweetHeartII force-pushed the feat/external-portfolio-update-#45 branch 2 times, most recently from e0c65cf to aa8dbc0 Compare February 8, 2026 19:24
@IISweetHeartII IISweetHeartII self-assigned this Feb 8, 2026
@IISweetHeartII IISweetHeartII added ✨ feature New feature or request 덕환 labels Feb 8, 2026
Copy link
Contributor

@hyoinkang hyoinkang left a comment

Choose a reason for hiding this comment

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

Request DTO 관련해서 검증 로직이 빠져있는 것 같은데 확인해주세요!

- CorrectionItemRepository: throw 로직 제거, 순수 데이터 접근으로 수정

- CorrectionItemService: findCorrectionIdByPortfolioIdOrThrow에 BusinessException 이동

- origin/dev의 findByCorrectionId 메서드 보존
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ feature New feature or request 덕환

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat] PDF 포트폴리오 수정/삭제 API 구현

2 participants