Skip to content
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

Refactor: EntityListener 적용 및 Food Domain 리팩토링 #141

Merged
merged 7 commits into from
Jan 8, 2024

Conversation

synoti21
Copy link
Contributor

@synoti21 synoti21 commented Jan 6, 2024

Done

  • AuditingEntityListener 적용
  • Builder 패턴 적용
  • 테스트 코드를 위한 set 메소드 제거 및 Reflect 사용

Next

  • JWT 인가 적용
  • 명시적 관계 설정 대신 DB 레이어에서 처리

@synoti21 synoti21 added the refactor 리팩토링 label Jan 6, 2024
@synoti21 synoti21 self-assigned this Jan 6, 2024
@synoti21 synoti21 linked an issue Jan 6, 2024 that may be closed by this pull request
@synoti21 synoti21 requested a review from win-luck January 7, 2024 15:32
@synoti21 synoti21 changed the title Refactor: EntityLIstener 적용 및 Food Domain 리팩토링 Refactor: EntityListener 적용 및 Food Domain 리팩토링 Jan 7, 2024
Copy link
Contributor

@win-luck win-luck left a comment

Choose a reason for hiding this comment

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

고생많으셨습니다:)

Comment on lines +8 to +9
public class JpaAuditingConfig {
}
Copy link
Contributor

Choose a reason for hiding this comment

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

새로운 클래스를 도입하셨군요!

Comment on lines +28 to +29
return ResponseFoodDto.builder()
.foodId(foodId)
Copy link
Contributor

Choose a reason for hiding this comment

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

빌더패턴 적용하신다고 고생하셨습니다~!


public static ResponseScoreBestWorstDto of(double calorieScore, double carbohydrateScore, double proteinScore, double fatScore, double totalScore, List<ResponseSimpleFoodDto> best, List<ResponseSimpleFoodDto> worst) {
public static ResponseScoreBestWorstDto of(double calorieScore, double carbohydrateScore, double proteinScore, double fatScore, double totalScore, List<ResponseFoodDto> best, List<ResponseFoodDto> worst) {
Copy link
Contributor

Choose a reason for hiding this comment

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

SimpleFoodDto -> FoodDto로 바꾼 것 확인했습니다!

Comment on lines +67 to +73
Field foodId = Food.class.getDeclaredField("id");
foodId.setAccessible(true);
foodId.set(testFood, testFoodId);

Field favoriteId = FavoriteFood.class.getDeclaredField("id");
favoriteId.setAccessible(true);
favoriteId.set(testFavoriteFood, testFavoriteFoodId);
Copy link
Contributor

Choose a reason for hiding this comment

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

저도 모르는 부분이 있었네요! 또 배워갑니다~!

@win-luck win-luck merged commit 3050d5a into master Jan 8, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor 리팩토링
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor: EntityListener 적용 및 Food Domain 리팩토링
2 participants