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

[#67] 기타 카테고리에 해당하는 활동 생성 시 디폴트 이모지 설정 및 리팩토링 #68

Merged
merged 5 commits into from
May 10, 2024

Conversation

yel-m
Copy link
Member

@yel-m yel-m commented May 10, 2024

#️⃣ 연관된 이슈

Resolves #67

📝 작업 내용

이번 PR에서 작업한 내용을 간략히 설명해주세요 (이미지 첨부 가능)

중요한 변경

  • RDS DB에서 Activity의 emoji 컬럼의 default 값을 🍀로 설정하도록 DDL을 설정했습니다.
  • null 값 insert를 피하기 위해 @DynamicInsert@DynamicUpdate를 추가했습니다.
  • @DynamicInsert와 @DynamicUpdate 애노테이션은 각각 엔티티를 save할 때와 update할 때 null 값은 배제하고 insert 쿼리를 날리도록 합니다. 따라서 DDL 생성 시 null 값이 아닌 default 값이 제대로 들어가게 됩니다.

사소한 변경

  • DELETE api/activities 요청 시 공통 ResponseDTO 형식에 맞게 리스폰스를 리턴하도록 수정했습니다!
    • activityId를 반환하는 역할을 하는 ActivityCreateResponseDto를 재사용하기 위해 DTO 명을 ActivityResponseDto로 수정했습니다.
  • Activity의 id에 @GeneratedValue 애너테이션이 있기 때문에 새로운 Activity 객체를 생성하기 전 nextActivity를 가져오는 작업을 생략했습니다!
    • Activity를 생성할 때 ActivityDto를 통해 Activity 엔티티를 생성하는 작업을 컨버터로 넘겨주고, Builder 패턴을 적용했습니다!
    • 생성자와 빌더 패턴의 차이는 다음 글을 참고하면 좋을 것 같습니다! >> 빌더 패턴(Builder pattern)을 써야하는 이유, @Builder
  • Converter에서 매개변수로 받는 DTO 이름이 requestDto인 경우도 있고, DTO의 풀네임인 경우도 있어서, requestDto로 통일해주었습니다!
    • DTO 이름이 부득이하게 변경되었을 경우 (예시) recordCreateRequestDto보다는 requestDto로 작성해놓는 편이 수정 사항이 더 적어진다고 생각했습니다! 코드 가독성 측면에서도 개인적으로 requestDto가 더 좋다고 생각했습니다.

혹시 다른 의견이 있으시면 언제든지 말씀해주세효!!

스크린샷 (선택)

💬 리뷰 요구사항(선택)

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요

ex) 메서드 XXX의 이름을 더 잘 짓고 싶은데 혹시 좋은 명칭이 있을까요?

✅ Check List

  • PR 제목을 커밋 규칙에 맞게 작성했는가?
  • PR에 해당되는 Issue를 연결했는가?
  • 적절한 라벨을 설정했는가?
  • 작업한 사람을 모두 Assign했는가?

@yel-m yel-m added the fix 기능 및 버그를 수정합니다 label May 10, 2024
@yel-m yel-m self-assigned this May 10, 2024
@yel-m yel-m requested a review from KkomSang May 10, 2024 03:41
@KkomSang
Copy link
Collaborator

저 때문에....수정할 게 많았겠네욤,,,,,ㅜㅡㅜㅡㅜㅜㅡㅜㅡㅜㅡㅜㅡㅜ 수고많았고 고마워요!!!!!!!!🥹😍아자아자!!!!!

@KkomSang KkomSang merged commit bc2a957 into develop May 10, 2024
1 check passed
@KkomSang KkomSang deleted the fix/#67 branch May 10, 2024 04:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix 기능 및 버그를 수정합니다
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants