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

게시글 수정 시 태그 메서드 리팩터링 #79

Closed
hyena0608 opened this issue Jan 25, 2023 · 0 comments · Fixed by #80
Closed

게시글 수정 시 태그 메서드 리팩터링 #79

hyena0608 opened this issue Jan 25, 2023 · 0 comments · Fixed by #80
Assignees
Labels
♻️ refactor 코드 리팩터링
Milestone

Comments

@hyena0608
Copy link
Collaborator

🚀 목적

  • 게시글 수정 메서드 리팩터링

🔗 작업

  • 게시글 수정시 태그 업데이트 메서드 리팩터링
    • 새로운 RootTag 존재시 저장한다.
    • 없어진 PostTag를 삭제한다.
      • UserTag 카운트를 줄인다.
        • UserTag 카운트가 0일시에 삭제한다.
    • 새로운 PostTag를 저장한다.
      • UserTag를 새로 저장하거나 카운트를 증가한다.

✅ 완료조건

@hyena0608 hyena0608 added the ♻️ refactor 코드 리팩터링 label Jan 25, 2023
@hyena0608 hyena0608 added this to the Sprint - 2 milestone Jan 25, 2023
@hyena0608 hyena0608 self-assigned this Jan 25, 2023
hyena0608 added a commit that referenced this issue Jan 26, 2023
* refactor: 엔티티 수정

- Post 엔티티 수정

- User 엔티티 수정

- PostTag 엔티티 수정

- RootTag 엔티티 수정

- UserTag 엔티티 수정

* refactor: 게시글 수정 메서드 리팩터링

- 게시글 수정시 태그 업데이트 메서드 리팩터링
  - 새로운 RootTag 존재시 저장한다.
  - 없어진 PostTag를 삭제한다.
    - UserTag 카운트를 줄인다.
      - UserTag 카운트가 0일시에 삭제한다.
  - 새로운 PostTag를 저장한다.
    - UserTag를 새로 저장하거나 카운트를 증가한다.

* test: 게시글 수정 테스트 업데이트

* fix: 게시글 태그 삭제 기능 어노테이션 수정
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 a pull request may close this issue.

1 participant