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

[BE] 도메인 설계 수정 반영 #27

Merged
merged 14 commits into from
Jul 18, 2024
Merged

[BE] 도메인 설계 수정 반영 #27

merged 14 commits into from
Jul 18, 2024

Conversation

ehBeak
Copy link
Contributor

@ehBeak ehBeak commented Jul 18, 2024

관련 이슈

작업 내용

수정한 ERD을 반영하여 도메인을 수정했습니다.

  • 도메인 용어 변경 Guest -> Attendee
  • meeting 테이블에 host_id 삭제 및 attendee 테이블에 role 필드 추가
  • schedule 테이블에 first_timeslot, last_timeslot 필드 추가
  • API 명세 수정

변경 ERD
스크린샷 2024-07-18 오후 4 01 57

특이 사항

  • 엔티티가 수정되어서 로직의 수정이 필요합니다.
    • 테스트 코드가 통과하고 어플리케이션이 실행되도록 만들었지만, 로직이 제대로 동작하지 않을 가능성이 높습니다.

리뷰 요구사항 (선택)

  • 모든 도메인에 created_atmodified_at을 넣는 것이 좋을까요?
    • AvailableDateSchedule 도메인에서 BaseEntity를 상속할지 의문이 듭니다. 논의 이후 반영하겠습니다~

@ehBeak ehBeak self-assigned this Jul 18, 2024
@ehBeak ehBeak added 🐈‍⬛ 백엔드 백엔드 관련 이슈에요 :) 🚀 기능 기능을 개발해요 :) labels Jul 18, 2024
@ehBeak ehBeak added this to the 2차 데모데이 milestone Jul 18, 2024
Copy link
Contributor

@seokmyungham seokmyungham left a comment

Choose a reason for hiding this comment

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

모든 엔티티라면 생성, 수정시간을 추적할 수 있어야 한다고 생각합니다.
추후 버그가 발생했을 때 이 정보들을 활용하지 않는다고 확신할 수 있을까요??

Copy link
Member

@hw0603 hw0603 left a comment

Choose a reason for hiding this comment

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

모든 엔티티라면 생성, 수정시간을 추적할 수 있어야 한다고 생각합니다.
추후 버그가 발생했을 때 이 정보들을 활용하지 않는다고 확신할 수 있을까요??

재즈 의견에 동의합니다. 생성시간/수정시간을 기록할 때 사용하는 기능 이름이 Auditing(감사) 이라는 것을 생각해 봤을 때 우선 로그성 정보라고 생각하고 다 남겨 놓는 것이 좋을 것 같아요!

Copy link
Member

Choose a reason for hiding this comment

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

dto 클래스의 위치는 다른 곳과 같이 /service 하위로 들어가야 할 것 같아요~

Copy link
Contributor Author

Choose a reason for hiding this comment

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

생성시간/수정시간을 기록할 때 사용하는 기능 이름이 Auditing(감사) 이라는 것을 생각해 봤을 때 우선 로그성 정보라고 생각하고 다 남겨 놓는 것이 좋을 것 같아요!

생성시간/수정시간을 로그성 정보를 저장한다는 점은 생각지 못했네요! 꼭 필요할 것 같습니다.

다만, 현재 참가자가 시간을 수정할 때
참가자와 연관된 모든 Schedule을 삭제한 뒤 다시 Schedule을 생성하는 방식으로 로직이 진행됩니다. 로그성 정보라면, 수정하기 전 삭제되는 모든 테이블의 행 또한 다 남겨야 하는 것이 아닌가..라는 의문이 듭니다. 지금은 참가자의 수정하기 전 최근 정보만 남겨 두는데에만 의미를 두면 될것 같네요!

Copy link
Member

Choose a reason for hiding this comment

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

Schedule 수정하는 로직은 다시 한 번 논의해 봐야 할 것 같네요😅

Copy link
Contributor

@ikjo39 ikjo39 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 3 to 5
public enum Role {
HOST, GUEST
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
public enum Role {
HOST, GUEST
}
public enum Role {
HOST,
GUEST
}

줄바꿈 컨벤션이 빠져있는거 같아요!

Comment on lines 40 to 41
Attendee attendee = null;
List<Schedule> schedules = scheduleRepository.findAllByAttendee(attendee);
Copy link
Contributor

Choose a reason for hiding this comment

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

이 부분은 왜 이런 구조로 변경되었는지 궁금합니다!

Copy link
Contributor Author

@ehBeak ehBeak Jul 18, 2024

Choose a reason for hiding this comment

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

일단 테스트를 통과시켜야 해서 변경했습니다.
이후에 재즈(@seokmyungham)가 수정할 예정입니다~!

hw0603
hw0603 previously approved these changes Jul 18, 2024
Copy link
Member

@hw0603 hw0603 left a comment

Choose a reason for hiding this comment

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

👍

seokmyungham
seokmyungham previously approved these changes Jul 18, 2024
ikjo39
ikjo39 previously approved these changes Jul 18, 2024
@ehBeak ehBeak dismissed stale reviews from ikjo39 and seokmyungham via 2b94e43 July 18, 2024 07:36
Copy link
Contributor

@seunghye218 seunghye218 left a comment

Choose a reason for hiding this comment

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

RC가 잘 반영되었네요~👍

@ehBeak ehBeak merged commit 14b78b8 into develop Jul 18, 2024
@ehBeak ehBeak deleted the feat/22-redesign-table branch July 18, 2024 08:09
hw0603 pushed a commit to hw0603/momo-cicd-playground that referenced this pull request Jul 19, 2024
* refactor(Meeting): Meeting 테이블 필드명 추가 및 연관관계 삭제

timeslot 필드명 수정 및 guest와 연관관계 삭제

* refactor(Attendee): Guest 도메인명을 Attendee로 수정

* fix(MeetingServiceTest): Meeting 필드 변경에 따른 테스트 코드 오류 수정

host_id 연관관계 삭제에 따른 생성자 수정으로 발생한 테스트 코드 오류 수정

* refactor(Schedule): Schedule과 Meeting의 연관관계 삭제

* refactor(Schedule): timeslot 필드를 firstTimeslot과 lastTimeslot으로 분리

* refactor(Attendee): Attendee에 role 추가

* refactor(Attendee): Attendee에 role 추가

* refactor(Attendee): Attendee에 Meeting 연관관계 추가

* fix: origin feature 브랜치 머지

* refactor(Schedule): createdAt과 modifiedAt 필드 추가

* style(Role): 컨벤션에 맞춰 수정

* move(ScheduleTimeResponse): ScheduleTimeResponse를 service위치로 이동

* refactor(MeetingService): 참여자의 스케쥴을 조회하는 로직에서 findAll()을 사용하도록 수정
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐈‍⬛ 백엔드 백엔드 관련 이슈에요 :) 🚀 기능 기능을 개발해요 :)
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[BE] 수정한 ERD 설계를 코드에 반영해봐요:)
5 participants