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

[FIX] Soft Delete 구조 변경 #182

Merged
merged 7 commits into from
Jan 2, 2024
Merged

[FIX] Soft Delete 구조 변경 #182

merged 7 commits into from
Jan 2, 2024

Conversation

thguss
Copy link
Member

@thguss thguss commented Dec 21, 2023

Related issue 🚀

Work Description 💚

  • DeletedDiary 테이블을 추가로 만들어, 삭제된 Diary 데이터를 별도의 테이블에서 관리합니다.
  • PR 병합 후 DB 관련 나머지 작업을 처리할 예정입니다. (데이터 이동, Diary.isDeleted 칼럼 삭제 등)
  • Soft Delete 구조를 변경하면서, 변경되는 사이드 부분 추가 수정했습니다.
  • 이외 추가적인 의견이 있다면 리뷰 부탁드려요 :)

@thguss thguss added SOHYEON 🐣 소현 작업 FIX labels Dec 21, 2023
@thguss thguss requested a review from unanchoi December 21, 2023 08:14
@thguss thguss self-assigned this Dec 21, 2023
Copy link
Contributor

@unanchoi unanchoi left a comment

Choose a reason for hiding this comment

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

고생하셨습니다! 간단하게 리뷰 남겼습니다~!


private LocalDateTime getExpiryDate() {
int expiredDay = parseInt(valueConfig.getDURATION_EXPIRED());
return LocalDateTime.now().minusDays(expiredDay - 1).toLocalDate().atStartOfDay();
Copy link
Contributor

Choose a reason for hiding this comment

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

LocalDateTime.now()에서 minusDays를 하고 LocalDate class로 바꿔주고 있는데, LocalDate.now()를 바로 사용해도 괜찮을 것 같은데 어떠신가요?

Copy link
Member Author

@thguss thguss Dec 31, 2023

Choose a reason for hiding this comment

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

좋은 피드백 감사해요 :)

Comment on lines +39 to +41
private LocalDateTime createdAt;

private LocalDateTime updatedAt;
Copy link
Contributor

Choose a reason for hiding this comment

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

여기서 BaseTimeEntity를 상속받지 않은 이유는 인스턴스 생성시에,

       this.createdAt = diary.getCreatedAt();
        this.updatedAt = LocalDateTime.now();

위와 같이 값을 초기화하기 위해서일까요?

Copy link
Member Author

Choose a reason for hiding this comment

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

네 맞아요! 처음에 BaseTimeEntity 상속 후 초기화 했었는데, 실행해보니 초기화가 적용되지 않아 해당 코드로 변경했어요ㅠㅠ!

@thguss
Copy link
Member Author

thguss commented Dec 31, 2023

@unanchoi 리뷰 반영했습니다! 언제나 좋은 피드백 감사드려요 :)

Copy link
Contributor

@unanchoi unanchoi left a comment

Choose a reason for hiding this comment

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

고생하셨습니다~!

새해복 많이 받으세요!!!1

@thguss thguss merged commit a3c3251 into develop Jan 2, 2024
1 check passed
@thguss thguss deleted the sohyeon_#181 branch January 2, 2024 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FIX SOHYEON 🐣 소현 작업
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FIX] Soft Delete 구조 변경
2 participants