Skip to content

원생 수정 API #96

Open
yunhwane wants to merge 3 commits intodevelopfrom
feature/EB-90
Open

원생 수정 API #96
yunhwane wants to merge 3 commits intodevelopfrom
feature/EB-90

Conversation

@yunhwane
Copy link
Contributor

@yunhwane yunhwane commented Nov 4, 2024

Summary (작업사항)

  • 원생 수정 API 작성
  • 테스트 코드 작성
  • 통합 테스트 코드 작성

변경사유

Reference (Wiki)

체크리스트

validation 체크 부탁드립니다.

예외 사항

  • groupName 정보가 없으면 exception
  • student 정보가 없으면 exception

기타

@yunhwane yunhwane self-assigned this Nov 4, 2024
Copy link
Contributor

Choose a reason for hiding this comment

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

학생 정보에서 group에 대한 정보를 수정할 시 student - group 간 연관관계를 담고 기존 studentGroup 객체를 삭제하고 새로운 studentGroup을 save 하는 로직도 필요해 보입니다!
Ex) student A가 기존에는 Group A, B에 속해있었지만 Group A, C에 속해있도록 수정하려고 할 때, studentGroup (A - B)는 db에서 삭제하고 studentGroup (A-C)는 생성한다.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

네 이부분 반영해서 올리겠습니다.


public static UpdateStudentInfoDetailResponse of(Student student) {

final List<GroupInfo> groups = student.getStudentGroups()
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

Choose a reason for hiding this comment

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

아 이부분은 정적 팩토리 메서드 패턴 써서, 엔티티를 response로 변환 과정을 dto 단에서 처리한거에요!
https://tecoble.techcourse.co.kr/post/2020-05-26-static-factory-method/

이부분 참조하시면 좋을 것 같습니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants