Skip to content

Conversation

@seojelee9999
Copy link
Contributor

@seojelee9999 seojelee9999 commented Dec 23, 2025

✨ 변경 사항


✅ 테스트


  • 수동 테스트 완료
  • 테스트 코드 완료

Summary by CodeRabbit

  • Refactor
    • 장바구니 기능의 내부 코드 구조를 개선하기 위한 리팩토링이 진행되었습니다. 이는 코드 품질 향상과 유지보수성 개선을 목표로 하며, 기존 기능이나 사용자 경험에는 영향을 미치지 않습니다.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 23, 2025

개요

Cart 엔티티의 필드 이름을 cart_id에서 cartId로 변경하였습니다. 데이터베이스 컬럼 매핑은 @Column(name = "cart_id") 어노테이션으로 유지되며, Lombok이 생성하는 getter/setter 메서드 이름만 변경됩니다.

변경 사항

코호트 / 파일 변경 요약
필드 명명 규칙 업데이트
src/main/java/com/campustable/be/domain/cart/entity/Cart.java
필드명 private Long cart_id;private Long cartId;로 변경. 데이터베이스 매핑 어노테이션 유지. Lombok 생성 접근자 메서드명 변경: getCart_id()/setCart_id()getCartId()/setCartId()

예상 코드 리뷰 노력

🎯 2 (Simple) | ⏱️ ~10분

관련 가능성 있는 PR

🐰 긴 이름에서 짧은 이름으로,
카멜케이스의 춤을 춤.
데이터베이스는 그대로 두고,
코드는 더 예뻐지네요.
cart_id여, 안녕! 🎉

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목이 변경 내용의 핵심을 명확하게 반영하고 있습니다. 'Cart 필드 카멜케이스로 변경'은 cart_id를 cartId로 변경하는 주요 변경 사항을 정확하게 설명합니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 20251107_#17_cart_Domain_crud기능추가

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7034172 and 088bb6f.

📒 Files selected for processing (1)
  • src/main/java/com/campustable/be/domain/cart/entity/Cart.java

@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "cart_id")
private Long cart_id;
private Long cartId;
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash

# Test 1: Check for getCart_id() usage
echo "=== Searching for getCart_id() usage ==="
rg -i "getCart_id\s*\(" --type java -C 2 || echo "No matches found for getCart_id()"

# Test 2: Check for setCart_id() usage
echo -e "\n=== Searching for setCart_id() usage ==="
rg -i "setCart_id\s*\(" --type java -C 2 || echo "No matches found for setCart_id()"

# Test 3: Check for other snake_case private fields in cart domain
echo -e "\n=== Checking for other snake_case fields in cart domain ==="
fd -e java . src/main/java/com/campustable/be/domain/cart --exec rg -n 'private\s+\w+\s+\w+_\w+' {} + || echo "No snake_case fields found"

# Test 4: Check if Cart.java file exists and show its current state
echo -e "\n=== Current Cart.java field names ==="
cat src/main/java/com/campustable/be/domain/cart/entity/Cart.java 2>/dev/null | head -50 || echo "File not found or unable to read"

Repository: CampusTable/campus-table-be

Length of output: 2763


모든 사용처를 getCartId()로 업데이트하지 않았습니다. CartService.java에서 수정이 필요합니다.

필드명을 cart_id에서 cartId로 변경하여 자바 네이밍 컨벤션을 따르도록 한 것은 적절합니다. @Column(name = "cart_id") 어노테이션이 유지되어 데이터베이스 스키마에는 영향이 없습니다.

다만, Lombok이 생성하는 getter 메서드명이 getCart_id()에서 getCartId()로 변경되었으므로, CartService.java에서 여전히 사용 중인 다음 두 줄을 수정해야 합니다:

  • cart.getCart_id()cart.getCartId()
  • cart.get().getCart_id()cart.get().getCartId()
🤖 Prompt for AI Agents
In src/main/java/com/campustable/be/domain/cart/service/CartService.java (update
the few occurrences where cart.getCart_id() is used), the code still calls the
old Lombok-generated getter name getCart_id(); change all occurrences to the new
camelCase getter getCartId() — specifically replace cart.getCart_id() with
cart.getCartId() and cart.get().getCart_id() with cart.get().getCartId(); ensure
imports/compilation unaffected and run tests.

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.

2 participants