Skip to content

feat: 마음 기록 전면 카메라 사진 등록 기능 추가 (사진 2개 등록 가능하도록)#89

Merged
Neibce merged 1 commit intomainfrom
be/feat/add-maum-front-image
Aug 8, 2025
Merged

feat: 마음 기록 전면 카메라 사진 등록 기능 추가 (사진 2개 등록 가능하도록)#89
Neibce merged 1 commit intomainfrom
be/feat/add-maum-front-image

Conversation

@Neibce
Copy link
Owner

@Neibce Neibce commented Aug 8, 2025

Summary by CodeRabbit

  • New Features

    • 마음로그 업로드 시 앞면과 뒷면 파일을 각각 등록할 수 있도록 기능이 확장되었습니다.
    • presigned URL 발급 시 앞면과 뒷면 파일 각각에 대해 파일명과 URL이 제공됩니다.
  • Bug Fixes

    • 파일명 중복 검사 및 저장 로직이 앞면/뒷면 파일별로 정확하게 동작하도록 개선되었습니다.

@coderabbitai
Copy link

coderabbitai bot commented Aug 8, 2025

Walkthrough

마음로그 기능에서 단일 파일(이름 및 확장자) 기반 처리 구조를 프론트/백 두 개의 파일 이름과 presigned URL을 개별적으로 다루는 방식으로 전환하였습니다. 이에 따라 DTO, 엔티티, 레포지토리, 서비스 계층의 필드, 메서드 시그니처 및 검증 로직이 모두 두 파일 체계에 맞게 변경되었습니다.

Changes

Cohort / File(s) Change Summary
Presigned Response DTO 구조 변경
backend/ongi/src/main/java/ongi/maum_log/dto/MaumLogPresignedResponseDto.java
presignedUrl, fileName → frontFileName, frontPresignedUrl, backFileName, backPresignedUrl 네 필드로 교체; 정적 팩토리 메서드도 이에 맞춰 파라미터 및 반환 구조 변경
Upload Request DTO 구조 변경
backend/ongi/src/main/java/ongi/maum_log/dto/MaumLogUploadRequestDto.java
fileName, fileExtension → frontFileName, backFileName 두 필드로 교체; 각 필드에 @NotNull 적용
엔티티 구조 변경
backend/ongi/src/main/java/ongi/maum_log/entity/MaumLog.java
fileName → frontFileName으로 필드명 및 어노테이션 변경, fileExtension 필드 제거, backFileName 필드 추가 및 unique 제약 부여
레포지토리 메서드 분리
backend/ongi/src/main/java/ongi/maum_log/repository/MaumLogRepository.java
existsByFileName(String) → existsByFrontFileName(String), existsByBackFileName(String) 두 메서드로 분리
서비스 계층 주요 로직 변경
backend/ongi/src/main/java/ongi/maum_log/service/MaumLogService.java
단일 파일 처리 → front/back 파일명 각각의 존재 검증, presigned URL 발급 및 엔티티 저장; 관련 메서드 시그니처 및 내부 로직 전면 수정

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant Service
    participant Repository
    participant S3

    Client->>Service: getPresignedPutUrl()
    Service->>S3: generatePresignedUrl(front)
    Service->>S3: generatePresignedUrl(back)
    Service-->>Client: return frontFileName, frontPresignedUrl, backFileName, backPresignedUrl

    Client->>Service: createMaumLog(frontFileName, backFileName, ...)
    Service->>Repository: existsByFrontFileName(frontFileName)
    Service->>Repository: existsByBackFileName(backFileName)
    Service->>S3: check frontFile existence
    Service->>S3: check backFile existence
    Service->>Repository: save MaumLog(frontFileName, backFileName, ...)
    Service-->>Client: 완료 응답
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇
앞면, 뒷면 두 파일로
마음로그 새단장!
presigned URL도
한 쌍씩 번쩍 번쩍.
토끼는 귀를 쫑긋 세워
코드 변화에 깡충깡충,
두 배로 안전해진 로그에
당근 한 입, 만세!
🥕

Note

🔌 MCP (Model Context Protocol) integration is now available in Early Access!

Pro users can now connect to remote MCP servers under the Integrations page to get reviews and chat conversations that understand additional development context.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Free

📥 Commits

Reviewing files that changed from the base of the PR and between 078e1e8 and 9de9ccc.

📒 Files selected for processing (5)
  • backend/ongi/src/main/java/ongi/maum_log/dto/MaumLogPresignedResponseDto.java (1 hunks)
  • backend/ongi/src/main/java/ongi/maum_log/dto/MaumLogUploadRequestDto.java (1 hunks)
  • backend/ongi/src/main/java/ongi/maum_log/entity/MaumLog.java (1 hunks)
  • backend/ongi/src/main/java/ongi/maum_log/repository/MaumLogRepository.java (1 hunks)
  • backend/ongi/src/main/java/ongi/maum_log/service/MaumLogService.java (3 hunks)

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Join our Discord community for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@Neibce Neibce merged commit 3cf9e49 into main Aug 8, 2025
4 checks passed
@Neibce Neibce deleted the be/feat/add-maum-front-image branch August 8, 2025 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant